comparison src/sysproc.h @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 8de8e3f6228a
children 576fb035e263
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
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)
70 114
71 #endif /* !NO_SUBPROCESSES */ 115 #endif /* !NO_SUBPROCESSES */
72 116
73 #ifdef AIX 117 #ifdef AIX
74 #include <sys/select.h> 118 #include <sys/select.h>
119 #endif
120
121 #ifdef HAVE_SYS_STROPTS_H
122 #include <sys/stropts.h> /* isastream(), I_PUSH */
123 #endif
124
125 #ifdef HAVE_SYS_STRTIO_H
126 #include <sys/strtio.h> /* TIOCSIGNAL */
127 #endif
128
129 #ifdef HAVE_PTY_H
130 #include <pty.h> /* openpty() on Tru64, Linux */
131 #endif
132
133 #ifdef HAVE_LIBUTIL_H
134 #include <libutil.h> /* openpty() on BSD */
75 #endif 135 #endif
76 136
77 #ifdef FD_SET 137 #ifdef FD_SET
78 138
79 /* We could get this from param.h, but better not to depend on finding that. 139 /* We could get this from param.h, but better not to depend on finding that.
99 159
100 #endif /* no FD_SET */ 160 #endif /* no FD_SET */
101 161
102 int poll_fds_for_input (SELECT_TYPE mask); 162 int poll_fds_for_input (SELECT_TYPE mask);
103 163
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_ */ 164 #endif /* INCLUDED_sysproc_h_ */