annotate src/sysproc.h @ 531:0493e9f3c27f

[xemacs-hg @ 2001-05-12 11:16:12 by ben] event-msw.c: eliminate cygwin warnings. dired.c, syswindows.h, win32.c: find the Net* functions the hard way to avoid errors on win 9x. find-paths.el: fix error with null EXCLUDE-REGEXP. font-lock.el: fix problem reported by hrvoje with buffers starting with a space. lib-complete.el: add a variable to control where `find-library' looks, analogous to `find-function-source-path'. etags.c: new version from Francesco. Makefile.in.in: i'm getting real tired of incomplete commits. is this getting worse or something?
author ben
date Sat, 12 May 2001 11:16:25 +0000
parents c33ae14dd6d0
children 943eaba38521
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: Not really in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
23 #ifndef INCLUDED_sysproc_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
24 #define INCLUDED_sysproc_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
25
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 #ifdef HAVE_VFORK_H
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 # include <vfork.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #include "systime.h" /* necessary for sys/resource.h; also gets the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 FD_* defines on some systems. */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
32 #ifndef WIN32_NATIVE
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #include <sys/resource.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 #if !defined (NO_SUBPROCESSES)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 # include <sys/types.h> /* AJK */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
40 # ifndef WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
41 # include <sys/socket.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
42 # include <netdb.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
43 # include <netinet/in.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
44 # include <arpa/inet.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
45 # endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
46 # ifdef NEED_NET_ERRNO_H
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
47 # include <net/errno.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
48 # endif /* NEED_NET_ERRNO_H */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #elif defined (SKTPAIR)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 # include <sys/socket.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 #endif /* HAVE_SOCKETS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
53 #ifdef WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
54 /* Note: winsock.h already included in systime.h above */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
55 /* map winsock error codes to standard names */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
56 #define EWOULDBLOCK WSAEWOULDBLOCK
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
57 #define EINPROGRESS WSAEINPROGRESS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
58 #define EALREADY WSAEALREADY
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
59 #define ENOTSOCK WSAENOTSOCK
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
60 #define EDESTADDRREQ WSAEDESTADDRREQ
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
61 #define EMSGSIZE WSAEMSGSIZE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
62 #define EPROTOTYPE WSAEPROTOTYPE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
63 #define ENOPROTOOPT WSAENOPROTOOPT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
64 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
65 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
66 #define EOPNOTSUPP WSAEOPNOTSUPP
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
67 #define EPFNOSUPPORT WSAEPFNOSUPPORT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
68 #define EAFNOSUPPORT WSAEAFNOSUPPORT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
69 #define EADDRINUSE WSAEADDRINUSE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
70 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
71 #define ENETDOWN WSAENETDOWN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
72 #define ENETUNREACH WSAENETUNREACH
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
73 #define ENETRESET WSAENETRESET
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
74 #define ECONNABORTED WSAECONNABORTED
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
75 #define ECONNRESET WSAECONNRESET
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
76 #define ENOBUFS WSAENOBUFS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
77 #define EISCONN WSAEISCONN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
78 #define ENOTCONN WSAENOTCONN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
79 #define ESHUTDOWN WSAESHUTDOWN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
80 #define ETOOMANYREFS WSAETOOMANYREFS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
81 #define ETIMEDOUT WSAETIMEDOUT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
82 #define ECONNREFUSED WSAECONNREFUSED
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
83 #define ELOOP WSAELOOP
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
84 /* #define ENAMETOOLONG WSAENAMETOOLONG */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
85 #define EHOSTDOWN WSAEHOSTDOWN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
86 #define EHOSTUNREACH WSAEHOSTUNREACH
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
87 /* #define ENOTEMPTY WSAENOTEMPTY */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
88 #define EPROCLIM WSAEPROCLIM
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
89 #define EUSERS WSAEUSERS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
90 #define EDQUOT WSAEDQUOT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
91 #define ESTALE WSAESTALE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
92 #define EREMOTE WSAEREMOTE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
93 #endif /* WIN32_NATIVE */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
94
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 /* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 #ifdef HAVE_BROKEN_INET_ADDR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 # define IN_ADDR struct in_addr
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 # define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 # if (LONGBITS > 32)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 # define IN_ADDR unsigned int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 # else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 # define IN_ADDR unsigned long
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 # endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 # define NUMERIC_ADDR_ERROR (numeric_addr == (IN_ADDR) -1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 /* Define first descriptor number available for subprocesses. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 #define FIRST_PROC_DESC 3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 #ifdef IRIS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 # include <sys/sysmacros.h> /* for "minor" */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 #endif /* not IRIS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 #endif /* !NO_SUBPROCESSES */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 #ifdef AIX
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 #include <sys/select.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
121 #ifdef HAVE_STROPTS_H
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
122 #include <stropts.h> /* isastream(), I_PUSH */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
123 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
124
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
125 #ifdef HAVE_STRTIO_H
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
126 #include <strtio.h> /* TIOCSIGNAL */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
127 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
128
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
129 #ifdef HAVE_PTY_H
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
130 #include <pty.h> /* openpty() on Tru64, Linux */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
131 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
132
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
133 #ifdef HAVE_LIBUTIL_H
458
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 444
diff changeset
134 #include <libutil.h> /* openpty() on FreeBSD */
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 444
diff changeset
135 #endif
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 444
diff changeset
136
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 444
diff changeset
137 #ifdef HAVE_UTIL_H
c33ae14dd6d0 Import from CVS: tag r21-2-44
cvs
parents: 444
diff changeset
138 #include <util.h> /* openpty() on NetBSD */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
139 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
140
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #ifdef FD_SET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 /* We could get this from param.h, but better not to depend on finding that.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 And better not to risk that it might define other symbols used in this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 file. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 # ifdef FD_SETSIZE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 # define MAXDESC FD_SETSIZE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 # else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 # define MAXDESC 64
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 # endif /* FD_SETSIZE */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 # define SELECT_TYPE fd_set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 #else /* no FD_SET */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 # define MAXDESC 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 # define SELECT_TYPE int
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 /* Define the macros to access a single-int bitmap of descriptors. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 # define FD_SET(n, p) (*(p) |= (1 << (n)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 # define FD_CLR(n, p) (*(p) &= ~(1 << (n)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 # define FD_ISSET(n, p) (*(p) & (1 << (n)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 # define FD_ZERO(p) (*(p) = 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 #endif /* no FD_SET */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 int poll_fds_for_input (SELECT_TYPE mask);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
168 #endif /* INCLUDED_sysproc_h_ */