Browse Source

* add common socket error constants to all platforms/socket.pp

git-svn-id: trunk@7022 -
Almindor 18 years ago
parent
commit
ed8e6b71e3
4 changed files with 53 additions and 16 deletions
  1. 13 4
      rtl/netware/sockets.pp
  2. 13 4
      rtl/netwlibc/sockets.pp
  3. 14 4
      rtl/unix/sockets.pp
  4. 13 4
      rtl/win/sockets.pp

+ 13 - 4
rtl/netware/sockets.pp

@@ -36,10 +36,19 @@ Type
   tsocklen=cint;
   psocklen=^tsocklen;
 
-const EsockEINTR  = WSAEINTR;
-      EsockEBADF  = WSAEBADF;
-      EsockEFAULT = WSAEFAULT;
-      EsockEINVAL = WSAEINVAL;
+const
+  EsockEINTR            = WSAEINTR;
+  EsockEBADF            = WSAEBADF;
+  EsockEFAULT           = WSAEFAULT;
+  EsockEINVAL           = WSAEINVAL;
+  EsocksEACCESS         = WSAEACCES;
+  EsocksEMFILE          = WSAEMFILE;
+  EsocksEMSGSIZE        = WSAEMSGSIZE;
+  EsocksENOBUFS         = WSAENOBUFS;
+  EsocksENOTCONN        = WSAENOTCONN;
+  EsocksENOTSOCK        = WSAENOTSOCK;
+  EsocksEPROTONOSUPPORT = WSAEPROTONOSUPPORT;
+  EsocksEWOULDBLOCK     = WSAEWOULDBLOCK;
 
 {$i netwsockh.inc}
 {$i socketsh.inc}

+ 13 - 4
rtl/netwlibc/sockets.pp

@@ -35,10 +35,19 @@ Type
   tsocklen=cint;
   psocklen=^tsocklen;
 
-const EsockEINTR  = WSAEINTR;
-      EsockEBADF  = WSAEBADF;
-      EsockEFAULT = WSAEFAULT;
-      EsockEINVAL = WSAEINVAL;
+const
+  EsockEINTR            = WSAEINTR;
+  EsockEBADF            = WSAEBADF;
+  EsockEFAULT           = WSAEFAULT;
+  EsockEINVAL           = WSAEINVAL;
+  EsocksEACCESS         = WSAEACCES;
+  EsocksEMFILE          = WSAEMFILE;
+  EsocksEMSGSIZE        = WSAEMSGSIZE;
+  EsocksENOBUFS         = WSAENOBUFS;
+  EsocksENOTCONN        = WSAENOTCONN;
+  EsocksENOTSOCK        = WSAENOTSOCK;
+  EsocksEPROTONOSUPPORT = WSAEPROTONOSUPPORT;
+  EsocksEWOULDBLOCK     = WSAEWOULDBLOCK;
 
 {$i netwsockh.inc}
 {$i socketsh.inc}

+ 14 - 4
rtl/unix/sockets.pp

@@ -37,10 +37,20 @@ type
                   path:array[0..107] of char;    //104 total for freebsd.
                   end;
 
-const EsockEINTR  = EsysEINTR;
-      EsockEBADF  = EsysEBADF;
-      EsockEFAULT = EsysEFAULT;
-      EsockEINVAL = EsysEINVAL;
+const
+  EsockEINTR            = EsysEINTR;
+  EsockEBADF            = EsysEBADF;
+  EsockEFAULT           = EsysEFAULT;
+  EsockEINVAL           = EsysEINVAL;
+  EsocksEACCESS         = ESysEAcces;
+  EsocksEMFILE          = ESysEmfile;
+  EsocksEMSGSIZE        = ESysEMsgSize;
+  EsocksENOBUFS         = ESysENoBufs;
+  EsocksENOTCONN        = ESysENotConn;
+  EsocksENOTSOCK        = ESysENotSock;
+  EsocksEPROTONOSUPPORT = ESysEProtoNoSupport;
+  EsocksEWOULDBLOCK     = ESysEWouldBlock;
+
 
 { unix socket specific functions }
 Procedure Str2UnixSockAddr(const addr:string;var t:TUnixSockAddr;var len:longint);

+ 13 - 4
rtl/win/sockets.pp

@@ -27,10 +27,19 @@ Type
   tsocklen= cint;
   psocklen= ^tsocklen;
 
-const EsockEINTR  = WSAEINTR;
-      EsockEBADF  = WSAEBADF;
-      EsockEFAULT = WSAEFAULT;
-      EsockEINVAL = WSAEINVAL;
+const
+  EsockEINTR            = WSAEINTR;
+  EsockEBADF            = WSAEBADF;
+  EsockEFAULT           = WSAEFAULT;
+  EsockEINVAL           = WSAEINVAL;
+  EsocksEACCESS         = WSAEACCES;
+  EsocksEMFILE          = WSAEMFILE;
+  EsocksEMSGSIZE        = WSAEMSGSIZE;
+  EsocksENOBUFS         = WSAENOBUFS;
+  EsocksENOTCONN        = WSAENOTCONN;
+  EsocksENOTSOCK        = WSAENOTSOCK;
+  EsocksEPROTONOSUPPORT = WSAEPROTONOSUPPORT;
+  EsocksEWOULDBLOCK     = WSAEWOULDBLOCK;
 
 {$i socketsh.inc}
 {$i fpwinsockh.inc}