imakemdep.h revision 39f9c979
1/* 2 3Copyright (c) 1993, 1994, 1998 The Open Group 4 5Permission to use, copy, modify, distribute, and sell this software and its 6documentation for any purpose is hereby granted without fee, provided that 7the above copyright notice appear in all copies and that both that 8copyright notice and this permission notice appear in supporting 9documentation. 10 11The above copyright notice and this permission notice shall be included in 12all copies or substantial portions of the Software. 13 14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 21Except as contained in this notice, the name of The Open Group shall not be 22used in advertising or otherwise to promote the sale, use or other dealings 23in this Software without prior written authorization from The Open Group. 24 25*/ 26 27 28/* 29 * This file contains machine-dependent constants for the imake utility. 30 * When porting imake, read each of the steps below and add in any necessary 31 * definitions. In general you should *not* edit ccimake.c or imake.c! 32 */ 33 34 35#ifdef CCIMAKE 36/* 37 * Step 1: imake_ccflags 38 * Define any special flags that will be needed to get imake.c to compile. 39 * These will be passed to the compile along with the contents of the 40 * make variable BOOTSTRAPCFLAGS. 41 */ 42# if defined(clipper) || defined(__clipper__) 43# define imake_ccflags "-O -DSYSV -DBOOTSTRAPCFLAGS=-DSYSV" 44# endif 45 46# ifdef hpux 47# ifdef hp9000s800 48# define imake_ccflags "-DSYSV" 49# else 50# define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV" 51# endif 52# endif 53 54# if defined(macII) || defined(_AUX_SOURCE) 55# define imake_ccflags "-DmacII -DSYSV" 56# endif 57 58# ifdef stellar 59# define imake_ccflags "-DSYSV" 60# endif 61 62/* 63 * SCO UnixWare and OpenServer 6 are both System V Release 5 based OSes. 64 * The native C compiler doesn't assert __UNIXWARE__ but gcc does, so 65 * we don't redefine it if we are using gcc (as it sets it to a specific 66 * value). On OpenServer 6, which is a multi-ABI world, if you attempt 67 * to build with -Kosr, then the C compiler will assert __OPENSERVER__ 68 * and set it to the value 507. That indicates an OSR5 compile, and 69 * is handled below. 70 */ 71 72# if defined(__UNIXWARE__) || defined(__USLC__) || defined(Oki) || defined(NCR) 73# ifdef imake_ccflags 74# undef imake_ccflags 75# endif 76# ifdef __UNIXWARE__ 77# ifndef __GNUC__ 78# define imake_ccflags "-Xa -DSVR4 -DSVR5 -D__UNIXWARE__" 79# else 80# define imake_ccflags "-Xa -DSVR4 -DSVR5" 81# endif 82# else 83# define imake_ccflags "-Xa -DSVR4" 84# endif 85# endif 86 87/* SCO may define __USLC__ so put this after the USL check */ 88# if defined(M_UNIX) || defined(_SCO_DS) || defined(__OPENSERVER__) 89# ifdef imake_ccflags 90# undef imake_ccflags 91# endif 92# define imake_ccflags "-DSYSV -DSCO325 -D__SCO__" 93# endif 94 95# ifdef sony 96# if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV) 97# define imake_ccflags "-DSVR4" 98# else 99# include <sys/param.h> 100# if NEWSOS < 41 101# define imake_ccflags "-Dbsd43 -DNOSTDHDRS" 102# else 103# if NEWSOS < 42 104# define imake_ccflags "-Dbsd43" 105# endif 106# endif 107# endif 108# endif 109# ifdef _CRAY 110# define imake_ccflags "-DSYSV -DUSG" 111# endif 112 113# if defined(_IBMR2) || defined(aix) 114# define imake_ccflags "-Daix -DSYSV" 115# endif 116 117# ifdef Mips 118# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43) 119# define imake_ccflags "-DBSD43" 120# else 121# define imake_ccflags "-DSYSV" 122# endif 123# endif 124 125# ifdef is68k 126# define imake_ccflags "-Dluna -Duniosb" 127# endif 128 129# ifdef SYSV386 130# ifdef SVR4 131# define imake_ccflags "-Xa -DSVR4" 132# else 133# define imake_ccflags "-DSYSV" 134# endif 135# endif 136 137# ifdef SVR4 138# ifdef i386 139# define imake_ccflags "-Xa -DSVR4" 140# endif 141# endif 142 143# ifdef SYSV 144# ifdef i386 145# define imake_ccflags "-DSYSV" 146# endif 147# endif 148 149# if defined(Lynx) || defined(__Lynx__) 150# define imake_ccflags "-DLynx" 151# endif /* Lynx */ 152 153# ifdef __convex__ 154# define imake_ccflags "-fn -tm c1" 155# endif 156 157# ifdef apollo 158# define imake_ccflags "-DX_NOT_POSIX" 159# endif 160 161# ifdef WIN32 162# ifdef __GNUC__ 163# define imake_ccflags "-D__STDC__" 164# else 165# if _MSC_VER < 1000 166# define imake_ccflags "-nologo -batch -D__STDC__" 167# else 168# define imake_ccflags "-nologo -D__STDC__" 169# endif 170# endif 171# endif 172 173# ifdef __uxp__ 174# define imake_ccflags "-DSVR4 -DANSICPP" 175# endif 176 177# ifdef __sxg__ 178# define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS" 179# endif 180 181# ifdef _SEQUENT_ 182# define imake_ccflags "-Xa -DSVR4" 183# endif 184 185# if defined(SX) || defined(PC_UX) 186# define imake_ccflags "-DSYSV" 187# endif 188 189# ifdef nec_ews_svr2 190# define imake_ccflags "-DUSG" 191# endif 192 193# if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft) 194# define imake_ccflags "-DSVR4" 195# endif 196 197# if defined(MACH) && !defined(__GNU__) 198# define imake_ccflags "-DNOSTDHDRS" 199# endif 200 201# if defined(__QNX__) && !defined(__QNXNTO__) 202# define imake_ccflags "-D__QNX__ -D_i386" 203# endif 204 205# if defined(__QNXNTO__) 206# define imake_ccflags "-D__QNXNTO__" 207# endif 208 209#else /* not CCIMAKE */ 210# ifndef MAKEDEPEND 211/* 212 * Step 2: dup2 213 * If your OS doesn't have a dup2() system call to duplicate one file 214 * descriptor onto another, define such a mechanism here (if you don't 215 * already fall under the existing category(ies). 216 */ 217# if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__) 218# define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ 219 fcntl(fd1, F_DUPFD, fd2))) 220# endif 221 222 223/* 224 * Step 3: FIXUP_CPP_WHITESPACE 225 * If your cpp collapses tabs in macro expansions into a single space and 226 * replaces escaped newlines with a space, define this symbol. This will 227 * cause imake to attempt to patch up the generated Makefile by looking 228 * for lines that have colons in them (this is why the rules file escapes 229 * all colons). One way to tell if you need this is to see whether or not 230 * your Makefiles have no tabs in them and lots of @@ strings. 231 */ 232# if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXWARE__) 233# define FIXUP_CPP_WHITESPACE 234# endif 235# ifdef WIN32 236# define REMOVE_CPP_LEADSPACE 237# define INLINE_SYNTAX 238# define MAGIC_MAKE_VARS 239# endif 240# ifdef __minix_vmd 241# define FIXUP_CPP_WHITESPACE 242# endif 243 244# if defined(Lynx) 245/* On LynxOS 2.4.0 imake gets built with the old "legacy" 246 * /bin/cc which has a rather pedantic builtin preprocessor. 247 * Using a macro which is not #defined (as in Step 5 248 * below) flags an *error* 249 */ 250# define __NetBSD_Version__ 0 251# endif 252 253/* 254 * Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP 255 * If you want to use cc -E instead of cpp, define USE_CC_E. 256 * If use cc -E but want a different compiler, define DEFAULT_CC. 257 * If the cpp you need is not in /lib/cpp, define DEFAULT_CPP. 258 */ 259# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) 260 261# if defined(__APPLE__) 262# define DEFAULT_CPP "/usr/bin/cpp" 263# define DEFAULT_CC "cc" 264# endif 265# if defined(Lynx) || defined(__Lynx__) 266# define DEFAULT_CC "gcc" 267# define USE_CC_E 268# endif 269# ifdef hpux 270# define USE_CC_E 271# endif 272# ifdef WIN32 273# define USE_CC_E 274# ifdef __GNUC__ 275# define DEFAULT_CC "gcc" 276# else 277# define DEFAULT_CC "cl" 278# endif 279# endif 280# ifdef apollo 281# define DEFAULT_CPP "/usr/lib/cpp" 282# endif 283# if defined(clipper) || defined(__clipper__) 284# define DEFAULT_CPP "/usr/lib/cpp" 285# endif 286# if defined(_IBMR2) && !defined(DEFAULT_CPP) 287# define DEFAULT_CPP "/usr/ccs/lib/cpp" 288# endif 289# ifdef __bsdi__ 290# define DEFAULT_CPP "/usr/bin/cpp" 291# endif 292# ifdef __uxp__ 293# define DEFAULT_CPP "/usr/ccs/lib/cpp" 294# endif 295# ifdef __sxg__ 296# define DEFAULT_CPP "/usr/lib/cpp" 297# endif 298# ifdef _CRAY 299# define DEFAULT_CPP "/lib/pcpp" 300# endif 301# if defined(__386BSD__) 302# define DEFAULT_CPP "/usr/libexec/cpp" 303# endif 304# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) 305# define USE_CC_E 306# endif 307# if defined(__sgi) && defined(__ANSI_CPP__) 308# define USE_CC_E 309# endif 310# if defined(MACH) && !defined(__GNU__) 311# define USE_CC_E 312# endif 313# ifdef __minix_vmd 314# define DEFAULT_CPP "/usr/lib/cpp" 315# endif 316# ifdef __CYGWIN__ 317# define DEFAULT_CC "gcc" 318# define DEFAULT_CPP "/usr/bin/cpp" 319# endif 320# if defined (__QNX__) 321# ifdef __QNXNTO__ 322# define DEFAULT_CPP "/usr/bin/cpp" 323# else 324# define DEFAULT_CPP "/usr/X11R6/bin/cpp" 325# endif 326# endif 327# if defined(__GNUC__) && !defined(USE_CC_E) 328# define USE_CC_E 329# ifndef DEFAULT_CC 330# define DEFAULT_CC "gcc" 331# endif 332# endif 333 334# endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */ 335/* 336 * Step 5: cpp_argv 337 * The following table contains the flags that should be passed 338 * whenever a Makefile is being generated. If your preprocessor 339 * doesn't predefine any unique symbols, choose one and add it to the 340 * end of this table. Then, do the following: 341 * 342 * a. Use this symbol in Imake.cf when setting MacroFile. 343 * b. Put this symbol in the definition of BootstrapCFlags in your 344 * <platform>.cf file. 345 * c. When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 346 * to the end of the command line. 347 * 348 * Note that you may define more than one symbol (useful for platforms 349 * that support multiple operating systems). 350 */ 351 352# define ARGUMENTS 50 /* number of arguments in various arrays */ 353# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) 354const char *cpp_argv[ARGUMENTS] = { 355 "cc", /* replaced by the actual program to exec */ 356 "-I.", /* add current directory to include path */ 357# if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000 358# ifdef unix 359 "-Uunix", /* remove unix symbol so that filename unix.c okay */ 360# endif 361# endif 362# if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ 363 defined(__FreeBSD__) || defined(__DragonFly__) || defined(MACH) || \ 364 defined(linux) || defined(__GNU__) || defined(__bsdi__) || \ 365 defined(__GNUC__) || defined(__GLIBC__) 366# ifdef __i386__ 367 "-D__i386__", 368# if defined(__GNUC__) && (__GNUC__ >= 3) 369 "-m32", 370# endif 371# endif 372# ifdef __i486__ 373 "-D__i486__", 374# endif 375# ifdef __i586__ 376 "-D__i586__", 377# endif 378# ifdef __i686__ 379 "-D__i686__", 380# endif 381# ifdef __k6__ 382 "-D__k6__", 383# endif 384# ifdef __ia64__ 385 "-D__ia64__", 386# endif 387# ifdef __amd64__ 388 "-D__amd64__", 389# endif 390# ifdef __x86_64__ 391 "-D__amd64__", 392# endif 393# ifdef __s390__ 394 "-D__s390__", 395# endif 396# ifdef __alpha__ 397 "-D__alpha__", 398# endif 399# ifdef __arm__ 400 "-D__arm__", 401# endif 402# ifdef __s390x__ 403 "-D__s390x__", 404# endif 405# ifdef __sparc__ 406 "-D__sparc__", 407# endif 408# ifdef __m68k__ 409 "-D__m68k__", 410# endif 411# ifdef __hppa__ 412 "-D__hppa__", 413# endif 414# ifdef __sh__ 415 "-D__sh__", 416# endif 417# ifdef __sh3__ 418 "-D__sh3__", 419# endif 420# ifdef __SH3__ 421 "-D__SH3__", 422# endif 423# ifdef __SH4__ 424 "-D__SH4__", 425# endif 426# ifdef __SH4NOFPU__ 427 "-D__SH4_NOFPU__", 428# endif 429# ifdef __GNUC__ 430 "-traditional", 431# endif 432# endif 433# ifdef M4330 434 "-DM4330", /* Tektronix */ 435# endif 436# ifdef M4310 437 "-DM4310", /* Tektronix */ 438# endif 439# if defined(macII) || defined(_AUX_SOURCE) 440 "-DmacII", /* Apple A/UX */ 441# endif 442# if defined(USL) || defined(__UNIXWARE__) || \ 443 (defined(__USLC__) && !defined(_SCO_DS)) 444 "-D__UNIXWARE__", /* SCO UnixWare 7 */ 445# endif 446# ifdef sony 447 "-Dsony", /* Sony */ 448# if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42 449 "-Dbsd43", 450# endif 451# endif 452# ifdef _IBMR2 453 "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */ 454# ifndef aix 455# define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */ 456# endif 457# endif /* _IBMR2 */ 458# ifdef aix 459 "-Daix", /* AIX instead of AOS */ 460# ifndef ibm 461# define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */ 462# endif 463# endif /* aix */ 464# ifdef ibm 465 "-Dibm", /* IBM PS/2 and RT under both AOS and AIX */ 466# endif 467# ifdef luna 468 "-Dluna", /* OMRON luna 68K and 88K */ 469# ifdef luna1 470 "-Dluna1", 471# endif 472# ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */ 473 "-traditional", /* for some older version */ 474# endif /* instead of "-DXCOMM=\\#" */ 475# ifdef uniosb 476 "-Duniosb", 477# endif 478# ifdef uniosu 479 "-Duniosu", 480# endif 481# endif /* luna */ 482# ifdef _CRAY /* Cray */ 483 "-Ucray", 484# endif 485# ifdef Mips 486 "-DMips", /* Define and use Mips for Mips Co. OS/mach. */ 487# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43) 488 "-DBSD43", /* Mips RISCOS supports two environments */ 489# else 490 "-DSYSV", /* System V environment is the default */ 491# endif 492# endif /* Mips */ 493# ifdef MOTOROLA 494 "-DMOTOROLA", /* Motorola Delta Systems */ 495# ifdef SYSV 496 "-DSYSV", 497# endif 498# ifdef SVR4 499 "-DSVR4", 500# endif 501# endif /* MOTOROLA */ 502# if defined(M_UNIX) || defined(sco) || defined(__SCO__) || \ 503 defined(_SCO_DS) || defined(__OPENSERVER__) 504 "-D__SCO__", 505 "-DSYSV", 506# endif 507# ifdef i386 508 "-Di386", 509# ifdef SVR4 510 "-DSVR4", 511# endif 512# ifdef SYSV 513 "-DSYSV", 514# ifdef ISC 515 "-DISC", 516# ifdef ISC40 517 "-DISC40", /* ISC 4.0 */ 518# else 519# ifdef ISC202 520 "-DISC202", /* ISC 2.0.2 */ 521# else 522# ifdef ISC30 523 "-DISC30", /* ISC 3.0 */ 524# else 525 "-DISC22", /* ISC 2.2.1 */ 526# endif 527# endif 528# endif 529# endif 530# if (_SCO_DS - 0 == 1) 531 "-DSCO325", 532# endif 533# if (_SCO_DS - 0 > 1) 534 "-DSCO5V6", 535# endif 536# endif 537# ifdef ESIX 538 "-DESIX", 539# endif 540# ifdef ATT 541 "-DATT", 542# endif 543# ifdef DELL 544 "-DDELL", 545# endif 546# endif 547# ifdef SYSV386 /* System V/386 folks, obsolete */ 548 "-Di386", 549# ifdef SVR4 550 "-DSVR4", 551# endif 552# ifdef ISC 553 "-DISC", 554# ifdef ISC40 555 "-DISC40", /* ISC 4.0 */ 556# else 557# ifdef ISC202 558 "-DISC202", /* ISC 2.0.2 */ 559# else 560# ifdef ISC30 561 "-DISC30", /* ISC 3.0 */ 562# else 563 "-DISC22", /* ISC 2.2.1 */ 564# endif 565# endif 566# endif 567# endif 568# if (_SCO_DS - 0 == 1) 569 "-DSCO325", 570# endif 571# if (_SCO_DS - 0 > 1) 572 "-DSCO5V6", 573# endif 574# ifdef ESIX 575 "-DESIX", 576# endif 577# ifdef ATT 578 "-DATT", 579# endif 580# ifdef DELL 581 "-DDELL", 582# endif 583# endif 584# ifdef __osf__ 585 "-D__osf__", 586# ifdef __mips__ 587 "-D__mips__", 588# endif 589# ifdef __alpha 590 "-D__alpha", 591# endif 592# ifdef __amiga__ 593 "-D__amiga__", 594# endif 595# ifdef __alpha__ 596 "-D__alpha__", 597# endif 598# ifdef __i386__ 599 "-D__i386__", 600# endif 601# ifdef __GNUC__ 602 "-traditional", 603# endif 604# endif 605# ifdef Oki 606 "-DOki", 607# endif 608# ifdef sun 609# if defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__) 610 "-DSVR4", 611# endif 612# ifdef __sparcv9 613 "-D__sparcv9", 614# endif 615# ifdef __amd64 616 "-D__amd64", 617# endif 618# endif 619# ifdef WIN32 620 "-DWIN32", 621# ifndef __GNUC__ 622 "-nologo", 623# if _MSC_VER < 1000 624 "-batch", 625# endif 626# endif 627 "-D__STDC__", 628# endif 629# ifdef NCR 630 "-DNCR", /* NCR */ 631# endif 632# ifdef linux 633 "-Dlinux", 634# endif 635# if defined(__CYGWIN__) 636 "-traditional", 637# endif 638# if defined(Lynx) || defined(__Lynx__) 639 "-traditional", 640# if 0 641 "-DLYNX", /* do we really need this?? */ 642# endif 643 "-DLynx", 644# ifdef ppc 645 "-Dppc", 646# endif 647# ifdef ppc64 648 "-Dppc64", 649# endif 650# if defined(m68k) || defined(M68k) || defined(m68040) 651 "-Dm68k", 652 "-DM68k", 653# endif 654# ifdef uSPARC1 655 "-Dsparc", 656# endif 657# endif 658# ifdef __uxp__ 659 "-D__uxp__", 660# endif 661# ifdef __sxg__ 662 "-D__sxg__", 663# endif 664# ifdef nec_ews_svr2 665 "-Dnec_ews_svr2", 666# endif 667# ifdef AMOEBA 668 "-DAMOEBA", 669# ifdef CROSS_COMPILE 670 "-DCROSS_COMPILE", 671# ifdef CROSS_i80386 672 "-Di80386", 673# endif 674# ifdef CROSS_sparc 675 "-Dsparc", 676# endif 677# ifdef CROSS_mc68000 678 "-Dmc68000", 679# endif 680# else 681# ifdef i80386 682 "-Di80386", 683# endif 684# ifdef sparc 685 "-Dsparc", 686# endif 687# ifdef mc68000 688 "-Dmc68000", 689# endif 690# endif 691# endif 692# if defined(__sgi) && defined(__ANSI_CPP__) 693 "-cckr", 694# endif 695# ifdef __minix_vmd 696 "-Dminix", 697# endif 698 699# ifdef MetroLink 700 "-DMetroLink", 701# ifdef SVR4 702 "-DSVR4", 703# endif 704# endif 705# ifdef __powerpc__ 706 "-D__powerpc__", 707# endif 708# ifdef __powerpc64__ 709 "-D__powerpc64__", 710# endif 711# ifdef PowerMAX_OS 712 "-DPowerMAX_OS", 713# endif 714# if defined (__QNX__) && !defined(__QNXNTO__) 715 "-traditional", 716 "-D__QNX__", 717# endif 718 719# if defined(__QNXNTO__) 720 "-traditional", 721 "-D__QNXNTO__", 722# if defined(i386) 723 "-Di386", 724# endif 725# if defined(__i386__) 726 "-D__i386__", 727# endif 728# if defined(PPC) 729 "-DPPC", 730# endif 731# if defined(MIPS) 732 "-DMIPS", 733# endif 734# endif 735 736# if defined(__APPLE__) 737 "-D__APPLE__", 738 "-D__DARWIN__", 739# ifdef __ppc__ 740 "-D__ppc__", 741# endif 742# ifdef __ppc64__ 743 "-D__ppc64__", 744# endif 745# ifdef __i386__ 746 "-D__i386__", 747# endif 748# endif 749}; 750# endif /* CROSSCOMPILE */ 751 752 753/* 754 * Step 6: DEFAULT_OS_MAJOR_REV, DEFAULT_OS_MINOR_REV, DEFAULT_OS_TEENY_REV, 755 * and DEFAULT_OS_NAME. 756 * If your system provides a way to generate the default major, 757 * minor, teeny, or system names at runtime add commands below. 758 * The syntax of the _REV strings is 'f fmt' where 'f' is an argument 759 * you would give to uname, and "fmt" is a scanf() format string. 760 * Supported uname arguments are "snrvm", and if you specify multiple 761 * arguments they will be separated by spaces. No more than 5 arguments 762 * may be given. Unlike uname() order of arguments matters. 763 * 764 * DEFAULT_OS_MAJOR_REV_FROB, DEFAULT_OS_MINOR_REV_FROB, 765 * DEFAULT_OS_TEENY_REV_FROB, and DEFAULT_OS_NAME_FROB can be used to 766 * modify the results of the use of the various strings. 767 */ 768# if !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP 769# if defined(aix) 770/* uname -v returns "x" (e.g. "4"), and uname -r returns "y" (e.g. "1") */ 771# define DEFAULT_OS_MAJOR_REV "v %[0-9]" 772# define DEFAULT_OS_MINOR_REV "r %[0-9]" 773/* No information available to generate default OSTeenyVersion value. */ 774# define DEFAULT_OS_NAME "srvm %[^\n]" 775# elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(sony) 776/* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */ 777# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 778# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 779# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" 780# define DEFAULT_OS_NAME "srvm %[^\n]" 781# elif defined(hpux) 782/* uname -r returns "W.x.yz", e.g. "B.10.01" */ 783# define DEFAULT_OS_MAJOR_REV "r %*[^.].%[0-9]" 784# define DEFAULT_OS_MINOR_REV "r %*[^.].%*d.%1s" 785# define DEFAULT_OS_TEENY_REV "r %*[^.].%*d.%*c%[0-9]" 786# define DEFAULT_OS_NAME "srvm %[^\n]" 787# elif defined(USL) || defined(__USLC__) || defined(__UNIXWARE__) || \ 788 defined(__SCO__) || defined(__OPENSERVER__) || defined(_SCO_DS) 789/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */ 790# define DEFAULT_OS_MAJOR_REV "v %[0-9]" 791# define DEFAULT_OS_MINOR_REV "v %*d.%1s" 792# define DEFAULT_OS_TEENY_REV "v %*d.%*c%[.0-9]" 793# define DEFAULT_OS_NAME "srvm %[^\n]" 794# elif defined(__APPLE__) 795/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */ 796# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 797# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 798# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" /* this will just get 0 */ 799# define DEFAULT_OS_NAME "s %[^\n]" 800# elif defined(__osf__) 801/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */ 802# define DEFAULT_OS_MAJOR_REV "r %*[^0-9]%[0-9]" 803# define DEFAULT_OS_MINOR_REV "r %*[^.].%[0-9]" 804# define DEFAULT_OS_NAME "srvm %[^\n]" 805# elif defined(__uxp__) 806/* NOTE: "x.y[.z]" above handles UXP/DF. This is a sample alternative. */ 807/* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */ 808# define DEFAULT_OS_MAJOR_REV "v V%[0-9]" 809# define DEFAULT_OS_MINOR_REV "v V%*dL%[0-9]" 810# define DEFAULT_OS_NAME "srvm %[^\n]" 811# elif defined(linux) || defined(__bsdi__) 812# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 813# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 814# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" 815# define DEFAULT_OS_NAME "srm %[^\n]" 816# if defined(linux) && defined (CROSSCOMPILE_CPP) 817# define CROSS_UTS_SYSNAME "Linux" 818# include <linux/version.h> 819# define CROSS_UTS_RELEASE UTS_RELEASE 820# endif 821# elif defined(__CYGWIN__) 822# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 823# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 824# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" 825# define DEFAULT_OS_NAME "srm %[^\n]" 826# if defined(__CYGWIN__) && defined (CROSSCOMPILE_CPP) 827# define CROSS_UTS_SYSNAME "Cygwin" 828# include <cygwin/version.h> 829# define CROSS_UTS_RELEASE "1.3.12" 830# endif 831# elif defined(__GNU__) 832# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 833# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 834# define DEFAULT_OS_NAME "srm %[^\n]" 835# elif defined(ISC) 836/* ISC all Versions ? */ 837/* uname -r returns "x.y", e.g. "3.2" ,uname -v returns "x" e.g. "2" */ 838# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 839# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 840# define DEFAULT_OS_TEENY_REV "v %[0-9]" 841/* # define DEFAULT_OS_NAME "srm %[^\n]" */ /* Not useful on ISC */ 842# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) 843/* BSD/OS too? */ 844/* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */ 845# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 846# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 847# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" 848# define DEFAULT_OS_NAME "srm %[^\n]" 849# if defined(__FreeBSD__) || defined(__DragonFly__) 850/* Use an alternate way to find the teeny version for -STABLE, -SNAP versions */ 851# ifndef CROSSCOMPILE_CPP 852# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \ 853 do { \ 854 if (*buf == 0) { \ 855 int __mib[2]; \ 856 size_t __len; \ 857 int __osrel; \ 858 \ 859 __mib[0] = CTL_KERN; \ 860 __mib[1] = KERN_OSRELDATE; \ 861 __len = sizeof(__osrel); \ 862 sysctl(__mib, 2, &__osrel, &__len, NULL, 0); \ 863 if (__osrel < 210000) { \ 864 if (__osrel < 199607) \ 865 buf[0] = '0'; \ 866 else if (__osrel < 199612) \ 867 buf[0] = '5'; \ 868 else if (__osrel == 199612) \ 869 buf[0] = '6'; \ 870 else \ 871 buf[0] = '8'; /* guess */ \ 872 } else { \ 873 buf[0] = ((__osrel / 1000) % 10) + '0'; \ 874 } \ 875 buf[1] = 0; \ 876 } \ 877 } while (0) 878# endif 879# else 880 /* OpenBSD - Add DEFAULT_MACHINE_ARCHITECTURE */ 881# define DEFAULT_MACHINE_ARCHITECTURE "m %[^\n]" 882# endif 883# elif defined(__NetBSD__) 884/* 885 * uname -r returns "x.y([ABCD...]|_mumble)", e.g.: 886 * 1.2 1.2_BETA 1.2A 1.2B 887 * 888 * That means that we have to do something special to turn the 889 * TEENY revision into a form that we can use (i.e., a string of 890 * decimal digits). 891 * 892 * We also frob the name DEFAULT_OS_NAME so that it looks like the 893 * 'standard' NetBSD name for the version, e.g. "NetBSD/i386 1.2B" for 894 * NetBSD 1.2B on an i386. 895 */ 896# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 897# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 898# define DEFAULT_OS_TEENY_REV "r %*d.%*d%[A-Z]" 899# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \ 900 do { \ 901 int teeny = 0; \ 902 char *ptr = (buf); \ 903 \ 904 while (*ptr >= 'A' && *ptr <= 'Z') /* sanity check */ \ 905 teeny = teeny * 26 + (int)(*ptr++ - 'A'); \ 906 \ 907 snprintf((buf), (size), "%d", teeny + 1); \ 908 } while (0) 909# define DEFAULT_OS_NAME "smr %[^\n]" 910# define DEFAULT_OS_NAME_FROB(buf, size) \ 911 do { \ 912 char *__sp; \ 913 if ((__sp = strchr((buf), ' ')) != NULL) \ 914 *__sp = '/'; \ 915 } while (0) 916# elif defined(__Lynx__) || defined(Lynx) 917/* Lynx 2.4.0 /bin/cc doesn't like #elif */ 918# define DEFAULT_OS_MAJOR_REV "r %[0-9]" 919# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" 920# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" 921# define DEFAULT_OS_NAME "srm %[^\n]" 922# elif defined(_SEQUENT_) 923/* uname -v returns 'Vx.y.z', e.g. 'V4.4.2' */ 924# define DEFAULT_OS_MAJOR_REV "v V%[0-9]" 925# define DEFAULT_OS_MINOR_REV "v V%*d.%[0-9]" 926# define DEFAULT_OS_TEENY_REV "v V%*d.%*d.%[0-9]" 927# define DEFAULT_OS_NAME "s %[^\n]" 928# endif 929# endif /* !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP */ 930 931# if defined (CROSSCOMPILE_CPP) 932# ifndef CROSS_UTS_SYSNAME 933char *cross_uts_sysname = ""; 934# else 935char *cross_uts_sysname = CROSS_UTS_SYSNAME; 936# endif 937# ifndef CROSS_UTS_RELEASE 938char* cross_uts_release = ""; 939# else 940char* cross_uts_release = CROSS_UTS_RELEASE; 941# endif 942# ifndef CROSS_UTS_MACHINE 943char *cross_uts_machine = ""; 944# else 945char *cross_uts_machine = CROSS_UTS_MACHINE; 946# endif 947# ifndef CROSS_UTS_VERSION 948char * cross_uts_version = ""; 949# else 950char * cross_uts_version = CROSS_UTS_VERSION; 951# endif 952# ifdef DEFAULT_OS_NAME 953char *defaultOsName = DEFAULT_OS_NAME; 954# else 955char *defaultOsName = NULL; 956# endif 957# ifdef DEFAULT_OS_MAJOR_REV 958char *defaultOsMajorRev = DEFAULT_OS_MAJOR_REV; 959# else 960char *defaultOsMajorRev = NULL; 961# endif 962# ifdef DEFAULT_OS_MINOR_REV 963char *defaultOsMinorRev = DEFAULT_OS_MINOR_REV; 964# else 965char *defaultOsMinorRev = NULL; 966# endif 967# ifdef DEFAULT_OS_TEENY_REV 968char *defaultOsTeenyRev = DEFAULT_OS_TEENY_REV; 969# else 970char *defaultOsTeenyRev = NULL; 971# endif 972# ifdef DEFAULT_MACHINE_ARCHITECTURE 973char *defaultMachineArchitecture = DEFAULT_MACHINE_ARCHITECTURE; 974# else 975char *defaultMachineArchitecture = NULL; 976# endif 977# ifdef DEFAULT_OS_NAME_FROB 978void defaultOsNameFrob(char *buf, int size) 979{DEFAULT_OS_NAME_FROB(buf,size)} 980# else 981void (*defaultOsNameFrob)(char *buf, int size) = NULL; 982# endif 983# ifdef DEFAULT_OS_MAJOR_REV_FROB 984void defaultOsMajorRevFrob(char *buf, int size) 985{DEFAULT_OS_MAJOR_REV_FROB(buf,size)} 986# else 987void (*defaultOsMajorRevFrob)(char *buf, int size) = NULL; 988# endif 989# ifdef DEFAULT_OS_MINOR_REV_FROB 990void defaultOsMinorRevFrob(char *buf, int size) 991{DEFAULT_OS_MINOR_REV_FROB(buf,size)} 992# else 993void (*defaultOsMinorRevFrob)(char *buf, int size) = NULL; 994# endif 995# ifdef DEFAULT_OS_TEENY_REV_FROB 996void defaultOsTeenyRevFrob(char *buf, int size) 997{DEFAULT_OS_TEENY_REV_FROB(buf,size)} 998# else 999void (*defaultOsTeenyRevFrob)(char *buf, int size) = NULL; 1000# endif 1001# endif /* CROSSCOMPILE_CPP */ 1002 1003# else /* else MAKEDEPEND */ 1004# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) 1005/* 1006 * Step 7: predefs 1007 * If your compiler and/or preprocessor define any specific symbols, add 1008 * them to the the following table. The definition of struct symtab is 1009 * in util/makedepend/def.h. 1010 */ 1011# undef DEF_EVALUATE 1012# undef DEF_STRINGIFY 1013# define DEF_EVALUATE(__x) #__x 1014# define DEF_STRINGIFY(_x) DEF_EVALUATE(_x) 1015struct symtab predefs[] = { 1016# ifdef apollo 1017 {"apollo", "1"}, 1018# endif 1019# if defined(clipper) || defined(__clipper__) 1020 {"clipper", "1"}, 1021 {"__clipper__", "1"}, 1022 {"clix", "1"}, 1023 {"__clix__", "1"}, 1024# endif 1025# ifdef ibm032 1026 {"ibm032", "1"}, 1027# endif 1028# ifdef ibm 1029 {"ibm", "1"}, 1030# endif 1031# ifdef aix 1032 {"aix", "1"}, 1033# endif 1034# ifdef sun 1035 {"sun", "1"}, 1036# endif 1037# ifdef sun2 1038 {"sun2", "1"}, 1039# endif 1040# ifdef sun3 1041 {"sun3", "1"}, 1042# endif 1043# ifdef sun4 1044 {"sun4", "1"}, 1045# endif 1046# ifdef sparc 1047 {"sparc", "1"}, 1048# endif 1049# ifdef __sparc 1050 {"__sparc", "1"}, 1051# endif 1052# ifdef __sparcv9 1053 {"__sparcv9", "1"}, 1054# endif 1055# ifdef __sparc__ 1056 {"__sparc__", "1"}, 1057# endif 1058# ifdef __sparcv9__ 1059 {"__sparcv9__", "1"}, 1060# endif 1061# ifdef hpux 1062 {"hpux", "1"}, 1063# endif 1064# ifdef __hpux 1065 {"__hpux", "1"}, 1066# endif 1067# ifdef __hp9000s800 1068 {"__hp9000s800", "1"}, 1069# endif 1070# ifdef __hp9000s700 1071 {"__hp9000s700", "1"}, 1072# endif 1073# ifdef vax 1074 {"vax", "1"}, 1075# endif 1076# ifdef VMS 1077 {"VMS", "1"}, 1078# endif 1079# ifdef cray 1080 {"cray", "1"}, 1081# endif 1082# ifdef CRAY 1083 {"CRAY", "1"}, 1084# endif 1085# ifdef _CRAY 1086 {"_CRAY", "1"}, 1087# endif 1088# ifdef att 1089 {"att", "1"}, 1090# endif 1091# ifdef mips 1092 {"mips", "1"}, 1093# endif 1094# ifdef __mips__ 1095 {"__mips__", "1"}, 1096# endif 1097# ifdef ultrix 1098 {"ultrix", "1"}, 1099# endif 1100# ifdef stellar 1101 {"stellar", "1"}, 1102# endif 1103# ifdef mc68000 1104 {"mc68000", "1"}, 1105# endif 1106# ifdef mc68020 1107 {"mc68020", "1"}, 1108# endif 1109# ifdef __GNUC__ 1110 {"__GNUC__", DEF_STRINGIFY(__GNUC__)}, 1111# endif 1112# ifdef __STRICT_ANSI__ 1113 {"__STRICT_ANSI__", "1"}, 1114# endif 1115# ifdef __STDC__ 1116 {"__STDC__", DEF_STRINGIFY(__STDC__)}, 1117# endif 1118# ifdef __HIGHC__ 1119 {"__HIGHC__", "1"}, 1120# endif 1121# ifdef __OPENSERVER__ 1122 {"__OPENSERVER__", DEF_STRINGIFY(__OPENSERVER__)}, 1123# endif 1124# ifdef _SCO_DS 1125 {"_SCO_DS", DEF_STRINGIFY(_SCO_DS)}, 1126# endif 1127# ifdef _SCO_DS_LL 1128 {"_SCO_DS_LL", DEF_STRINGIFY(_SCO_DS_LL)}, 1129# endif 1130# ifdef __SCO_VERSION__ 1131 {"__SCO_VERSION__", DEF_STRINGIFY(__SCO_VERSION__)}, 1132# endif 1133# ifdef __UNIXWARE__ 1134 {"__UNIXWARE__", DEF_STRINGIFY(__UNIXWARE__)}, 1135# endif 1136# ifdef __USLC__ 1137 {"__USLC__", DEF_STRINGIFY(__USLC__)}, 1138# endif 1139# ifdef CMU 1140 {"CMU", "1"}, 1141# endif 1142# ifdef luna 1143 {"luna", "1"}, 1144# ifdef luna1 1145 {"luna1", "1"}, 1146# endif 1147# ifdef luna2 1148 {"luna2", "1"}, 1149# endif 1150# ifdef luna88k 1151 {"luna88k", "1"}, 1152# endif 1153# ifdef uniosb 1154 {"uniosb", "1"}, 1155# endif 1156# ifdef uniosu 1157 {"uniosu", "1"}, 1158# endif 1159# endif 1160# ifdef ieeep754 1161 {"ieeep754", "1"}, 1162# endif 1163# ifdef is68k 1164 {"is68k", "1"}, 1165# endif 1166# ifdef m68k 1167 {"m68k", "1"}, 1168# endif 1169# ifdef M68k 1170 {"M68k", "1"}, 1171# endif 1172# ifdef __m68k__ 1173 {"__m68k__", "1"}, 1174# endif 1175# ifdef m88k 1176 {"m88k", "1"}, 1177# endif 1178# ifdef __m88k__ 1179 {"__m88k__", "1"}, 1180# endif 1181# ifdef bsd43 1182 {"bsd43", "1"}, 1183# endif 1184# ifdef hcx 1185 {"hcx", "1"}, 1186# endif 1187# ifdef sony 1188 {"sony", "1"}, 1189# ifdef SYSTYPE_SYSV 1190 {"SYSTYPE_SYSV", "1"}, 1191# endif 1192# ifdef _SYSTYPE_SYSV 1193 {"_SYSTYPE_SYSV", "1"}, 1194# endif 1195# endif 1196# ifdef __OSF__ 1197 {"__OSF__", "1"}, 1198# endif 1199# ifdef __osf__ 1200 {"__osf__", "1"}, 1201# endif 1202# ifdef __amiga__ 1203 {"__amiga__", "1"}, 1204# endif 1205# ifdef __alpha 1206 {"__alpha", "1"}, 1207# endif 1208# ifdef __alpha__ 1209 {"__alpha__", "1"}, 1210# endif 1211# ifdef __DECC 1212 {"__DECC", "1"}, 1213# endif 1214# ifdef __decc 1215 {"__decc", "1"}, 1216# endif 1217# ifdef __unix__ 1218 {"__unix__", "1"}, 1219# endif 1220# ifdef __uxp__ 1221 {"__uxp__", "1"}, 1222# endif 1223# ifdef __sxg__ 1224 {"__sxg__", "1"}, 1225# endif 1226# ifdef _SEQUENT_ 1227 {"_SEQUENT_", "1"}, 1228 {"__STDC__", "1"}, 1229# endif 1230# ifdef __bsdi__ 1231 {"__bsdi__", "1"}, 1232# endif 1233# ifdef nec_ews_svr2 1234 {"nec_ews_svr2", "1"}, 1235# endif 1236# ifdef nec_ews_svr4 1237 {"nec_ews_svr4", "1"}, 1238# endif 1239# ifdef _nec_ews_svr4 1240 {"_nec_ews_svr4", "1"}, 1241# endif 1242# ifdef _nec_up 1243 {"_nec_up", "1"}, 1244# endif 1245# ifdef SX 1246 {"SX", "1"}, 1247# endif 1248# ifdef nec 1249 {"nec", "1"}, 1250# endif 1251# ifdef _nec_ft 1252 {"_nec_ft", "1"}, 1253# endif 1254# ifdef PC_UX 1255 {"PC_UX", "1"}, 1256# endif 1257# ifdef sgi 1258 {"sgi", "1"}, 1259# endif 1260# ifdef __sgi 1261 {"__sgi", "1"}, 1262# endif 1263# ifdef _MIPS_FPSET 1264 {"_MIPS_FPSET", DEF_STRINGIFY(_MIPS_FPSET)}, 1265# endif 1266# ifdef _MIPS_ISA 1267 {"_MIPS_ISA", DEF_STRINGIFY(_MIPS_ISA)}, 1268# endif 1269# ifdef _MIPS_SIM 1270 {"_MIPS_SIM", DEF_STRINGIFY(_MIPS_SIM)}, 1271# endif 1272# ifdef _MIPS_SZINT 1273 {"_MIPS_SZINT", DEF_STRINGIFY(_MIPS_SZINT)}, 1274# endif 1275# ifdef _MIPS_SZLONG 1276 {"_MIPS_SZLONG", DEF_STRINGIFY(_MIPS_SZLONG)}, 1277# endif 1278# ifdef _MIPS_SZPTR 1279 {"_MIPS_SZPTR", DEF_STRINGIFY(_MIPS_SZPTR)}, 1280# endif 1281# ifdef __DragonFly__ 1282 {"__DragonFly__", "1"}, 1283# endif 1284# ifdef __FreeBSD__ 1285 {"__FreeBSD__", "1"}, 1286# endif 1287# ifdef __OpenBSD__ 1288 {"__OpenBSD__", "1"}, 1289# endif 1290# ifdef __NetBSD__ 1291 {"__NetBSD__", "1"}, 1292# endif 1293# ifdef __GNU__ 1294 {"__GNU__", "1"}, 1295# endif 1296# ifdef __ELF__ 1297 {"__ELF__", "1"}, 1298# endif 1299# if defined(__QNX__) 1300 {"__QNX__", "1"}, 1301# endif 1302# ifdef __QNXNTO__ 1303 {"__QNXNTO__", "1"}, 1304# endif 1305# ifdef __powerpc__ 1306 {"__powerpc__", "1"}, 1307# endif 1308# ifdef __powerpc64__ 1309 {"__powerpc64__", "1"}, 1310# endif 1311# ifdef PowerMAX_OS 1312 {"PowerMAX_OS", "1"}, 1313# endif 1314# ifdef ia64 1315 {"ia64", "1"}, 1316# endif 1317# ifdef __ia64__ 1318 {"__ia64__", "1"}, 1319# endif 1320# if defined (amd64) || defined (x86_64) 1321 {"amd64", "1"}, 1322 {"x86_64", "1"}, 1323# endif 1324# if defined (__amd64__) || defined (__x86_64__) 1325 {"__amd64__", "1"}, 1326 {"__x86_64__", "1"}, 1327# endif 1328# if defined (__amd64) || defined(__x86_64) 1329 {"__amd64", "1"}, 1330 {"__x86_64", "1"}, 1331# endif 1332# ifdef __x86 1333 {"__x86", "1"}, 1334# endif 1335# ifdef __i386 1336 {"__i386", "1"}, 1337# endif 1338# ifdef __i386__ 1339 {"__i386__", "1"}, 1340# endif 1341# ifdef __i486__ 1342 {"__i486__", "1"}, 1343# endif 1344# ifdef __i586__ 1345 {"__i586__", "1"}, 1346# endif 1347# ifdef __i686__ 1348 {"__i686__", "1"}, 1349# endif 1350# ifdef __k6__ 1351 {"__k6__", "1"}, 1352# endif 1353# ifdef i386 1354 {"i386", "1"}, 1355# endif 1356# ifdef i486 1357 {"i486", "1"}, 1358# endif 1359# ifdef i586 1360 {"i586", "1"}, 1361# endif 1362# ifdef i686 1363 { "i686", "1"}, 1364# endif 1365# ifdef k6 1366 {"k6", "1"}, 1367# endif 1368# ifdef sparc 1369 {"sparc", "1"}, 1370# endif 1371# ifdef __sparc__ 1372 {"__sparc__", "1"}, 1373# endif 1374# ifdef __s390__ 1375 {"__s390__", "1"}, 1376# endif 1377# ifdef __hppa__ 1378 {"__hppa__", "1"}, 1379# endif 1380# ifdef __sh__ 1381 {"__sh__", "1"}, 1382# endif 1383# ifdef __sh3_ 1384 {"__sh3__", "1"}, 1385# endif 1386# ifdef __SH3__ 1387 {"__SH3__", "1"}, 1388# endif 1389# ifdef __SH4__ 1390 {"__SH4__", "1"}, 1391# endif 1392# ifdef __SH4NOFPU__ 1393 {"__SH4NOFPU__", "1"}, 1394# endif 1395# if defined(__ppc__) 1396 {"__ppc__", "1"}, 1397# endif 1398# if defined(__ppc64__) 1399 {"__ppc64__", "1"}, 1400# endif 1401# if defined(__BIG_ENDIAN__) 1402 {"__BIG_ENDIAN__", "1"}, 1403# endif 1404# if defined(__LITTLE_ENDIAN__) 1405 {"__LITTLE_ENDIAN__", "1"}, 1406# endif 1407# if defined (__CHAR_BIT__) 1408 {"__CHAR_BIT__", DEF_STRINGIFY(__CHAR_BIT__)}, 1409# endif 1410# if defined (__BUILTIN_VA_STRUCT) 1411 {"__BUILTIN_VA_STRUCT", "1"}, 1412# endif 1413# if defined (__BUILTIN_VA_ARG_INCR) 1414 {"__BUILTIN_VA_ARG_INCR", "1"}, 1415# endif 1416 /* add any additional symbols before this line */ 1417 {NULL, NULL} 1418}; 1419# undef DEF_EVALUATE 1420# undef DEF_STRINGIFY 1421# endif /* CROSSCOMPILE */ 1422# endif /* MAKEDEPEND */ 1423 1424# ifndef MAKEDEPEND 1425# if defined (CROSSCOMPILE_CPP) 1426# ifdef USE_CC_E 1427boolean crosscompile_use_cc_e = TRUE; 1428# ifdef DEFAULT_CC 1429char* crosscompile_cpp = DEFAULT_CC; 1430# else 1431char* crosscompile_cpp = "cc"; 1432# endif 1433# else 1434boolean crosscompile_use_cc_e = FALSE; 1435# ifdef DEFAULT_CPP 1436char* crosscompile_cpp = DEFAULT_CPP; 1437# else 1438char* crosscompile_cpp = "cpp"; 1439# endif 1440# endif 1441# ifdef FIXUP_CPP_WHITESPACE 1442boolean fixup_whitespace = TRUE; 1443# else 1444boolean fixup_whitespace = FALSE; 1445# endif 1446# ifdef REMOVE_CPP_LEADSPACE 1447boolean remove_cpp_leadspace = TRUE; 1448# else 1449boolean remove_cpp_leadspace = FALSE; 1450# endif 1451# ifdef INLINE_SYNTAX 1452boolean inline_syntax = TRUE; 1453# else 1454boolean inline_syntax = FALSE; 1455# endif 1456# ifdef MAGIC_MAKE_VARS 1457boolean magic_make_vars = TRUE; 1458# else 1459boolean magic_make_vars = FALSE; 1460# endif 1461 1462typedef enum { 1463 unknown, 1464 freeBSD, 1465 netBSD, 1466 LinuX, 1467 emx, 1468 win32, 1469 dragonfly 1470} System; 1471 1472# if defined(linux) || defined(__GLIBC__) 1473System sys = LinuX; 1474# elif defined __FreeBSD__ 1475System sys = freebsd; 1476# elif defined __NetBSD__ 1477System sys = netBSD; 1478# elif defined __EMX__ 1479System sys = emx; 1480# elif defined WIN32 1481System sys = win32; 1482# elif defined __DragonFly__ 1483System sys = dragonfly; 1484# else 1485System sys = unknown; 1486# endif 1487 1488# if defined __GNUC__ 1489int gnu_c = __GNUC__; 1490int gnu_c_minor = __GNUC_MINOR__; 1491# else 1492int gnu_c = 0; 1493int gnu_c_minor = -1; 1494# endif 1495# if defined(linux) || defined(__GLIBC__) 1496# include <features.h> 1497int glibc_major = __GLIBC__ + 4; 1498int glibc_minor = __GLIBC_MINOR__; 1499# else 1500int glibc_major = 0; 1501int glibc_minor = -1; 1502# endif 1503# endif /* !CROSSCOMPILE || CROSSCOMPILE_CPP */ 1504 1505# endif /* MAKEDEPEND */ 1506 1507#endif /* CCIMAKE */ 1508