9 |
|
*/ |
10 |
|
|
11 |
|
#include <stdio.h> |
12 |
– |
#include <sys/types.h> |
13 |
– |
#ifdef INCL_SEL_H |
14 |
– |
#include <sys/select.h> |
15 |
– |
#endif |
12 |
|
#include <signal.h> |
13 |
|
#include <fcntl.h> |
14 |
+ |
#include "selcall.h" |
15 |
|
#include "netproc.h" |
16 |
|
#include "paths.h" |
17 |
|
#include "vfork.h" |
21 |
– |
/* select call compatibility stuff */ |
22 |
– |
#ifndef FD_SETSIZE |
23 |
– |
#include <sys/param.h> |
24 |
– |
#define FD_SETSIZE NOFILE /* maximum # select file descriptors */ |
25 |
– |
#endif |
26 |
– |
#ifndef FD_SET |
27 |
– |
#ifndef NFDBITS |
28 |
– |
#define NFDBITS (8*sizeof(int)) /* number of bits per fd_mask */ |
29 |
– |
#endif |
30 |
– |
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) |
31 |
– |
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) |
32 |
– |
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) |
33 |
– |
#ifndef BSD |
34 |
– |
#define bzero(d,n) (void)memset(d,0,n) |
35 |
– |
#endif |
36 |
– |
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) |
37 |
– |
#endif |
18 |
|
|
19 |
|
PSERVER *pslist = NULL; /* global process server list */ |
20 |
|
|