X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/f102aba78918f31feeb2b3d8a685faa7ebfd20be..a77cd534c22418ec9a8a22ae42efef1a9500b193:/unixstuff.inc diff --git a/unixstuff.inc b/unixstuff.inc old mode 100755 new mode 100644 index 773656d..1a9a97b --- a/unixstuff.inc +++ b/unixstuff.inc @@ -43,11 +43,22 @@ {$ifndef ver1_9_2} {$define flock := fpflock} {$ifndef ver1_9_4} - procedure Execl(Todo:string);inline; + //beware: this is needed because FPC_FULLVERSION >= 30200 breaks delphi 6 even inside an ifdef it shouldn't process + {$ifdef fpc} + {$ifdef ver3} + {$ifndef ver3_0}{$ifndef ver3_1}{$define fpc_3_2_or_later}{$endif}{$endif} + {$endif} + {$ifdef ver4}{$define fpc_3_2_or_later}{$endif} + {$endif} + {$ifdef fpc_3_2_or_later} + procedure Execl(Todo:rawbytestring);inline; + {$else} + procedure Execl(Todo:string);inline; + {$endif} var p : ppchar; begin - p := unixutil.StringToPPChar(Todo,1); + p := unixutil.StringToPPChar(Todo,0); if (p=nil) or (p^=nil) then exit; fpexecv(p^,p); end; @@ -159,5 +170,13 @@ IPV6_V6ONLY = 26; {$endif} {$endif} + {$ifdef freebsd} + //freepascal doesn't seem to define IPV6_V6ONLY on freebsd, the definition + //here is taken from the include files of a freebsd 8 system + const + IPV6_V6ONLY = 27; + {$endif} + {$endif} - \ No newline at end of file + +