source: trunk/third/cns/src/include/osconf.h @ 8789

Revision 8789, 5.2 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8788, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * Copyright 1988 by the Massachusetts Institute of Technology.
3 *
4 * For copying and distribution information, please see the file
5 * <mit-copyright.h>.
6 *
7 * Kerberos OS-dependent configuration.
8 *
9 * When adding new config files, call them c-*.h if they are a configuration
10 * for a specific environment, or cc-*.h if they are included in multiple
11 * environments (e.g. they configure features or feature sets, not whole
12 * environments).
13 */
14
15#ifndef OSCONF_H_INCLUDED
16#define OSCONF_H_INCLUDED
17
18#include "mit-copyright.h"
19
20#ifdef sgi
21#include "c-sgi.h"
22#include "cc-unix.h"
23#define KRBTYPE sgi
24#endif
25
26#ifdef tahoe
27#include "c-tahoe.h"
28#include "cc-unix.h"
29#define KRBTYPE bsdtahoe
30#endif
31
32#ifdef vax
33#include "c-vax.h"
34#include "cc-unix.h"
35#define KRBTYPE bsdvax
36#endif
37
38#if defined(mips) && defined(ultrix)
39#include "c-ultmips.h"
40#include "cc-unix.h"
41#define KRBTYPE ultmips2
42#endif /* !Ultrix MIPS-2 */
43
44#ifdef __pyrsoft
45#ifdef MIPSEB
46#include "c-pyramid.h"
47#include "cc-unix.h"
48#define KRBTYPE pyramid
49#endif
50#endif
51
52#ifdef __DGUX__
53#ifdef __m88k__
54#include "c-dgux88.h"
55#include "cc-unix.h"
56#define KRBTYPE pyramid
57#endif
58#endif
59
60#ifdef ibm032
61#include "c-rtpc.h"
62#include "cc-unix.h"
63#define KRBTYPE bsdibm032
64#endif /* !ibm032 */
65
66#ifdef apollo
67#include "c-apollo.h"
68#include "cc-unix.h"
69#define KRBTYPE bsdapollo
70#endif /* !apollo */
71
72#ifdef sun
73#ifdef sparc
74#ifdef __svr4__
75#include "c-sol2.h"
76#include "cc-unix.h"
77#define KRBTYPE sol20sparc
78#else /* sun, sparc, not solaris */
79#include "c-sunos4.h"
80#include "cc-unix.h"
81#define KRBTYPE bsdsparc
82#endif /* sun, sparc */
83#else /* sun but not sparc */
84#ifdef i386
85#include "c-sun386i.h"
86#include "cc-unix.h"
87#define KRBTYPE bsd386i
88#else /* sun but not (sparc or 386i) */
89#include "c-sun3.h"
90#include "cc-unix.h"
91#define KRBTYPE bsdm68k
92#endif /* i386 */
93#endif /* sparc */
94#endif /* !sun */
95
96#ifdef pyr
97#include "c-pyr.h"
98#include "cc-unix.h"
99#define KRBTYPE pyr
100#endif
101
102#ifdef _AUX_SOURCE
103#include "c-aux.h"
104#include "cc-unix.h"
105#define KRBTYPE aux
106#endif
107
108#ifdef _AIX
109#ifdef _IBMR2
110#include "c-rs6000.h"
111#include "cc-unix.h"
112#define KRBTYPE aixrios
113#endif /* risc/6000 */
114#ifdef i386
115#include "c-386aix.h"
116#include "cc-unix.h"
117#define KRBTYPE aixps2
118#endif
119#endif
120
121#ifdef hpux
122#ifdef hppa
123#include "c-hpsnake.h"
124#include "cc-unix.h"
125#define KRBTYPE hpsnake
126#endif
127#ifdef hp9000s300
128#include "c-hp68k.h"
129#include "cc-unix.h"
130#define KRBTYPE hp68k
131#endif
132#endif
133
134#ifdef NeXT
135#include "c-next.h"
136#include "cc-unix.h"
137#define KRBTYPE next
138#endif
139
140#ifdef __SCO__
141#include "c-386sco.h"
142#include "cc-unix.h"
143#define KRBTYPE sco386
144#endif
145
146#ifdef linux
147#include "c-386linux.h"
148#include "cc-unix.h"
149#define KRBTYPE linux386
150#endif
151
152#ifdef __386BSD__
153#include "c-386bsd.h"
154#include "cc-unix.h"
155#define KRBTYPE 386bsd
156#endif
157
158#ifdef __NetBSD__
159#ifdef i386
160#ifndef __386BSD__
161/* close enough, I think */
162#include "c-386bsd.h"
163#include "cc-unix.h"
164#define KRBTYPE 386bsd
165#endif
166#endif
167#endif
168
169#ifdef __i960__
170#include "c-i960vx.h"
171#include "cc-unix.h"
172#define KRBTYPE i960vx
173#endif
174
175#ifdef __alpha
176#include "c-alpha.h"
177#include "cc-unix.h"
178#define KRBTYPE alpha
179#endif
180
181#ifdef _WINDOWS
182#include "c-windows.h"
183#define KRBTYPE windows
184#endif
185
186#ifdef  macintosh
187#include "c-mac.h"
188#define KRBTYPE mac
189#endif
190
191#ifndef KRBTYPE
192#ifdef __svr4__
193#include "c-svr4.h"
194#include "cc-unix.h"
195#define KRBTYPE svr4
196#endif
197#endif
198
199#ifndef KRBTYPE
200/*#*/ error "configuration failed to recognize system type"
201#endif
202
203/* Define some macros for signal handling.  If USE_SIGPROCMASK is
204   defined, we use the POSIX functions.  Otherwise we use the BSD
205   functions.
206
207   sigmasktype: type of mask argument to following macros.
208   SIGBLOCK(MASK, SIG): block SIG, setting MASK to the old signal mask
209   SIGBLOCK2(MASK, SIG1, SIG2): Like SIGBLOCK, but block both SIG1 and SIG2
210   SIGBLOCK3(MASK, SIG1, SIG2, SIG3): Same again, but three signals.
211   SIGUNBLOCK(MASK, SIG): unblock SIG, setting MASK to the old signal mask
212   SIGSETMASK(MASK): set the signal mask to MASK
213
214   These macros evalaute MASK multiple times.  */
215
216#ifndef USE_SIGPROCMASK
217#define sigmasktype int
218#define SIGBLOCK(MASK, SIG) (MASK = sigblock (sigmask (SIG)))
219#define SIGBLOCK2(MASK, SIG1, SIG2) \
220  (MASK = sigblock (sigmask (SIG1) | sigmask (SIG2)))
221#define SIGBLOCK3(MASK, SIG1, SIG2, SIG3) \
222  (MASK = sigblock (sigmask (SIG1) | sigmask (SIG2) | sigmask (SIG3)))
223#define SIGUNBLOCK(MASK, SIG) \
224  (MASK = sigblock (0), sigsetmask (MASK &~ sigmask (SIG)))
225#define SIGSETMASK(MASK) sigsetmask (MASK)
226#else
227#define sigmasktype sigset_t
228#define SIGBLOCK(MASK, SIG) \
229  (sigemptyset (&(MASK)), \
230   sigaddset (&(MASK), (SIG)), \
231   sigprocmask (SIG_BLOCK, &(MASK), &(MASK)))
232#define SIGBLOCK2(MASK, SIG1, SIG2) \
233  (sigemptyset (&(MASK)), \
234   sigaddset (&(MASK), (SIG1)), \
235   sigaddset (&(MASK), (SIG2)), \
236   sigprocmask (SIG_BLOCK, &(MASK), &(MASK)))
237#define SIGBLOCK3(MASK, SIG1, SIG2, SIG3) \
238  (sigemptyset (&(MASK)), \
239   sigaddset (&(MASK), (SIG1)), \
240   sigaddset (&(MASK), (SIG2)), \
241   sigaddset (&(MASK), (SIG3)), \
242   sigprocmask (SIG_BLOCK, &(MASK), &(MASK)))
243#define SIGUNBLOCK(MASK, SIG) \
244  (sigemptyset (&(MASK)), \
245   sigaddset (&(MASK), (SIG)), \
246   sigprocmask (SIG_UNBLOCK, &(MASK), &(MASK)))
247#define SIGSETMASK(MASK) sigprocmask (SIG_SETMASK, &(MASK), NULL)
248#endif
249
250#endif /* OSCONF_H_INCLUDED */
Note: See TracBrowser for help on using the repository browser.