X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/46424de88e9de51a8151fd6ef813ff7827b1ad8c..1a8d0bce39fe4edf7443bde884fefe78412fe521:/unixstuff.inc diff --git a/unixstuff.inc b/unixstuff.inc old mode 100755 new mode 100644 index 0eb9b3d..dca63ce --- a/unixstuff.inc +++ b/unixstuff.inc @@ -22,7 +22,8 @@ {$else} result := invalue; {$endif} - end; + end; + {$define need_v6constants} {$else} {$define sigprocmask := fpsigprocmask} @@ -46,7 +47,7 @@ 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; @@ -93,6 +94,7 @@ const IPPROTO_UDP=17; IPPROTO_ICMP=1; + {$define need_v6constants} {$endif} {$ifdef ver1_9} const @@ -110,6 +112,7 @@ result := invalue; {$endif} end; + {$define need_v6constants} {$endif} procedure gettimeofday(var tv:ttimeval);inline; begin @@ -147,4 +150,22 @@ sys_eintr=esyseintr; {$endif} + {$ifdef need_v6constants} + {$ifdef linux} + //the below values are only known correct on linux, I don't support + //1.0.x on any other unix platform atm anyway --plugwash + const + IPPROTO_IPV6 = 41; + 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} + +