Skip to content

Commit

Permalink
Removing a couple of unused units from the implementation 'uses' clau…
Browse files Browse the repository at this point in the history
…se of IdHL7.pas.

Undefining HAS_getifaddrs under Android.
  • Loading branch information
rlebeau committed Mar 9, 2024
1 parent ba050d7 commit d9656a0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Lib/Core/IdCompilerDefines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,10 @@
{$DEFINE HAS_getifaddrs}
{$ENDIF}

{$IFDEF ANDROID}
{$UNDEF HAS_getifaddrs}
{$ENDIF}

{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
{$DEFINE REQUIRES_PROPER_ALIGNMENT}
{$ENDIF}
Expand Down
4 changes: 4 additions & 0 deletions Lib/FCL/IdCompilerDefines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,10 @@
{$DEFINE HAS_getifaddrs}
{$ENDIF}

{$IFDEF ANDROID}
{$UNDEF HAS_getifaddrs}
{$ENDIF}

{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
{$DEFINE REQUIRES_PROPER_ALIGNMENT}
{$ENDIF}
Expand Down
4 changes: 4 additions & 0 deletions Lib/Protocols/IdCompilerDefines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,10 @@
{$DEFINE HAS_getifaddrs}
{$ENDIF}

{$IFDEF ANDROID}
{$UNDEF HAS_getifaddrs}
{$ENDIF}

{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
{$DEFINE REQUIRES_PROPER_ALIGNMENT}
{$ENDIF}
Expand Down
4 changes: 1 addition & 3 deletions Lib/Protocols/IdHL7.pas
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,6 @@ implementation
{$IFDEF OSX}
CoreServices,
{$ENDIF}
PosixSysSelect,
PosixSysTime,
{$ENDIF}
IdGlobalProtocols,
IdResourceStringsProtocols;
Expand Down Expand Up @@ -1574,7 +1572,7 @@ function EncodeHL7Message(const AMsg: String; AByteEncoding: IIdTextEncoding
begin
{$IFDEF STRING_IS_ANSI}
if AMsg <> '' then begin
LTemp := AAnsiEncoding.GetString(RawToBytes(AMsg[1], Length(AMsg)));
LTemp := AAnsiEncoding.GetString(PByte(PAnsiChar(AMsg)), Length(AMsg));
end;
LMsgLen := AByteEncoding.GetByteCount(LTemp);
{$ELSE}
Expand Down
4 changes: 4 additions & 0 deletions Lib/SuperCore/IdCompilerDefines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,10 @@
{$DEFINE HAS_getifaddrs}
{$ENDIF}

{$IFDEF ANDROID}
{$UNDEF HAS_getifaddrs}
{$ENDIF}

{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
{$DEFINE REQUIRES_PROPER_ALIGNMENT}
{$ENDIF}
Expand Down
4 changes: 4 additions & 0 deletions Lib/System/IdCompilerDefines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,10 @@
{$DEFINE HAS_getifaddrs}
{$ENDIF}

{$IFDEF ANDROID}
{$UNDEF HAS_getifaddrs}
{$ENDIF}

{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
{$DEFINE REQUIRES_PROPER_ALIGNMENT}
{$ENDIF}
Expand Down

0 comments on commit d9656a0

Please sign in to comment.