]> git.sesse.net Git - rdpsrv/blob - Xserver/config/imake/imakemdep.h
Support RDP5 logon packets.
[rdpsrv] / Xserver / config / imake / imakemdep.h
1 /* $TOG: imakemdep.h /main/101 1997/06/06 09:13:20 bill $ */
2 /*
3
4 Copyright (c) 1993, 1994  X Consortium
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the name of the X Consortium shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from the X Consortium.
26
27 */
28 /* $XFree86: xc/config/imake/imakemdep.h,v 3.24.2.3 1997/07/27 02:41:05 dawes Exp $ */
29
30
31 /* 
32  * This file contains machine-dependent constants for the imake utility.
33  * When porting imake, read each of the steps below and add in any necessary
34  * definitions.  In general you should *not* edit ccimake.c or imake.c!
35  */
36
37 #ifdef CCIMAKE
38 /*
39  * Step 1:  imake_ccflags
40  *     Define any special flags that will be needed to get imake.c to compile.
41  *     These will be passed to the compile along with the contents of the
42  *     make variable BOOTSTRAPCFLAGS.
43  */
44 #if defined(clipper) || defined(__clipper__)
45 #define imake_ccflags "-O -DSYSV -DBOOTSTRAPCFLAGS=-DSYSV"
46 #endif
47
48 #ifdef hpux
49 #ifdef hp9000s800
50 #define imake_ccflags "-DSYSV"
51 #else
52 #define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
53 #endif
54 #endif
55
56 #if defined(macII) || defined(_AUX_SOURCE)
57 #define imake_ccflags "-DmacII -DSYSV"
58 #endif
59
60 #ifdef stellar
61 #define imake_ccflags "-DSYSV"
62 #endif
63
64 #if defined(USL) || defined(__USLC__) || defined(Oki) || defined(NCR)
65 #define imake_ccflags "-Xa -DSVR4"
66 #endif
67
68 /* SCO may define __USLC__ so put this after the USL check */
69 #if defined(M_UNIX) || defined(_SCO_DS)
70 #ifdef imake_ccflags
71 #undef imake_ccflags
72 #endif
73 #define imake_ccflags "-Dsco -DSYSV"
74 #endif
75
76 #ifdef sony
77 #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
78 #define imake_ccflags "-DSVR4"
79 #else
80 #include <sys/param.h>
81 #if NEWSOS < 41
82 #define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
83 #else
84 #if NEWSOS < 42
85 #define imake_ccflags "-Dbsd43"
86 #endif
87 #endif
88 #endif
89 #endif
90
91 #ifdef _CRAY
92 #define imake_ccflags "-DSYSV -DUSG"
93 #endif
94
95 #if defined(_IBMR2) || defined(aix)
96 #define imake_ccflags "-Daix -DSYSV"
97 #endif
98
99 #ifdef Mips
100 #  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
101 #    define imake_ccflags "-DBSD43"
102 #  else 
103 #    define imake_ccflags "-DSYSV"
104 #  endif
105 #endif 
106
107 #ifdef is68k
108 #define imake_ccflags "-Dluna -Duniosb"
109 #endif
110
111 #ifdef SYSV386
112 # ifdef SVR4
113 #  define imake_ccflags "-Xa -DSVR4"
114 # else
115 #  define imake_ccflags "-DSYSV"
116 # endif
117 #endif
118
119 #ifdef SVR4
120 # ifdef i386
121 #  define imake_ccflags "-Xa -DSVR4"
122 # endif
123 #endif
124
125 #ifdef SYSV
126 # ifdef i386
127 #  define imake_ccflags "-DSYSV"
128 # endif
129 #endif
130
131 #ifdef __convex__
132 #define imake_ccflags "-fn -tm c1"
133 #endif
134
135 #ifdef apollo
136 #define imake_ccflags "-DX_NOT_POSIX"
137 #endif
138
139 #ifdef WIN32
140 #if _MSC_VER < 1000
141 #define imake_ccflags "-nologo -batch -D__STDC__"
142 #else
143 #define imake_ccflags "-nologo -D__STDC__"
144 #endif
145 #endif
146
147 #ifdef __uxp__
148 #define imake_ccflags "-DSVR4 -DANSICPP"
149 #endif
150
151 #ifdef __sxg__
152 #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
153 #endif
154
155 #ifdef sequent
156 #define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
157 #endif
158
159 #ifdef _SEQUENT_
160 #define imake_ccflags "-DSYSV -DUSG"
161 #endif
162
163 #if defined(SX) || defined(PC_UX)
164 #define imake_ccflags "-DSYSV"
165 #endif
166
167 #ifdef nec_ews_svr2
168 #define imake_ccflags "-DUSG"
169 #endif
170
171 #if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
172 #define imake_ccflags "-DSVR4"
173 #endif
174
175 #ifdef  MACH
176 #define imake_ccflags "-DNOSTDHDRS"
177 #endif
178
179 /* this is for OS/2 under EMX. This won't work with DOS */
180 #if defined(__EMX__)
181 #define imake_ccflags "-DBSD43"
182 #endif
183
184 #else /* not CCIMAKE */
185 #ifndef MAKEDEPEND
186 /*
187  * Step 2:  dup2
188  *     If your OS doesn't have a dup2() system call to duplicate one file
189  *     descriptor onto another, define such a mechanism here (if you don't
190  *     already fall under the existing category(ies).
191  */
192 #if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(sco)
193 #define dup2(fd1,fd2)   ((fd1 == fd2) ? fd1 : (close(fd2), \
194                                                fcntl(fd1, F_DUPFD, fd2)))
195 #endif
196
197
198 /*
199  * Step 3:  FIXUP_CPP_WHITESPACE
200  *     If your cpp collapses tabs macro expansions into a single space and
201  *     replaces escaped newlines with a space, define this symbol.  This will
202  *     cause imake to attempt to patch up the generated Makefile by looking
203  *     for lines that have colons in them (this is why the rules file escapes
204  *     all colons).  One way to tell if you need this is to see whether or not
205  *     your Makefiles have no tabs in them and lots of @@ strings.
206  */
207 #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || (defined(AMOEBA) && defined(CROSS_COMPILE))
208 #define FIXUP_CPP_WHITESPACE
209 #endif
210 #ifdef WIN32
211 #define REMOVE_CPP_LEADSPACE
212 #define INLINE_SYNTAX
213 #define MAGIC_MAKE_VARS
214 #endif
215 #ifdef __minix_vmd
216 #define FIXUP_CPP_WHITESPACE
217 #endif
218
219 /*
220  * Step 4:  USE_CC_E, DEFAULT_CC, DEFAULT_CPP
221  *     If you want to use cc -E instead of cpp, define USE_CC_E.
222  *     If use cc -E but want a different compiler, define DEFAULT_CC.
223  *     If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
224  */
225 #ifdef hpux
226 #define USE_CC_E
227 #endif
228 #ifdef WIN32
229 #define USE_CC_E
230 #define DEFAULT_CC "cl"
231 #endif
232 #ifdef apollo
233 #define DEFAULT_CPP "/usr/lib/cpp"
234 #endif
235 #if defined(clipper) || defined(__clipper__)
236 #define DEFAULT_CPP "/usr/lib/cpp"
237 #endif
238 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
239 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
240 #endif
241 #if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
242 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
243 #endif
244 #ifdef __bsdi__
245 #define DEFAULT_CPP "/usr/bin/cpp"
246 #endif
247 #ifdef __uxp__
248 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
249 #endif
250 #ifdef __sxg__
251 #define DEFAULT_CPP "/usr/lib/cpp"
252 #endif
253 #ifdef _CRAY
254 #define DEFAULT_CPP "/lib/pcpp"
255 #endif
256 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
257 #define DEFAULT_CPP "/usr/libexec/cpp"
258 #endif
259 #if defined(__sgi) && defined(__ANSI_CPP__)
260 #define USE_CC_E
261 #endif
262 #ifdef  MACH
263 #define USE_CC_E
264 #endif
265 #ifdef __minix_vmd
266 #define DEFAULT_CPP "/usr/lib/cpp"
267 #endif
268 #if defined(__EMX__)
269 /* expects cpp in PATH */
270 #define DEFAULT_CPP "cpp"
271 #endif
272
273 /*
274  * Step 5:  cpp_argv
275  *     The following table contains the flags that should be passed
276  *     whenever a Makefile is being generated.  If your preprocessor 
277  *     doesn't predefine any unique symbols, choose one and add it to the
278  *     end of this table.  Then, do the following:
279  * 
280  *         a.  Use this symbol in Imake.tmpl when setting MacroFile.
281  *         b.  Put this symbol in the definition of BootstrapCFlags in your
282  *             <platform>.cf file.
283  *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
284  *             to the end of the command line.
285  * 
286  *     Note that you may define more than one symbol (useful for platforms 
287  *     that support multiple operating systems).
288  */
289
290 #define ARGUMENTS 50    /* number of arguments in various arrays */
291 char *cpp_argv[ARGUMENTS] = {
292         "cc",           /* replaced by the actual program to exec */
293         "-I.",          /* add current directory to include path */
294 #ifdef unix
295         "-Uunix",       /* remove unix symbol so that filename unix.c okay */
296 #endif
297 #if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH)
298 # ifdef __i386__
299         "-D__i386__",
300 # endif
301 # ifdef __GNUC__
302         "-traditional",
303 # endif
304 #endif
305 #ifdef M4330
306         "-DM4330",      /* Tektronix */
307 #endif
308 #ifdef M4310
309         "-DM4310",      /* Tektronix */
310 #endif
311 #if defined(macII) || defined(_AUX_SOURCE)
312         "-DmacII",      /* Apple A/UX */
313 #endif
314 #if defined(USL) || defined(__USLC__)
315         "-DUSL",        /* USL */
316 #endif
317 #ifdef sony
318         "-Dsony",       /* Sony */
319 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
320         "-Dbsd43",
321 #endif
322 #endif
323 #ifdef _IBMR2
324         "-D_IBMR2",     /* IBM RS-6000 (we ensured that aix is defined above */
325 #ifndef aix
326 #define aix             /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
327 #endif
328 #endif /* _IBMR2 */
329 #ifdef aix
330         "-Daix",        /* AIX instead of AOS */
331 #ifndef ibm
332 #define ibm             /* allow BOOTSTRAPCFLAGS="-Daix" */
333 #endif
334 #endif /* aix */
335 #ifdef ibm
336         "-Dibm",        /* IBM PS/2 and RT under both AOS and AIX */
337 #endif
338 #ifdef luna
339         "-Dluna",       /* OMRON luna 68K and 88K */
340 #ifdef luna1
341         "-Dluna1",
342 #endif
343 #ifdef luna88k          /* need not on UniOS-Mach Vers. 1.13 */
344         "-traditional", /* for some older version            */
345 #endif                  /* instead of "-DXCOMM=\\#"          */
346 #ifdef uniosb
347         "-Duniosb",
348 #endif
349 #ifdef uniosu
350         "-Duniosu",
351 #endif
352 #endif /* luna */
353 #ifdef _CRAY            /* Cray */
354         "-Ucray",
355 #endif
356 #ifdef Mips
357         "-DMips",       /* Define and use Mips for Mips Co. OS/mach. */
358 # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
359         "-DBSD43",      /* Mips RISCOS supports two environments */
360 # else
361         "-DSYSV",       /* System V environment is the default */
362 # endif
363 #endif /* Mips */
364 #ifdef MOTOROLA
365         "-DMOTOROLA",    /* Motorola Delta Systems */
366 # ifdef SYSV
367         "-DSYSV", 
368 # endif
369 # ifdef SVR4
370         "-DSVR4",
371 # endif
372 #endif /* MOTOROLA */
373 #if defined(M_UNIX) || defined(sco)
374         "-Dsco",
375         "-DSYSV",
376 #endif
377 #ifdef i386
378         "-Di386",
379 # ifdef SVR4
380         "-DSVR4",
381 # endif
382 # ifdef SYSV
383         "-DSYSV",
384 #  ifdef ISC
385         "-DISC",
386 #   ifdef ISC40
387         "-DISC40",       /* ISC 4.0 */
388 #   else
389 #    ifdef ISC202
390         "-DISC202",      /* ISC 2.0.2 */
391 #    else
392 #     ifdef ISC30
393         "-DISC30",       /* ISC 3.0 */
394 #     else
395         "-DISC22",       /* ISC 2.2.1 */
396 #     endif
397 #    endif
398 #   endif
399 #  endif
400 #  ifdef SCO
401         "-DSCO",
402 #   ifdef _SCO_DS
403     "-DSCO325 -DSVR4",
404 #   endif
405 #  endif
406 # endif
407 # ifdef ESIX
408         "-DESIX",
409 # endif
410 # ifdef ATT
411         "-DATT",
412 # endif
413 # ifdef DELL
414         "-DDELL",
415 # endif
416 #endif
417 #ifdef SYSV386           /* System V/386 folks, obsolete */
418         "-Di386",
419 # ifdef SVR4
420         "-DSVR4",
421 # endif
422 # ifdef ISC
423         "-DISC",
424 #  ifdef ISC40
425         "-DISC40",       /* ISC 4.0 */
426 #  else
427 #   ifdef ISC202
428         "-DISC202",      /* ISC 2.0.2 */
429 #   else
430 #    ifdef ISC30
431         "-DISC30",       /* ISC 3.0 */
432 #    else
433         "-DISC22",       /* ISC 2.2.1 */
434 #    endif
435 #   endif
436 #  endif
437 # endif
438 # ifdef SCO
439         "-DSCO",
440 #  ifdef _SCO_DS
441         "-DSCO325 -DSVR4",
442 #  endif
443 # endif
444 # ifdef ESIX
445         "-DESIX",
446 # endif
447 # ifdef ATT
448         "-DATT",
449 # endif
450 # ifdef DELL
451         "-DDELL",
452 # endif
453 #endif
454 #ifdef __osf__
455         "-D__osf__",
456 # ifdef __mips__
457         "-D__mips__",
458 # endif
459 # ifdef __alpha
460         "-D__alpha",
461 # endif
462 # ifdef __alpha__
463         "-D__alpha__",
464 # endif
465 # ifdef __i386__
466         "-D__i386__",
467 # endif
468 # ifdef __s390__
469         "-D__s390__",
470 # endif
471 # ifdef __GNUC__
472         "-traditional",
473 # endif
474 #endif
475 #ifdef Oki
476         "-DOki",
477 #endif
478 #ifdef sun
479 #if defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__)
480         "-DSVR4",
481 #endif
482 #endif
483 #ifdef WIN32
484         "-DWIN32",
485         "-nologo",
486 #if _MSC_VER < 1000
487         "-batch",
488 #endif
489         "-D__STDC__",
490 #endif
491 #ifdef NCR
492         "-DNCR",        /* NCR */
493 #endif
494 #ifdef linux
495         "-traditional",
496         "-Dlinux",
497 #endif
498 #ifdef __uxp__
499         "-D__uxp__",
500 #endif
501 #ifdef __sxg__
502         "-D__sxg__",
503 #endif
504 #ifdef nec_ews_svr2
505         "-Dnec_ews_svr2",
506 #endif
507 #ifdef AMOEBA
508         "-DAMOEBA",
509 # ifdef CROSS_COMPILE
510         "-DCROSS_COMPILE",
511 #  ifdef CROSS_i80386
512         "-Di80386",
513 #  endif
514 #  ifdef CROSS_sparc
515         "-Dsparc",
516 #  endif
517 #  ifdef CROSS_mc68000
518         "-Dmc68000",
519 #  endif
520 # else
521 #  ifdef i80386
522         "-Di80386",
523 #  endif
524 #  ifdef sparc
525         "-Dsparc",
526 #  endif
527 #  ifdef mc68000
528         "-Dmc68000",
529 #  endif
530 # endif
531 #endif
532 #if defined(__sgi) && defined(__ANSI_CPP__)
533         "-cckr",
534 #endif
535 #ifdef __minix_vmd
536         "-Dminix",
537 #endif
538
539 #if defined(__EMX__)
540         "-traditional",
541         "-Demxos2",
542 #endif
543
544 };
545
546
547 /*
548  * Step 6: DEFAULT_OS_MAJOR_REV, DEFAULT_OS_MINOR_REV, DEFAULT_OS_TEENY_REV,
549  *      and DEFAULT_OS_NAME.
550  *      If your systems provides a way to generate the default major,
551  *      minor, teeny, or system names at runtime add commands below.
552  *      The syntax of the _REV strings is 'f fmt' where 'f' is an argument
553  *      you would give to uname, and "fmt" is a scanf() format string.
554  *      Supported uname arguments are "snrvm", and if you specify multiple
555  *      arguments they will be separated by spaces.  No more than 5 arguments
556  *      may be given.  Unlike uname() order of arguments matters.
557  *
558  *      DEFAULT_OS_MAJOR_REV_FROB, DEFAULT_OS_MINOR_REV_FROB,
559  *      DEFAULT_OS_TEENY_REV_FROB, and DEFAULT_OS_NAME_FROB can be used to
560  *      modify the results of the use of the various strings.
561  */
562 #if defined(aix)
563 /* uname -v returns "x" (e.g. "4"), and uname -r returns "y" (e.g. "1") */
564 # define DEFAULT_OS_MAJOR_REV   "v %[0-9]"
565 # define DEFAULT_OS_MINOR_REV   "r %[0-9]"
566 /* No information available to generate default OSTeenyVersion value. */
567 # define DEFAULT_OS_NAME        "srvm %[^\n]"
568 #elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(sony)
569 /* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */
570 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
571 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
572 # define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
573 # define DEFAULT_OS_NAME        "srvm %[^\n]"
574 #elif defined(hpux)
575 /* uname -r returns "W.x.yz", e.g. "B.10.01" */
576 # define DEFAULT_OS_MAJOR_REV   "r %*[^.].%[0-9]"
577 # define DEFAULT_OS_MINOR_REV   "r %*[^.].%*d.%1s"
578 # define DEFAULT_OS_TEENY_REV   "r %*[^.].%*d.%*c%[0-9]"
579 # define DEFAULT_OS_NAME        "srvm %[^\n]"
580 #elif defined(USL) || defined(__USLC__)
581 /* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
582 # define DEFAULT_OS_MAJOR_REV   "v %[0-9]"
583 # define DEFAULT_OS_MINOR_REV   "v %*d.%1s"
584 # define DEFAULT_OS_TEENY_REV   "v %*d.%*c%[.0-9]"
585 # define DEFAULT_OS_NAME        "srvm %[^\n]"
586 #elif defined(__osf__)
587 /* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
588 # define DEFAULT_OS_MAJOR_REV   "r %*[^0-9]%[0-9]"
589 # define DEFAULT_OS_MINOR_REV   "r %*[^.].%[0-9]"
590 # define DEFAULT_OS_NAME        "srvm %[^\n]"
591 #elif defined(__uxp__)
592 /* NOTE: "x.y[.z]" above handles UXP/DF.  This is a sample alternative. */
593 /* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */
594 # define DEFAULT_OS_MAJOR_REV   "v V%[0-9]"
595 # define DEFAULT_OS_MINOR_REV   "v V%*dL%[0-9]"
596 # define DEFAULT_OS_NAME        "srvm %[^\n]"
597 #elif defined(linux)
598 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
599 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
600 # define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
601 # define DEFAULT_OS_NAME        "srm %[^\n]"
602 #elif defined(ISC)
603 /* ISC all Versions ? */
604 /* uname -r returns "x.y", e.g. "3.2" ,uname -v returns "x" e.g. "2" */
605 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
606 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
607 # define DEFAULT_OS_TEENY_REV   "v %[0-9]" 
608 /* # define DEFAULT_OS_NAME        "srm %[^\n]" */ /* Not useful on ISC */
609 #elif defined(__FreeBSD__) || defined(__OpenBSD__)
610 /* BSD/OS too? */
611 /* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
612 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
613 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
614 # define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]" 
615 # define DEFAULT_OS_NAME        "srm %[^\n]"
616 # if defined(__FreeBSD__)
617 /* Use an alternate way to find the teeny version for -STABLE, -SNAP versions */
618 #  define DEFAULT_OS_TEENY_REV_FROB(buf, size)                          \
619     do {                                                                \
620         if (*buf == 0) {                                                \
621                 int __mib[2];                                           \
622                 size_t __len;                                           \
623                 int __osrel;                                            \
624                                                                         \
625                 __mib[0] = CTL_KERN;                                    \
626                 __mib[1] = KERN_OSRELDATE;                              \
627                 __len = sizeof(__osrel);                                \
628                 sysctl(__mib, 2, &__osrel, &__len, NULL, 0);            \
629                 if (__osrel < 210000) {                                 \
630                         if (__osrel < 199607)                           \
631                                 buf[0] = '0';                           \
632                         else if (__osrel < 199612)                      \
633                                 buf[0] = '5';                           \
634                         else if (__osrel == 199612)                     \
635                                 buf[0] = '6';                           \
636                         else                                            \
637                                 buf[0] = '8'; /* guess */               \
638                 } else {                                                \
639                         buf[0] = ((__osrel / 1000) % 10) + '0';         \
640                 }                                                       \
641                 buf[1] = 0;                                             \
642         }                                                               \
643     } while (0)
644 # else
645    /* OpenBSD - Add DEFAULT_MACHINE_ARCHITECTURE */
646 #  define DEFAULT_MACHINE_ARCHITECTURE "m %[^\n]"
647 # endif
648 #elif defined(__NetBSD__)
649 /*
650  * uname -r returns "x.y([ABCD...]|_mumble)", e.g.:
651  *      1.2     1.2_BETA        1.2A    1.2B
652  *
653  * That means that we have to do something special to turn the
654  * TEENY revision into a form that we can use (i.e., a string of
655  * decimal digits).
656  *
657  * We also frob the name DEFAULT_OS_NAME so that it looks like the
658  * 'standard' NetBSD name for the version, e.g. "NetBSD/i386 1.2B" for
659  * NetBSD 1.2B on an i386.
660  */
661 # define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
662 # define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
663 # define DEFAULT_OS_TEENY_REV   "r %*d.%*d%[A-Z]" 
664 # define DEFAULT_OS_TEENY_REV_FROB(buf, size)                           \
665     do {                                                                \
666         if (*(buf) >= 'A' && *(buf) <= 'Z') /* sanity check */          \
667                 snprintf((buf), (size), "%d", *(buf) - 'A' + 1);        \
668         else                                                            \
669             *(buf) = '\0';                                              \
670     } while (0)
671 # define DEFAULT_OS_NAME        "smr %[^\n]"
672 # define DEFAULT_OS_NAME_FROB(buf, size)                                \
673     do {                                                                \
674         char *__sp;                                                     \
675         if ((__sp = strchr((buf), ' ')) != NULL)                        \
676                 *__sp = '/';                                            \
677     } while (0)
678 #endif
679
680 #else /* else MAKEDEPEND */
681 /*
682  * Step 7:  predefs
683  *     If your compiler and/or preprocessor define any specific symbols, add
684  *     them to the the following table.  The definition of struct symtab is
685  *     in util/makedepend/def.h.
686  */
687 struct symtab   predefs[] = {
688 #ifdef apollo
689         {"apollo", "1"},
690 #endif
691 #if defined(clipper) || defined(__clipper__)
692         {"clipper", "1"},
693         {"__clipper__", "1"},
694         {"clix", "1"},
695         {"__clix__", "1"},
696 #endif
697 #ifdef ibm032
698         {"ibm032", "1"},
699 #endif
700 #ifdef ibm
701         {"ibm", "1"},
702 #endif
703 #ifdef aix
704         {"aix", "1"},
705 #endif
706 #ifdef sun
707         {"sun", "1"},
708 #endif
709 #ifdef sun2
710         {"sun2", "1"},
711 #endif
712 #ifdef sun3
713         {"sun3", "1"},
714 #endif
715 #ifdef sun4
716         {"sun4", "1"},
717 #endif
718 #ifdef sparc
719         {"sparc", "1"},
720 #endif
721 #ifdef __sparc__
722         {"__sparc__", "1"},
723 #endif
724 #ifdef hpux
725         {"hpux", "1"},
726 #endif
727 #ifdef __hpux
728         {"__hpux", "1"},
729 #endif
730 #ifdef __hp9000s800
731         {"__hp9000s800", "1"},
732 #endif
733 #ifdef __hp9000s700
734         {"__hp9000s700", "1"},
735 #endif
736 #ifdef vax
737         {"vax", "1"},
738 #endif
739 #ifdef VMS
740         {"VMS", "1"},
741 #endif
742 #ifdef cray
743         {"cray", "1"},
744 #endif
745 #ifdef CRAY
746         {"CRAY", "1"},
747 #endif
748 #ifdef _CRAY
749         {"_CRAY", "1"},
750 #endif
751 #ifdef att
752         {"att", "1"},
753 #endif
754 #ifdef mips
755         {"mips", "1"},
756 #endif
757 #ifdef __mips__
758         {"__mips__", "1"},
759 #endif
760 #ifdef ultrix
761         {"ultrix", "1"},
762 #endif
763 #ifdef stellar
764         {"stellar", "1"},
765 #endif
766 #ifdef mc68000
767         {"mc68000", "1"},
768 #endif
769 #ifdef mc68020
770         {"mc68020", "1"},
771 #endif
772 #ifdef __GNUC__
773         {"__GNUC__", "1"},
774 #endif
775 #if __STDC__
776         {"__STDC__", "1"},
777 #endif
778 #ifdef __HIGHC__
779         {"__HIGHC__", "1"},
780 #endif
781 #ifdef CMU
782         {"CMU", "1"},
783 #endif
784 #ifdef luna
785         {"luna", "1"},
786 #ifdef luna1
787         {"luna1", "1"},
788 #endif
789 #ifdef luna2
790         {"luna2", "1"},
791 #endif
792 #ifdef luna88k
793         {"luna88k", "1"},
794 #endif
795 #ifdef uniosb
796         {"uniosb", "1"},
797 #endif
798 #ifdef uniosu
799         {"uniosu", "1"},
800 #endif
801 #endif
802 #ifdef ieeep754
803         {"ieeep754", "1"},
804 #endif
805 #ifdef is68k
806         {"is68k", "1"},
807 #endif
808 #ifdef m68k
809         {"m68k", "1"},
810 #endif
811 #ifdef m88k
812         {"m88k", "1"},
813 #endif
814 #ifdef __m88k__
815         {"__m88k__", "1"},
816 #endif
817 #ifdef bsd43
818         {"bsd43", "1"},
819 #endif
820 #ifdef hcx
821         {"hcx", "1"},
822 #endif
823 #ifdef sony
824         {"sony", "1"},
825 #ifdef SYSTYPE_SYSV
826         {"SYSTYPE_SYSV", "1"},
827 #endif
828 #ifdef _SYSTYPE_SYSV
829         {"_SYSTYPE_SYSV", "1"},
830 #endif
831 #endif
832 #ifdef __OSF__
833         {"__OSF__", "1"},
834 #endif
835 #ifdef __osf__
836         {"__osf__", "1"},
837 #endif
838 #ifdef __alpha
839         {"__alpha", "1"},
840 #endif
841 #ifdef __alpha__
842         {"__alpha__", "1"},
843 #endif
844 #ifdef __DECC
845         {"__DECC",  "1"},
846 #endif
847 #ifdef __decc
848         {"__decc",  "1"},
849 #endif
850 #ifdef __unix__
851         {"__unix__", "1"},
852 #endif
853 #ifdef __uxp__
854         {"__uxp__", "1"},
855 #endif
856 #ifdef __sxg__
857         {"__sxg__", "1"},
858 #endif
859 #ifdef _SEQUENT_
860         {"_SEQUENT_", "1"},
861         {"__STDC__", "1"},
862 #endif
863 #ifdef __bsdi__
864         {"__bsdi__", "1"},
865 #endif
866 #ifdef nec_ews_svr2
867         {"nec_ews_svr2", "1"},
868 #endif
869 #ifdef nec_ews_svr4
870         {"nec_ews_svr4", "1"},
871 #endif
872 #ifdef _nec_ews_svr4
873         {"_nec_ews_svr4", "1"},
874 #endif
875 #ifdef _nec_up
876         {"_nec_up", "1"},
877 #endif
878 #ifdef SX
879         {"SX", "1"},
880 #endif
881 #ifdef nec
882         {"nec", "1"},
883 #endif
884 #ifdef _nec_ft
885         {"_nec_ft", "1"},
886 #endif
887 #ifdef PC_UX
888         {"PC_UX", "1"},
889 #endif
890 #ifdef sgi
891         {"sgi", "1"},
892 #endif
893 #ifdef __sgi
894         {"__sgi", "1"},
895 #endif
896 #ifdef __FreeBSD__
897         {"__FreeBSD__", "1"},
898 #endif
899 #ifdef __OpenBSD__
900         {"__OpenBSD__", "1"},
901 #endif
902 #ifdef __NetBSD__
903         {"__NetBSD__", "1"},
904 #endif
905 #ifdef __ELF__
906         {"__ELF__", "1"},
907 #endif
908 #ifdef __EMX__
909         {"__EMX__", "1"},
910 #endif
911         /* add any additional symbols before this line */
912         {NULL, NULL}
913 };
914
915 #endif /* MAKEDEPEND */
916 #endif /* CCIMAKE */