comparison src/sysproc.h @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 74fd4e045ea6
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
27 # include <vfork.h> 27 # include <vfork.h>
28 #endif 28 #endif
29 29
30 #include "systime.h" /* necessary for sys/resource.h; also gets the 30 #include "systime.h" /* necessary for sys/resource.h; also gets the
31 FD_* defines on some systems. */ 31 FD_* defines on some systems. */
32 #ifndef WINDOWSNT 32 #ifndef WIN32_NATIVE
33 #include <sys/resource.h> 33 #include <sys/resource.h>
34 #endif 34 #endif
35 35
36 #if !defined (NO_SUBPROCESSES) 36 #if !defined (NO_SUBPROCESSES)
37 37
38 #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */ 38 #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */
39 # include <sys/types.h> /* AJK */ 39 # include <sys/types.h> /* AJK */
40 # include <sys/socket.h> 40 # ifndef WIN32_NATIVE
41 # include <netdb.h> 41 # include <sys/socket.h>
42 # include <netinet/in.h> 42 # include <netdb.h>
43 # include <arpa/inet.h> 43 # include <netinet/in.h>
44 #ifdef NEED_NET_ERRNO_H 44 # include <arpa/inet.h>
45 #include <net/errno.h> 45 # endif
46 #endif /* NEED_NET_ERRNO_H */ 46 # ifdef NEED_NET_ERRNO_H
47 # include <net/errno.h>
48 # endif /* NEED_NET_ERRNO_H */
47 #elif defined (SKTPAIR) 49 #elif defined (SKTPAIR)
48 # include <sys/socket.h> 50 # include <sys/socket.h>
49 #endif /* HAVE_SOCKETS */ 51 #endif /* HAVE_SOCKETS */
52
53 #ifdef WIN32_NATIVE
54 /* Note: winsock.h already included in systime.h above */
55 /* map winsock error codes to standard names */
56 #define EWOULDBLOCK WSAEWOULDBLOCK
57 #define EINPROGRESS WSAEINPROGRESS
58 #define EALREADY WSAEALREADY
59 #define ENOTSOCK WSAENOTSOCK
60 #define EDESTADDRREQ WSAEDESTADDRREQ
61 #define EMSGSIZE WSAEMSGSIZE
62 #define EPROTOTYPE WSAEPROTOTYPE
63 #define ENOPROTOOPT WSAENOPROTOOPT
64 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
65 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
66 #define EOPNOTSUPP WSAEOPNOTSUPP
67 #define EPFNOSUPPORT WSAEPFNOSUPPORT
68 #define EAFNOSUPPORT WSAEAFNOSUPPORT
69 #define EADDRINUSE WSAEADDRINUSE
70 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
71 #define ENETDOWN WSAENETDOWN
72 #define ENETUNREACH WSAENETUNREACH
73 #define ENETRESET WSAENETRESET
74 #define ECONNABORTED WSAECONNABORTED
75 #define ECONNRESET WSAECONNRESET
76 #define ENOBUFS WSAENOBUFS
77 #define EISCONN WSAEISCONN
78 #define ENOTCONN WSAENOTCONN
79 #define ESHUTDOWN WSAESHUTDOWN
80 #define ETOOMANYREFS WSAETOOMANYREFS
81 #define ETIMEDOUT WSAETIMEDOUT
82 #define ECONNREFUSED WSAECONNREFUSED
83 #define ELOOP WSAELOOP
84 /* #define ENAMETOOLONG WSAENAMETOOLONG */
85 #define EHOSTDOWN WSAEHOSTDOWN
86 #define EHOSTUNREACH WSAEHOSTUNREACH
87 /* #define ENOTEMPTY WSAENOTEMPTY */
88 #define EPROCLIM WSAEPROCLIM
89 #define EUSERS WSAEUSERS
90 #define EDQUOT WSAEDQUOT
91 #define ESTALE WSAESTALE
92 #define EREMOTE WSAEREMOTE
93 #endif /* WIN32_NATIVE */
50 94
51 /* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */ 95 /* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */
52 #ifdef HAVE_BROKEN_INET_ADDR 96 #ifdef HAVE_BROKEN_INET_ADDR
53 # define IN_ADDR struct in_addr 97 # define IN_ADDR struct in_addr
54 # define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1) 98 # define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
99 143
100 #endif /* no FD_SET */ 144 #endif /* no FD_SET */
101 145
102 int poll_fds_for_input (SELECT_TYPE mask); 146 int poll_fds_for_input (SELECT_TYPE mask);
103 147
104 #ifdef MSDOS
105 /* #include <process.h> */
106 /* Damn that local process.h! Instead we can define P_WAIT ourselves. */
107 #define P_WAIT 1
108 #endif
109
110 #endif /* INCLUDED_sysproc_h_ */ 148 #endif /* INCLUDED_sysproc_h_ */