]>
Commit | Line | Data |
---|---|---|
28f540f4 RM |
1 | /* On SVR4, this #define is necessary to make <sys/ioctl.h> define |
2 | many of the ioctls. */ | |
3 | #define BSD_COMP | |
4 | ||
5 | #include <sys/types.h> | |
6 | #include <sys/param.h> | |
7 | ||
8 | /* On SunOS 4.1, <sys/ioctl.h> and <sys/termios.h> define some symbols | |
9 | with different values, but <sys/termios.h> defines some ioctl symbols | |
10 | not in <sys/ioctl.h>, so we need it. Our <sys/ioctl.h> should define | |
11 | them with the values from Sun's <sys/ioctl.h>, not <sys/termios.h>. | |
12 | So we include <sys/termios.h> and let <sys/ioctl.h> redefine things. | |
13 | This produces some spurious warnings. */ | |
14 | ||
15 | #ifdef HAVE_sys_termios_h | |
16 | #include <sys/termios.h> | |
17 | #endif | |
18 | ||
19 | /* This causes <sys/ioctl.h> to define some necessary data structure. */ | |
20 | #ifdef sony_news | |
21 | #define KANJI | |
22 | #endif | |
23 | ||
24 | #include <sys/ioctl.h> | |
25 | ||
26 | #ifdef SIOCGIFCONF | |
27 | #include <sys/socket.h> | |
28 | #include <sys/time.h> | |
29 | #include <net/if.h> | |
30 | #include <net/route.h> | |
31 | #if defined(SIOCGARP) && !defined(ARPOP_REQUEST) | |
32 | #include <net/if_arp.h> | |
33 | #endif | |
34 | #ifdef SIOCGNIT | |
35 | #ifdef HAVE_net_nit_h | |
36 | #include <net/nit.h> | |
37 | #else /* No net/nit.h. */ | |
38 | #undef SIOCGNIT | |
39 | #undef SIOCSNIT | |
40 | #endif /* net/nit.h. */ | |
41 | #endif /* SIOCGNIT. */ | |
42 | #endif /* SIOCGIFCONF. */ | |
43 | ||
44 | /* These exist on Sequents. */ | |
45 | #ifdef SMIOSTATS | |
46 | #include <sec/sec.h> | |
47 | #include <sec/sm.h> | |
48 | #endif | |
49 | #ifdef SMIOGETREBOOT0 | |
50 | #include <i386/cfg.h> | |
51 | #endif | |
52 | #ifdef ZIOCBCMD | |
53 | #include <zdc/zdc.h> | |
54 | #endif | |
55 | ||
56 | /* These exist under Ultrix, but I figured there may be others. */ | |
57 | #ifdef DIOCGETPT | |
58 | #include <ufs/fs.h> /* for DIOC* */ | |
59 | #endif | |
60 | #ifdef DEVGETGEOM | |
61 | #include <sys/devio.h> | |
62 | #endif | |
63 | ||
64 | #ifdef ultrix | |
65 | /* Ultrix has a conditional include that brings these in; we have to force | |
66 | their inclusion when we actually compile them. */ | |
67 | #undef TCGETA | |
68 | #undef TCSETA | |
69 | #undef TCSETAW | |
70 | #undef TCSETAF | |
71 | #undef TCGETP | |
72 | #undef TCSANOW | |
73 | #undef TCSADRAIN | |
74 | #undef TCSAFLUSH | |
75 | #ifdef ELSETPID | |
76 | #include <sys/un.h> /* get sockaddr_un for elcsd.h */ | |
77 | #include <elcsd.h> | |
78 | #endif | |
79 | #ifdef DKIOCDOP | |
80 | #include <sys/dkio.h> | |
81 | #endif | |
82 | /* Couldn't find the header where the structures used by these are | |
83 | defined; it looks like an unbundled LAT package or something. */ | |
84 | #undef LIOCSOL | |
85 | #undef LIOCRES | |
86 | #undef LIOCCMD | |
87 | #undef LIOCINI | |
88 | #undef LIOCTTYI | |
89 | #undef LIOCCONN | |
90 | /* struct mtop hasn't been in sys/mtio.h since 4.1 */ | |
91 | #undef MTIOCTOP | |
92 | #undef MTIOCGET | |
93 | #endif | |
94 | ||
95 | #if defined(__osf__) && defined(__alpha__) | |
96 | #include <sys/ioctl_compat.h> /* To get TIOCGETP, etc. */ | |
97 | #include <alpha/pt.h> /* for DIOC* */ | |
98 | #include <sys/mtio.h> /* for MTIOC* */ | |
99 | /* The binlog_getstatus structure doesn't seem to be defined. */ | |
100 | #undef BINLOG_GETSTATUS | |
101 | /* Can't find `struct ifdata' anywhere. */ | |
102 | #undef SIOCMANREQ | |
103 | #undef SIOCGETEVENTS | |
104 | /* OSF/1 smells an awful lot like Ultrix. */ | |
105 | #undef TCGETA | |
106 | #undef TCSETA | |
107 | #undef TCSETAF | |
108 | #undef TCSETAW | |
109 | /* This macro looks screwed in sys/devio.h. */ | |
110 | #undef DEV_DISKPART | |
111 | /* This is in sys/dkio.h, but we don't need it. */ | |
112 | #undef DKIOCACC | |
113 | #undef DKIOCDOP | |
114 | #undef DKIOCEXCL | |
115 | #undef DKIOCGET | |
116 | #undef DKIOCHDR | |
117 | /* Introduced by OSF/1 2.0. */ | |
118 | #undef FIOPIPESTAT | |
119 | #undef SIOCSRREQR | |
120 | #undef SIOCSRREQW | |
121 | #undef SRVC_REQUEST | |
122 | #endif | |
123 | ||
124 | #define DEFINE(name, value) \ | |
125 | printf("#define %s 0x%.8x\n", (name), (value)) | |
126 | ||
127 | int | |
128 | main() | |
129 | { | |
130 | REQUESTS | |
131 | ||
132 | exit(0); | |
133 | return 0; | |
134 | } |