mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
# revisions: 44295,44951,44955,45230
git-svn-id: branches/fixes_3_2@45702 -
This commit is contained in:
parent
a5f9ff9507
commit
c5c9a86789
@ -73,7 +73,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
T.ResourceStrings := True;
|
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.ExamplePath.Add('examples');
|
||||||
P.Targets.AddExampleProgram('examples/ip6test.pp');
|
P.Targets.AddExampleProgram('examples/ip6test.pp');
|
||||||
|
@ -233,7 +233,7 @@ type
|
|||||||
{$if defined(LINUX) or defined(OPENBSD)}
|
{$if defined(LINUX) or defined(OPENBSD)}
|
||||||
{$define FIRST_ADDR_THEN_CANONNAME}
|
{$define FIRST_ADDR_THEN_CANONNAME}
|
||||||
{$endif}
|
{$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}
|
{$define FIRST_CANONNAME_THEN_ADDR}
|
||||||
{$endif}
|
{$endif}
|
||||||
{$if not defined(FIRST_CANONNAME_THEN_ADDR) and not defined(FIRST_ADDR_THEN_CANONNAME)}
|
{$if not defined(FIRST_CANONNAME_THEN_ADDR) and not defined(FIRST_ADDR_THEN_CANONNAME)}
|
||||||
|
@ -452,6 +452,7 @@ Var Part : String;
|
|||||||
ZeroAt : Integer;
|
ZeroAt : Integer;
|
||||||
Begin
|
Begin
|
||||||
FillChar(IPv6,SizeOf(IPv6),0);
|
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 }
|
{ 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 }
|
{ the '::' zero-spacer is found, its location is stored. Afterwards the }
|
||||||
{ address is shifted and zero-filled. }
|
{ address is shifted and zero-filled. }
|
||||||
@ -469,7 +470,7 @@ Begin
|
|||||||
if J <> 0 then
|
if J <> 0 then
|
||||||
Begin
|
Begin
|
||||||
FillChar(IPv6,SizeOf(IPv6),0);
|
FillChar(IPv6,SizeOf(IPv6),0);
|
||||||
Exit;
|
Exit(IPV6);
|
||||||
End;
|
End;
|
||||||
if IP[1] = ':' then
|
if IP[1] = ':' then
|
||||||
Begin
|
Begin
|
||||||
|
@ -401,7 +401,9 @@
|
|||||||
{ Set FreePascal to Delphi mode }
|
{ Set FreePascal to Delphi mode }
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
{$MODE DELPHI}
|
{$MODE DELPHI}
|
||||||
{$ASMMODE Intel}
|
{$IF DEFINED(CPUI386) OR DEFINED(CPUX86_64)}
|
||||||
|
{$ASMMODE Intel}
|
||||||
|
{$ENDIF CPUI386 OR CPUX86_64}
|
||||||
{$UNDEF BORLAND}
|
{$UNDEF BORLAND}
|
||||||
// FPC defines CPU* and Unix automatically
|
// FPC defines CPU* and Unix automatically
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
@ -8350,10 +8350,12 @@ end;
|
|||||||
|
|
||||||
function RtlUshortByteSwap(Source: USHORT): USHORT;
|
function RtlUshortByteSwap(Source: USHORT): USHORT;
|
||||||
asm
|
asm
|
||||||
|
{$if defined(cpux86_64) or defined(cpui386)}
|
||||||
{$ifdef cpux86_64}
|
{$ifdef cpux86_64}
|
||||||
mov CX, AX
|
mov CX, AX
|
||||||
{$endif cpux86_64}
|
{$endif cpux86_64}
|
||||||
rol AX, 08h
|
rol AX, 08h
|
||||||
|
{$endif cpux86_64 or cpui386}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(* Own function to swap bytes in 32bit values
|
(* Own function to swap bytes in 32bit values
|
||||||
@ -8367,10 +8369,12 @@ asm
|
|||||||
// This is not written as mnemonics to be compatible with D4!
|
// This is not written as mnemonics to be compatible with D4!
|
||||||
db 0Fh, 0C8h // "bswap EAX" can only be executed on 486+!!!
|
db 0Fh, 0C8h // "bswap EAX" can only be executed on 486+!!!
|
||||||
{$else}
|
{$else}
|
||||||
|
{$if defined(cpux86_64) or defined(cpui386)}
|
||||||
{$ifdef cpux86_64}
|
{$ifdef cpux86_64}
|
||||||
mov ECX, EAX
|
mov ECX, EAX
|
||||||
{$endif cpux86_64}
|
{$endif cpux86_64}
|
||||||
bswap EAX // .. but bswap EAX is also 64-bit!!! 0F C8 isn't.
|
bswap EAX // .. but bswap EAX is also 64-bit!!! 0F C8 isn't.
|
||||||
|
{$endif cpux86_64 or cpui386}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
(*
|
(*
|
||||||
|
Loading…
Reference in New Issue
Block a user