4 {$define tv_sec := sec}
\r
5 {$define tv_usec := usec}
\r
6 function dup(const original:integer):integer;inline;
\r
8 linux.dup(original,result);
\r
10 {$define gettimeofdaysec := gettimeofday}
\r
14 function ntohs(invalue:word):word;inline;
\r
16 invaluebytes : array[0..1] of byte absolute invalue;
\r
17 resultbytes : array[0..1] of byte absolute result;
\r
19 {$ifdef endian_little}
\r
20 resultbytes[0] := invaluebytes[1];
\r
21 resultbytes[1] := invaluebytes[0];
\r
28 {$define sigprocmask := fpsigprocmask}
\r
29 {$define sigaction := fpsigaction}
\r
30 {$define fdclose := fpclose}
\r
31 {$define fcntl := fpfcntl}
\r
32 {$define fdwrite := fpwrite}
\r
33 {$define fdread := fpread}
\r
34 {$define fdopen := fpopen}
\r
35 {$define select := fpselect}
\r
36 {$define linuxerror := fpgeterrno}
\r
37 {$define fork := fpfork}
\r
38 {$define getpid := fpgetpid}
\r
39 {$define getenv := fpgetenv}
\r
40 {$define chmod := fpchmod}
\r
41 {$define dup2 := fpdup2}
\r
43 {$define flock := fpflock}
\r
45 procedure Execl(Todo:string);inline;
\r
49 p := unixutil.StringToPPChar(Todo,1);
\r
50 if (p=nil) or (p^=nil) then exit;
\r
64 function ntohs(invalue:word):word;inline;
\r
66 invaluebytes : array[0..1] of byte absolute invalue;
\r
67 resultbytes : array[0..1] of byte absolute result;
\r
69 {$ifdef endian_little}
\r
70 resultbytes[0] := invaluebytes[1];
\r
71 resultbytes[1] := invaluebytes[0];
\r
77 procedure gettimeofday(var tv:ttimeval);inline;
\r
79 fpgettimeofday(@tv,nil);
\r
81 function gettimeofdaysec : longint;
\r
86 result := tv.tv_sec;
\r
89 //a function is used here rather than a define to prevent issues with tlasio.dup
\r
90 function dup(const original:integer):integer;inline;
\r
92 result := fpdup(original);
\r
94 function octal(invalue:longint):longint;
\r
101 while invalue <> 0 do begin
\r
102 a := invalue mod 10;
\r
103 result := result + (a shl (i*3));
\r
105 invalue := invalue div 10;
\r
110 sys_eintr=esyseintr;
\r