# revisions: 44295,44951,44955,45230

git-svn-id: branches/fixes_3_2@45702 -
This commit is contained in:
marco 2020-06-27 16:34:33 +00:00
parent a5f9ff9507
commit c5c9a86789
5 changed files with 11 additions and 4 deletions

View File

@ -73,7 +73,7 @@ begin
end;
T.ResourceStrings := True;
T:=P.Targets.AddUnit('cnetdb.pp',[linux,freebsd,solaris]);
T:=P.Targets.AddUnit('cnetdb.pp',[linux,freebsd,solaris,android]);
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('examples/ip6test.pp');

View File

@ -233,7 +233,7 @@ type
{$if defined(LINUX) or defined(OPENBSD)}
{$define FIRST_ADDR_THEN_CANONNAME}
{$endif}
{$if defined(FREEBSD) or defined(NETBSD) or defined(DRAGONFLY) or defined(SOLARIS)}
{$if defined(FREEBSD) or defined(NETBSD) or defined(DRAGONFLY) or defined(SOLARIS) or defined(ANDROID)}
{$define FIRST_CANONNAME_THEN_ADDR}
{$endif}
{$if not defined(FIRST_CANONNAME_THEN_ADDR) and not defined(FIRST_ADDR_THEN_CANONNAME)}

View File

@ -452,6 +452,7 @@ Var Part : String;
ZeroAt : Integer;
Begin
FillChar(IPv6,SizeOf(IPv6),0);
FillChar(StrToHostAddr6,SizeOf(TIn6_addr),0);
{ Every 16-bit block is converted at its own and stored into Result. When }
{ the '::' zero-spacer is found, its location is stored. Afterwards the }
{ address is shifted and zero-filled. }
@ -469,7 +470,7 @@ Begin
if J <> 0 then
Begin
FillChar(IPv6,SizeOf(IPv6),0);
Exit;
Exit(IPV6);
End;
if IP[1] = ':' then
Begin

View File

@ -401,7 +401,9 @@
{ Set FreePascal to Delphi mode }
{$IFDEF FPC}
{$MODE DELPHI}
{$ASMMODE Intel}
{$IF DEFINED(CPUI386) OR DEFINED(CPUX86_64)}
{$ASMMODE Intel}
{$ENDIF CPUI386 OR CPUX86_64}
{$UNDEF BORLAND}
// FPC defines CPU* and Unix automatically
{$ENDIF}

View File

@ -8350,10 +8350,12 @@ end;
function RtlUshortByteSwap(Source: USHORT): USHORT;
asm
{$if defined(cpux86_64) or defined(cpui386)}
{$ifdef cpux86_64}
mov CX, AX
{$endif cpux86_64}
rol AX, 08h
{$endif cpux86_64 or cpui386}
end;
(* Own function to swap bytes in 32bit values
@ -8367,10 +8369,12 @@ asm
// This is not written as mnemonics to be compatible with D4!
db 0Fh, 0C8h // "bswap EAX" can only be executed on 486+!!!
{$else}
{$if defined(cpux86_64) or defined(cpui386)}
{$ifdef cpux86_64}
mov ECX, EAX
{$endif cpux86_64}
bswap EAX // .. but bswap EAX is also 64-bit!!! 0F C8 isn't.
{$endif cpux86_64 or cpui386}
{$endif}
(*