Browse Source

* non-unix uses fdread/fdwrite

git-svn-id: trunk@5107 -
peter 19 years ago
parent
commit
070606c267
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rtl/inc/sockets.inc

+ 4 - 4
rtl/inc/sockets.inc

@@ -34,8 +34,8 @@ end;
 Procedure IOSock(var F:text);
 begin
   case textrec(f).mode of
-   fmoutput : fpWrite(textrec(f).handle,textrec(f).bufptr^,textrec(f).bufpos);
-    fminput : textrec(f).BufEnd:=fpRead(textrec(f).handle,textrec(f).bufptr^,textrec(f).bufsize);
+   fmoutput : {$ifdef unix}fpWrite{$else}fdwrite{$endif}(textrec(f).handle,textrec(f).bufptr^,textrec(f).bufpos);
+    fminput : textrec(f).BufEnd:={$ifdef Unix}fpRead{$else}fdread{$endif}(textrec(f).handle,textrec(f).bufptr^,textrec(f).bufsize);
   end;
   textrec(f).bufpos:=0;
 end;
@@ -172,7 +172,7 @@ end;
 
 type thostaddr= packed array[1..4] of byte;
 
-function htonl( host : longint):longint; inline; 
+function htonl( host : longint):longint; inline;
 
 begin
 {$ifdef FPC_BIG_ENDIAN}
@@ -198,7 +198,7 @@ begin
 {$endif}
 end;
 
-function htons( host : word):word; inline; 
+function htons( host : word):word; inline;
 
 begin
 {$ifdef FPC_BIG_ENDIAN}