xenocara/util/imake/imakemdep.h

1530 lines
36 KiB
C
Raw Normal View History

2006-11-25 09:15:45 -07:00
/*
Copyright (c) 1993, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
2010-04-17 12:41:16 -06:00
/*
2006-11-25 09:15:45 -07:00
* This file contains machine-dependent constants for the imake utility.
* When porting imake, read each of the steps below and add in any necessary
* definitions. In general you should *not* edit ccimake.c or imake.c!
*/
#ifdef __UNIXOS2__
2010-04-17 12:41:16 -06:00
# define lstat stat
2006-11-25 09:15:45 -07:00
#endif
#ifdef CCIMAKE
/*
* Step 1: imake_ccflags
* Define any special flags that will be needed to get imake.c to compile.
* These will be passed to the compile along with the contents of the
* make variable BOOTSTRAPCFLAGS.
*/
2010-04-17 12:41:16 -06:00
# if defined(clipper) || defined(__clipper__)
# define imake_ccflags "-O -DSYSV -DBOOTSTRAPCFLAGS=-DSYSV"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef hpux
# ifdef hp9000s800
# define imake_ccflags "-DSYSV"
# else
# define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
# endif
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(macII) || defined(_AUX_SOURCE)
# define imake_ccflags "-DmacII -DSYSV"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef stellar
# define imake_ccflags "-DSYSV"
# endif
2006-11-25 09:15:45 -07:00
/*
* SCO UnixWare and OpenServer 6 are both System V Release 5 based OSes.
* The native C compiler doesn't assert __UNIXWARE__ but gcc does, so
* we don't redefine it if we are using gcc (as it sets it to a specific
* value). On OpenServer 6, which is a multi-ABI world, if you attempt
* to build with -Kosr, then the C compiler will assert __OPENSERVER__
* and set it to the value 507. That indicates an OSR5 compile, and
* is handled below.
*/
2010-04-17 12:41:16 -06:00
# if defined(__UNIXWARE__) || defined(__USLC__) || defined(Oki) || defined(NCR)
# ifdef imake_ccflags
# undef imake_ccflags
# endif
# ifdef __UNIXWARE__
# ifndef __GNUC__
# define imake_ccflags "-Xa -DSVR4 -DSVR5 -D__UNIXWARE__"
# else
# define imake_ccflags "-Xa -DSVR4 -DSVR5"
# endif
2006-11-25 09:15:45 -07:00
# else
2010-04-17 12:41:16 -06:00
# define imake_ccflags "-Xa -DSVR4"
2006-11-25 09:15:45 -07:00
# endif
# endif
/* SCO may define __USLC__ so put this after the USL check */
2010-04-17 12:41:16 -06:00
# if defined(M_UNIX) || defined(_SCO_DS) || defined(__OPENSERVER__)
# ifdef imake_ccflags
# undef imake_ccflags
# endif
# define imake_ccflags "-DSYSV -DSCO325 -D__SCO__"
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# ifdef sony
# if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
# define imake_ccflags "-DSVR4"
# else
# include <sys/param.h>
# if NEWSOS < 41
# define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
# else
# if NEWSOS < 42
# define imake_ccflags "-Dbsd43"
# endif
# endif
# endif
# endif
# ifdef _CRAY
# define imake_ccflags "-DSYSV -DUSG"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(_IBMR2) || defined(aix)
# define imake_ccflags "-Daix -DSYSV"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef Mips
2006-11-25 09:15:45 -07:00
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
2010-04-17 12:41:16 -06:00
# define imake_ccflags "-DBSD43"
# else
# define imake_ccflags "-DSYSV"
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef is68k
# define imake_ccflags "-Dluna -Duniosb"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef SYSV386
# ifdef SVR4
# define imake_ccflags "-Xa -DSVR4"
# else
# define imake_ccflags "-DSYSV"
# endif
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# ifdef SVR4
# ifdef i386
# define imake_ccflags "-Xa -DSVR4"
# endif
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# ifdef SYSV
# ifdef i386
# define imake_ccflags "-DSYSV"
# endif
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# if defined(Lynx) || defined(__Lynx__)
# define imake_ccflags "-DLynx"
# endif /* Lynx */
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef __convex__
# define imake_ccflags "-fn -tm c1"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef apollo
# define imake_ccflags "-DX_NOT_POSIX"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef WIN32
# ifdef __GNUC__
# define imake_ccflags "-D__STDC__"
# else
# if _MSC_VER < 1000
# define imake_ccflags "-nologo -batch -D__STDC__"
# else
# define imake_ccflags "-nologo -D__STDC__"
# endif
# endif
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef __uxp__
# define imake_ccflags "-DSVR4 -DANSICPP"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef __sxg__
# define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef _SEQUENT_
# define imake_ccflags "-Xa -DSVR4"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(SX) || defined(PC_UX)
# define imake_ccflags "-DSYSV"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# ifdef nec_ews_svr2
# define imake_ccflags "-DUSG"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
# define imake_ccflags "-DSVR4"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(MACH) && !defined(__GNU__)
# define imake_ccflags "-DNOSTDHDRS"
# endif
2006-11-25 09:15:45 -07:00
/* this is for OS/2 under UNIXOS2. This won't work with DOS */
2010-04-17 12:41:16 -06:00
# if defined(__UNIXOS2__)
# define imake_ccflags "-DBSD43"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(__QNX__) && !defined(__QNXNTO__)
# define imake_ccflags "-D__QNX__ -D_i386"
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(__QNXNTO__)
# define imake_ccflags "-D__QNXNTO__"
# endif
2006-11-25 09:15:45 -07:00
#else /* not CCIMAKE */
2010-04-17 12:41:16 -06:00
# ifndef MAKEDEPEND
2006-11-25 09:15:45 -07:00
/*
* Step 2: dup2
* If your OS doesn't have a dup2() system call to duplicate one file
* descriptor onto another, define such a mechanism here (if you don't
* already fall under the existing category(ies).
*/
2010-04-17 12:41:16 -06:00
# if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__)
# define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
2006-11-25 09:15:45 -07:00
fcntl(fd1, F_DUPFD, fd2)))
2010-04-17 12:41:16 -06:00
# endif
2006-11-25 09:15:45 -07:00
/*
* Step 3: FIXUP_CPP_WHITESPACE
* If your cpp collapses tabs in macro expansions into a single space and
* replaces escaped newlines with a space, define this symbol. This will
* cause imake to attempt to patch up the generated Makefile by looking
* for lines that have colons in them (this is why the rules file escapes
* all colons). One way to tell if you need this is to see whether or not
* your Makefiles have no tabs in them and lots of @@ strings.
*/
2010-04-17 12:41:16 -06:00
# if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__) || defined(__UNIXWARE__)
# define FIXUP_CPP_WHITESPACE
# endif
# ifdef WIN32
# define REMOVE_CPP_LEADSPACE
# define INLINE_SYNTAX
# define MAGIC_MAKE_VARS
# endif
# ifdef __minix_vmd
# define FIXUP_CPP_WHITESPACE
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(Lynx)
2006-11-25 09:15:45 -07:00
/* On LynxOS 2.4.0 imake gets built with the old "legacy"
* /bin/cc which has a rather pedantic builtin preprocessor.
* Using a macro which is not #defined (as in Step 5
* below) flags an *error*
*/
2010-04-17 12:41:16 -06:00
# define __NetBSD_Version__ 0
# endif
2006-11-25 09:15:45 -07:00
/*
* Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP
* If you want to use cc -E instead of cpp, define USE_CC_E.
* If use cc -E but want a different compiler, define DEFAULT_CC.
* If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
*/
2010-04-17 12:41:16 -06:00
# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(__APPLE__)
# define DEFAULT_CPP "/usr/bin/cpp"
# define DEFAULT_CC "cc"
# endif
# if defined(Lynx) || defined(__Lynx__)
# define DEFAULT_CC "gcc"
# define USE_CC_E
# endif
# ifdef hpux
# define USE_CC_E
# endif
# ifdef WIN32
# define USE_CC_E
# ifdef __GNUC__
# define DEFAULT_CC "gcc"
# else
# define DEFAULT_CC "cl"
# endif
# endif
# ifdef apollo
# define DEFAULT_CPP "/usr/lib/cpp"
# endif
# if defined(clipper) || defined(__clipper__)
# define DEFAULT_CPP "/usr/lib/cpp"
# endif
# if defined(_IBMR2) && !defined(DEFAULT_CPP)
# define DEFAULT_CPP "/usr/ccs/lib/cpp"
# endif
# if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
# define DEFAULT_CPP "/usr/ccs/lib/cpp"
# endif
# ifdef __bsdi__
# define DEFAULT_CPP "/usr/bin/cpp"
# endif
# ifdef __uxp__
# define DEFAULT_CPP "/usr/ccs/lib/cpp"
# endif
# ifdef __sxg__
# define DEFAULT_CPP "/usr/lib/cpp"
# endif
# ifdef _CRAY
# define DEFAULT_CPP "/lib/pcpp"
# endif
# if defined(__386BSD__)
# define DEFAULT_CPP "/usr/libexec/cpp"
# endif
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
# define USE_CC_E
# endif
# if defined(__sgi) && defined(__ANSI_CPP__)
# define USE_CC_E
# endif
# if defined(MACH) && !defined(__GNU__)
# define USE_CC_E
# endif
# ifdef __minix_vmd
# define DEFAULT_CPP "/usr/lib/cpp"
# endif
# if defined(__UNIXOS2__)
2006-11-25 09:15:45 -07:00
/* expects cpp in PATH */
2010-04-17 12:41:16 -06:00
# define DEFAULT_CPP "cpp"
# endif
# ifdef __CYGWIN__
# define DEFAULT_CC "gcc"
# define DEFAULT_CPP "/usr/bin/cpp"
# endif
# if defined (__QNX__)
# ifdef __QNXNTO__
# define DEFAULT_CPP "/usr/bin/cpp"
# else
# define DEFAULT_CPP "/usr/X11R6/bin/cpp"
# endif
# endif
# if defined(__GNUC__) && !defined(USE_CC_E)
# define USE_CC_E
# ifndef DEFAULT_CC
# define DEFAULT_CC "gcc"
# endif
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */
2006-11-25 09:15:45 -07:00
/*
* Step 5: cpp_argv
* The following table contains the flags that should be passed
2010-04-17 12:41:16 -06:00
* whenever a Makefile is being generated. If your preprocessor
2006-11-25 09:15:45 -07:00
* doesn't predefine any unique symbols, choose one and add it to the
* end of this table. Then, do the following:
2010-04-17 12:41:16 -06:00
*
2006-11-25 09:15:45 -07:00
* a. Use this symbol in Imake.cf when setting MacroFile.
* b. Put this symbol in the definition of BootstrapCFlags in your
* <platform>.cf file.
2010-04-17 12:41:16 -06:00
* c. When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
2006-11-25 09:15:45 -07:00
* to the end of the command line.
2010-04-17 12:41:16 -06:00
*
* Note that you may define more than one symbol (useful for platforms
2006-11-25 09:15:45 -07:00
* that support multiple operating systems).
*/
2010-04-17 12:41:16 -06:00
# define ARGUMENTS 50 /* number of arguments in various arrays */
# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
2006-11-25 09:15:45 -07:00
char *cpp_argv[ARGUMENTS] = {
"cc", /* replaced by the actual program to exec */
"-I.", /* add current directory to include path */
2010-04-17 12:41:16 -06:00
# if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000
# ifdef unix
2006-11-25 09:15:45 -07:00
"-Uunix", /* remove unix symbol so that filename unix.c okay */
2010-04-17 12:41:16 -06:00
# endif
# endif
# if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
2006-11-25 09:15:45 -07:00
defined(__FreeBSD__) || defined(__DragonFly__) || defined(MACH) || \
defined(linux) || defined(__GNU__) || defined(__bsdi__) || \
defined(__GNUC__) || defined(__GLIBC__)
2010-04-17 12:41:16 -06:00
# ifdef __i386__
2006-11-25 09:15:45 -07:00
"-D__i386__",
2010-04-17 12:41:16 -06:00
# if defined(__GNUC__) && (__GNUC__ >= 3)
2006-11-25 09:15:45 -07:00
"-m32",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef __i486__
2006-11-25 09:15:45 -07:00
"-D__i486__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i586__
2006-11-25 09:15:45 -07:00
"-D__i586__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i686__
2006-11-25 09:15:45 -07:00
"-D__i686__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __k6__
2006-11-25 09:15:45 -07:00
"-D__k6__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __ia64__
2006-11-25 09:15:45 -07:00
"-D__ia64__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __amd64__
2006-11-25 09:15:45 -07:00
"-D__amd64__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __x86_64__
2006-11-25 09:15:45 -07:00
"-D__amd64__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __s390__
2006-11-25 09:15:45 -07:00
"-D__s390__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __alpha__
2006-11-25 09:15:45 -07:00
"-D__alpha__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __arm__
2006-11-25 09:15:45 -07:00
"-D__arm__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __s390x__
2006-11-25 09:15:45 -07:00
"-D__s390x__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparc__
2006-11-25 09:15:45 -07:00
"-D__sparc__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __m68k__
2006-11-25 09:15:45 -07:00
"-D__m68k__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __hppa__
2006-11-25 09:15:45 -07:00
"-D__hppa__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sh__
2006-11-25 09:15:45 -07:00
"-D__sh__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sh3__
2006-11-25 09:15:45 -07:00
"-D__sh3__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SH3__
2006-11-25 09:15:45 -07:00
"-D__SH3__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SH4__
2006-11-25 09:15:45 -07:00
"-D__SH4__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SH4NOFPU__
2006-11-25 09:15:45 -07:00
"-D__SH4_NOFPU__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __GNUC__
2006-11-25 09:15:45 -07:00
"-traditional",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef M4330
2006-11-25 09:15:45 -07:00
"-DM4330", /* Tektronix */
2010-04-17 12:41:16 -06:00
# endif
# ifdef M4310
2006-11-25 09:15:45 -07:00
"-DM4310", /* Tektronix */
2010-04-17 12:41:16 -06:00
# endif
# if defined(macII) || defined(_AUX_SOURCE)
2006-11-25 09:15:45 -07:00
"-DmacII", /* Apple A/UX */
2010-04-17 12:41:16 -06:00
# endif
# if defined(USL) || defined(__UNIXWARE__) || \
2006-11-25 09:15:45 -07:00
(defined(__USLC__) && !defined(_SCO_DS))
"-D__UNIXWARE__", /* SCO UnixWare 7 */
2010-04-17 12:41:16 -06:00
# endif
# ifdef sony
2006-11-25 09:15:45 -07:00
"-Dsony", /* Sony */
2010-04-17 12:41:16 -06:00
# if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
2006-11-25 09:15:45 -07:00
"-Dbsd43",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef _IBMR2
2006-11-25 09:15:45 -07:00
"-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */
2010-04-17 12:41:16 -06:00
# ifndef aix
# define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
# endif
# endif /* _IBMR2 */
# ifdef aix
2006-11-25 09:15:45 -07:00
"-Daix", /* AIX instead of AOS */
2010-04-17 12:41:16 -06:00
# ifndef ibm
# define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */
# endif
# endif /* aix */
# ifdef ibm
2006-11-25 09:15:45 -07:00
"-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
2010-04-17 12:41:16 -06:00
# endif
# ifdef luna
2006-11-25 09:15:45 -07:00
"-Dluna", /* OMRON luna 68K and 88K */
2010-04-17 12:41:16 -06:00
# ifdef luna1
2006-11-25 09:15:45 -07:00
"-Dluna1",
2010-04-17 12:41:16 -06:00
# endif
# ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */
2006-11-25 09:15:45 -07:00
"-traditional", /* for some older version */
2010-04-17 12:41:16 -06:00
# endif /* instead of "-DXCOMM=\\#" */
# ifdef uniosb
2006-11-25 09:15:45 -07:00
"-Duniosb",
2010-04-17 12:41:16 -06:00
# endif
# ifdef uniosu
2006-11-25 09:15:45 -07:00
"-Duniosu",
2010-04-17 12:41:16 -06:00
# endif
# endif /* luna */
# ifdef _CRAY /* Cray */
2006-11-25 09:15:45 -07:00
"-Ucray",
2010-04-17 12:41:16 -06:00
# endif
# ifdef Mips
2006-11-25 09:15:45 -07:00
"-DMips", /* Define and use Mips for Mips Co. OS/mach. */
2010-04-17 12:41:16 -06:00
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
2006-11-25 09:15:45 -07:00
"-DBSD43", /* Mips RISCOS supports two environments */
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
"-DSYSV", /* System V environment is the default */
2010-04-17 12:41:16 -06:00
# endif
# endif /* Mips */
# ifdef MOTOROLA
2006-11-25 09:15:45 -07:00
"-DMOTOROLA", /* Motorola Delta Systems */
2010-04-17 12:41:16 -06:00
# ifdef SYSV
"-DSYSV",
# endif
# ifdef SVR4
2006-11-25 09:15:45 -07:00
"-DSVR4",
2010-04-17 12:41:16 -06:00
# endif
# endif /* MOTOROLA */
# if defined(M_UNIX) || defined(sco) || defined(__SCO__) || \
2006-11-25 09:15:45 -07:00
defined(_SCO_DS) || defined(__OPENSERVER__)
"-D__SCO__",
"-DSYSV",
2010-04-17 12:41:16 -06:00
# endif
# ifdef i386
2006-11-25 09:15:45 -07:00
"-Di386",
2010-04-17 12:41:16 -06:00
# ifdef SVR4
2006-11-25 09:15:45 -07:00
"-DSVR4",
2010-04-17 12:41:16 -06:00
# endif
# ifdef SYSV
2006-11-25 09:15:45 -07:00
"-DSYSV",
2010-04-17 12:41:16 -06:00
# ifdef ISC
2006-11-25 09:15:45 -07:00
"-DISC",
2010-04-17 12:41:16 -06:00
# ifdef ISC40
2006-11-25 09:15:45 -07:00
"-DISC40", /* ISC 4.0 */
2010-04-17 12:41:16 -06:00
# else
# ifdef ISC202
2006-11-25 09:15:45 -07:00
"-DISC202", /* ISC 2.0.2 */
2010-04-17 12:41:16 -06:00
# else
# ifdef ISC30
2006-11-25 09:15:45 -07:00
"-DISC30", /* ISC 3.0 */
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
"-DISC22", /* ISC 2.2.1 */
2010-04-17 12:41:16 -06:00
# endif
# endif
# endif
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# if (_SCO_DS - 0 == 1)
2006-11-25 09:15:45 -07:00
"-DSCO325",
2010-04-17 12:41:16 -06:00
# endif
# if (_SCO_DS - 0 > 1)
2006-11-25 09:15:45 -07:00
"-DSCO5V6",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef ESIX
2006-11-25 09:15:45 -07:00
"-DESIX",
2010-04-17 12:41:16 -06:00
# endif
# ifdef ATT
2006-11-25 09:15:45 -07:00
"-DATT",
2010-04-17 12:41:16 -06:00
# endif
# ifdef DELL
2006-11-25 09:15:45 -07:00
"-DDELL",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef SYSV386 /* System V/386 folks, obsolete */
2006-11-25 09:15:45 -07:00
"-Di386",
2010-04-17 12:41:16 -06:00
# ifdef SVR4
2006-11-25 09:15:45 -07:00
"-DSVR4",
2010-04-17 12:41:16 -06:00
# endif
# ifdef ISC
2006-11-25 09:15:45 -07:00
"-DISC",
2010-04-17 12:41:16 -06:00
# ifdef ISC40
2006-11-25 09:15:45 -07:00
"-DISC40", /* ISC 4.0 */
2010-04-17 12:41:16 -06:00
# else
# ifdef ISC202
2006-11-25 09:15:45 -07:00
"-DISC202", /* ISC 2.0.2 */
2010-04-17 12:41:16 -06:00
# else
# ifdef ISC30
2006-11-25 09:15:45 -07:00
"-DISC30", /* ISC 3.0 */
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
"-DISC22", /* ISC 2.2.1 */
2010-04-17 12:41:16 -06:00
# endif
# endif
# endif
2006-11-25 09:15:45 -07:00
# endif
2010-04-17 12:41:16 -06:00
# if (_SCO_DS - 0 == 1)
2006-11-25 09:15:45 -07:00
"-DSCO325",
2010-04-17 12:41:16 -06:00
# endif
# if (_SCO_DS - 0 > 1)
2006-11-25 09:15:45 -07:00
"-DSCO5V6",
2010-04-17 12:41:16 -06:00
# endif
# ifdef ESIX
2006-11-25 09:15:45 -07:00
"-DESIX",
2010-04-17 12:41:16 -06:00
# endif
# ifdef ATT
2006-11-25 09:15:45 -07:00
"-DATT",
2010-04-17 12:41:16 -06:00
# endif
# ifdef DELL
2006-11-25 09:15:45 -07:00
"-DDELL",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef __osf__
2006-11-25 09:15:45 -07:00
"-D__osf__",
2010-04-17 12:41:16 -06:00
# ifdef __mips__
2006-11-25 09:15:45 -07:00
"-D__mips__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __alpha
2006-11-25 09:15:45 -07:00
"-D__alpha",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __amiga__
2006-11-25 09:15:45 -07:00
"-D__amiga__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __alpha__
2006-11-25 09:15:45 -07:00
"-D__alpha__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i386__
2006-11-25 09:15:45 -07:00
"-D__i386__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __GNUC__
2006-11-25 09:15:45 -07:00
"-traditional",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef Oki
2006-11-25 09:15:45 -07:00
"-DOki",
2010-04-17 12:41:16 -06:00
# endif
# ifdef sun
# if defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__)
2006-11-25 09:15:45 -07:00
"-DSVR4",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparcv9
2006-11-25 09:15:45 -07:00
"-D__sparcv9",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __amd64
2006-11-25 09:15:45 -07:00
"-D__amd64",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef WIN32
2006-11-25 09:15:45 -07:00
"-DWIN32",
2010-04-17 12:41:16 -06:00
# ifndef __GNUC__
2006-11-25 09:15:45 -07:00
"-nologo",
2010-04-17 12:41:16 -06:00
# if _MSC_VER < 1000
2006-11-25 09:15:45 -07:00
"-batch",
2010-04-17 12:41:16 -06:00
# endif
# endif
2006-11-25 09:15:45 -07:00
"-D__STDC__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef NCR
2006-11-25 09:15:45 -07:00
"-DNCR", /* NCR */
2010-04-17 12:41:16 -06:00
# endif
# ifdef linux
2006-11-25 09:15:45 -07:00
"-Dlinux",
2010-04-17 12:41:16 -06:00
# endif
# if defined(__CYGWIN__)
2006-11-25 09:15:45 -07:00
"-traditional",
2010-04-17 12:41:16 -06:00
# endif
# if defined(Lynx) || defined(__Lynx__)
2006-11-25 09:15:45 -07:00
"-traditional",
2010-04-17 12:41:16 -06:00
# if 0
2006-11-25 09:15:45 -07:00
"-DLYNX", /* do we really need this?? */
2010-04-17 12:41:16 -06:00
# endif
2006-11-25 09:15:45 -07:00
"-DLynx",
2010-04-17 12:41:16 -06:00
# ifdef ppc
2006-11-25 09:15:45 -07:00
"-Dppc",
2010-04-17 12:41:16 -06:00
# endif
# ifdef ppc64
2006-11-25 09:15:45 -07:00
"-Dppc64",
2010-04-17 12:41:16 -06:00
# endif
# if defined(m68k) || defined(M68k) || defined(m68040)
2006-11-25 09:15:45 -07:00
"-Dm68k",
"-DM68k",
2010-04-17 12:41:16 -06:00
# endif
# ifdef uSPARC1
2006-11-25 09:15:45 -07:00
"-Dsparc",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef __uxp__
2006-11-25 09:15:45 -07:00
"-D__uxp__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sxg__
2006-11-25 09:15:45 -07:00
"-D__sxg__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef nec_ews_svr2
2006-11-25 09:15:45 -07:00
"-Dnec_ews_svr2",
2010-04-17 12:41:16 -06:00
# endif
# ifdef AMOEBA
2006-11-25 09:15:45 -07:00
"-DAMOEBA",
2010-04-17 12:41:16 -06:00
# ifdef CROSS_COMPILE
2006-11-25 09:15:45 -07:00
"-DCROSS_COMPILE",
2010-04-17 12:41:16 -06:00
# ifdef CROSS_i80386
2006-11-25 09:15:45 -07:00
"-Di80386",
2010-04-17 12:41:16 -06:00
# endif
# ifdef CROSS_sparc
2006-11-25 09:15:45 -07:00
"-Dsparc",
2010-04-17 12:41:16 -06:00
# endif
# ifdef CROSS_mc68000
2006-11-25 09:15:45 -07:00
"-Dmc68000",
2010-04-17 12:41:16 -06:00
# endif
# else
# ifdef i80386
2006-11-25 09:15:45 -07:00
"-Di80386",
2010-04-17 12:41:16 -06:00
# endif
# ifdef sparc
2006-11-25 09:15:45 -07:00
"-Dsparc",
2010-04-17 12:41:16 -06:00
# endif
# ifdef mc68000
2006-11-25 09:15:45 -07:00
"-Dmc68000",
2010-04-17 12:41:16 -06:00
# endif
# endif
# endif
# if defined(__sgi) && defined(__ANSI_CPP__)
2006-11-25 09:15:45 -07:00
"-cckr",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __minix_vmd
2006-11-25 09:15:45 -07:00
"-Dminix",
2010-04-17 12:41:16 -06:00
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(__UNIXOS2__)
2006-11-25 09:15:45 -07:00
"-traditional",
"-Demxos2",
2010-04-17 12:41:16 -06:00
# endif
# ifdef MetroLink
2006-11-25 09:15:45 -07:00
"-DMetroLink",
2010-04-17 12:41:16 -06:00
# ifdef SVR4
2006-11-25 09:15:45 -07:00
"-DSVR4",
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef __powerpc__
2006-11-25 09:15:45 -07:00
"-D__powerpc__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __powerpc64__
2006-11-25 09:15:45 -07:00
"-D__powerpc64__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef PowerMAX_OS
2006-11-25 09:15:45 -07:00
"-DPowerMAX_OS",
2010-04-17 12:41:16 -06:00
# endif
# if defined (__QNX__) && !defined(__QNXNTO__)
2006-11-25 09:15:45 -07:00
"-traditional",
"-D__QNX__",
2010-04-17 12:41:16 -06:00
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(__QNXNTO__)
2006-11-25 09:15:45 -07:00
"-traditional",
"-D__QNXNTO__",
2010-04-17 12:41:16 -06:00
# if defined(i386)
2006-11-25 09:15:45 -07:00
"-Di386",
2010-04-17 12:41:16 -06:00
# endif
# if defined(__i386__)
2006-11-25 09:15:45 -07:00
"-D__i386__",
2010-04-17 12:41:16 -06:00
# endif
# if defined(PPC)
2006-11-25 09:15:45 -07:00
"-DPPC",
2010-04-17 12:41:16 -06:00
# endif
# if defined(MIPS)
2006-11-25 09:15:45 -07:00
"-DMIPS",
2010-04-17 12:41:16 -06:00
# endif
# endif
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined(__APPLE__)
2006-11-25 09:15:45 -07:00
"-D__APPLE__",
"-D__DARWIN__",
2010-04-17 12:41:16 -06:00
# ifdef __ppc__
2006-11-25 09:15:45 -07:00
"-D__ppc__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __ppc64__
2006-11-25 09:15:45 -07:00
"-D__ppc64__",
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i386__
2006-11-25 09:15:45 -07:00
"-D__i386__",
2010-04-17 12:41:16 -06:00
# endif
# endif
2006-11-25 09:15:45 -07:00
};
2010-04-17 12:41:16 -06:00
# endif /* CROSSCOMPILE */
2006-11-25 09:15:45 -07:00
/*
* Step 6: DEFAULT_OS_MAJOR_REV, DEFAULT_OS_MINOR_REV, DEFAULT_OS_TEENY_REV,
* and DEFAULT_OS_NAME.
* If your system provides a way to generate the default major,
* minor, teeny, or system names at runtime add commands below.
* The syntax of the _REV strings is 'f fmt' where 'f' is an argument
* you would give to uname, and "fmt" is a scanf() format string.
* Supported uname arguments are "snrvm", and if you specify multiple
* arguments they will be separated by spaces. No more than 5 arguments
* may be given. Unlike uname() order of arguments matters.
*
* DEFAULT_OS_MAJOR_REV_FROB, DEFAULT_OS_MINOR_REV_FROB,
* DEFAULT_OS_TEENY_REV_FROB, and DEFAULT_OS_NAME_FROB can be used to
* modify the results of the use of the various strings.
*/
2010-04-17 12:41:16 -06:00
# if !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP
# if defined(aix)
2006-11-25 09:15:45 -07:00
/* uname -v returns "x" (e.g. "4"), and uname -r returns "y" (e.g. "1") */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "v %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %[0-9]"
2006-11-25 09:15:45 -07:00
/* No information available to generate default OSTeenyVersion value. */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(sony)
2006-11-25 09:15:45 -07:00
/* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(hpux)
2006-11-25 09:15:45 -07:00
/* uname -r returns "W.x.yz", e.g. "B.10.01" */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %*[^.].%[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*[^.].%*d.%1s"
# define DEFAULT_OS_TEENY_REV "r %*[^.].%*d.%*c%[0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(USL) || defined(__USLC__) || defined(__UNIXWARE__) || \
2006-11-25 09:15:45 -07:00
defined(__SCO__) || defined(__OPENSERVER__) || defined(_SCO_DS)
/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "v %[0-9]"
# define DEFAULT_OS_MINOR_REV "v %*d.%1s"
# define DEFAULT_OS_TEENY_REV "v %*d.%*c%[.0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(__APPLE__)
2006-11-25 09:15:45 -07:00
/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" /* this will just get 0 */
# define DEFAULT_OS_NAME "s %[^\n]"
# elif defined(__osf__)
2006-11-25 09:15:45 -07:00
/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %*[^0-9]%[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*[^.].%[0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(__uxp__)
2006-11-25 09:15:45 -07:00
/* NOTE: "x.y[.z]" above handles UXP/DF. This is a sample alternative. */
/* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "v V%[0-9]"
# define DEFAULT_OS_MINOR_REV "v V%*dL%[0-9]"
# define DEFAULT_OS_NAME "srvm %[^\n]"
# elif defined(linux) || defined(__bsdi__)
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
# define DEFAULT_OS_NAME "srm %[^\n]"
# if defined(linux) && defined (CROSSCOMPILE_CPP)
# define CROSS_UTS_SYSNAME "Linux"
# include <linux/version.h>
# define CROSS_UTS_RELEASE UTS_RELEASE
# endif
# elif defined(__CYGWIN__)
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
# define DEFAULT_OS_NAME "srm %[^\n]"
# if defined(__CYGWIN__) && defined (CROSSCOMPILE_CPP)
# define CROSS_UTS_SYSNAME "Cygwin"
# include <cygwin/version.h>
# define CROSS_UTS_RELEASE "1.3.12"
# endif
# elif defined(__GNU__)
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_NAME "srm %[^\n]"
# elif defined(ISC)
2006-11-25 09:15:45 -07:00
/* ISC all Versions ? */
/* uname -r returns "x.y", e.g. "3.2" ,uname -v returns "x" e.g. "2" */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "v %[0-9]"
2006-11-25 09:15:45 -07:00
/* # define DEFAULT_OS_NAME "srm %[^\n]" */ /* Not useful on ISC */
2010-04-17 12:41:16 -06:00
# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
2006-11-25 09:15:45 -07:00
/* BSD/OS too? */
/* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
# define DEFAULT_OS_NAME "srm %[^\n]"
# if defined(__FreeBSD__) || defined(__DragonFly__)
2006-11-25 09:15:45 -07:00
/* Use an alternate way to find the teeny version for -STABLE, -SNAP versions */
2010-04-17 12:41:16 -06:00
# ifndef CROSSCOMPILE_CPP
# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \
2006-11-25 09:15:45 -07:00
do { \
if (*buf == 0) { \
int __mib[2]; \
size_t __len; \
int __osrel; \
\
__mib[0] = CTL_KERN; \
__mib[1] = KERN_OSRELDATE; \
__len = sizeof(__osrel); \
sysctl(__mib, 2, &__osrel, &__len, NULL, 0); \
if (__osrel < 210000) { \
if (__osrel < 199607) \
buf[0] = '0'; \
else if (__osrel < 199612) \
buf[0] = '5'; \
else if (__osrel == 199612) \
buf[0] = '6'; \
else \
buf[0] = '8'; /* guess */ \
} else { \
buf[0] = ((__osrel / 1000) % 10) + '0'; \
} \
buf[1] = 0; \
} \
} while (0)
2010-04-17 12:41:16 -06:00
# endif
# else
2006-11-25 09:15:45 -07:00
/* OpenBSD - Add DEFAULT_MACHINE_ARCHITECTURE */
2010-04-17 12:41:16 -06:00
# define DEFAULT_MACHINE_ARCHITECTURE "m %[^\n]"
# endif
# elif defined(__NetBSD__)
2006-11-25 09:15:45 -07:00
/*
* uname -r returns "x.y([ABCD...]|_mumble)", e.g.:
* 1.2 1.2_BETA 1.2A 1.2B
*
* That means that we have to do something special to turn the
* TEENY revision into a form that we can use (i.e., a string of
* decimal digits).
*
* We also frob the name DEFAULT_OS_NAME so that it looks like the
* 'standard' NetBSD name for the version, e.g. "NetBSD/i386 1.2B" for
* NetBSD 1.2B on an i386.
*/
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d%[A-Z]"
# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \
2006-11-25 09:15:45 -07:00
do { \
int teeny = 0; \
char *ptr = (buf); \
\
while (*ptr >= 'A' && *ptr <= 'Z') /* sanity check */ \
teeny = teeny * 26 + (int)(*ptr++ - 'A'); \
\
snprintf((buf), (size), "%d", teeny + 1); \
} while (0)
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_NAME "smr %[^\n]"
# define DEFAULT_OS_NAME_FROB(buf, size) \
2006-11-25 09:15:45 -07:00
do { \
char *__sp; \
if ((__sp = strchr((buf), ' ')) != NULL) \
*__sp = '/'; \
} while (0)
2010-04-17 12:41:16 -06:00
# elif defined(__Lynx__) || defined(Lynx)
2006-11-25 09:15:45 -07:00
/* Lynx 2.4.0 /bin/cc doesn't like #elif */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
# define DEFAULT_OS_NAME "srm %[^\n]"
# elif defined(_SEQUENT_)
2006-11-25 09:15:45 -07:00
/* uname -v returns 'Vx.y.z', e.g. 'V4.4.2' */
2010-04-17 12:41:16 -06:00
# define DEFAULT_OS_MAJOR_REV "v V%[0-9]"
# define DEFAULT_OS_MINOR_REV "v V%*d.%[0-9]"
# define DEFAULT_OS_TEENY_REV "v V%*d.%*d.%[0-9]"
# define DEFAULT_OS_NAME "s %[^\n]"
# endif
# endif /* !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP */
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# if defined (CROSSCOMPILE_CPP)
# ifndef CROSS_UTS_SYSNAME
2006-11-25 09:15:45 -07:00
char *cross_uts_sysname = "";
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *cross_uts_sysname = CROSS_UTS_SYSNAME;
2010-04-17 12:41:16 -06:00
# endif
# ifndef CROSS_UTS_RELEASE
2006-11-25 09:15:45 -07:00
char* cross_uts_release = "";
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char* cross_uts_release = CROSS_UTS_RELEASE;
2010-04-17 12:41:16 -06:00
# endif
# ifndef CROSS_UTS_MACHINE
2006-11-25 09:15:45 -07:00
char *cross_uts_machine = "";
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *cross_uts_machine = CROSS_UTS_MACHINE;
2010-04-17 12:41:16 -06:00
# endif
# ifndef CROSS_UTS_VERSION
2006-11-25 09:15:45 -07:00
char * cross_uts_version = "";
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char * cross_uts_version = CROSS_UTS_VERSION;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_NAME
2006-11-25 09:15:45 -07:00
char *defaultOsName = DEFAULT_OS_NAME;
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *defaultOsName = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_MAJOR_REV
2006-11-25 09:15:45 -07:00
char *defaultOsMajorRev = DEFAULT_OS_MAJOR_REV;
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *defaultOsMajorRev = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_MINOR_REV
2006-11-25 09:15:45 -07:00
char *defaultOsMinorRev = DEFAULT_OS_MINOR_REV;
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *defaultOsMinorRev = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_TEENY_REV
2006-11-25 09:15:45 -07:00
char *defaultOsTeenyRev = DEFAULT_OS_TEENY_REV;
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *defaultOsTeenyRev = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_MACHINE_ARCHITECTURE
2006-11-25 09:15:45 -07:00
char *defaultMachineArchitecture = DEFAULT_MACHINE_ARCHITECTURE;
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
char *defaultMachineArchitecture = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_NAME_FROB
2006-11-25 09:15:45 -07:00
void defaultOsNameFrob(char *buf, int size)
{DEFAULT_OS_NAME_FROB(buf,size)}
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
void (*defaultOsNameFrob)(char *buf, int size) = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_MAJOR_REV_FROB
2006-11-25 09:15:45 -07:00
void defaultOsMajorRevFrob(char *buf, int size)
{DEFAULT_OS_MAJOR_REV_FROB(buf,size)}
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
void (*defaultOsMajorRevFrob)(char *buf, int size) = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_MINOR_REV_FROB
2006-11-25 09:15:45 -07:00
void defaultOsMinorRevFrob(char *buf, int size)
{DEFAULT_OS_MINOR_REV_FROB(buf,size)}
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
void (*defaultOsMinorRevFrob)(char *buf, int size) = NULL;
2010-04-17 12:41:16 -06:00
# endif
# ifdef DEFAULT_OS_TEENY_REV_FROB
2006-11-25 09:15:45 -07:00
void defaultOsTeenyRevFrob(char *buf, int size)
{DEFAULT_OS_TEENY_REV_FROB(buf,size)}
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
void (*defaultOsTeenyRevFrob)(char *buf, int size) = NULL;
2010-04-17 12:41:16 -06:00
# endif
# endif /* CROSSCOMPILE_CPP */
2006-11-25 09:15:45 -07:00
2010-04-17 12:41:16 -06:00
# else /* else MAKEDEPEND */
# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
2006-11-25 09:15:45 -07:00
/*
* Step 7: predefs
* If your compiler and/or preprocessor define any specific symbols, add
* them to the the following table. The definition of struct symtab is
* in util/makedepend/def.h.
*/
2010-04-17 12:41:16 -06:00
# undef DEF_EVALUATE
# undef DEF_STRINGIFY
# define DEF_EVALUATE(__x) #__x
# define DEF_STRINGIFY(_x) DEF_EVALUATE(_x)
2006-11-25 09:15:45 -07:00
struct symtab predefs[] = {
2010-04-17 12:41:16 -06:00
# ifdef apollo
2006-11-25 09:15:45 -07:00
{"apollo", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined(clipper) || defined(__clipper__)
2006-11-25 09:15:45 -07:00
{"clipper", "1"},
{"__clipper__", "1"},
{"clix", "1"},
{"__clix__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef ibm032
2006-11-25 09:15:45 -07:00
{"ibm032", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef ibm
2006-11-25 09:15:45 -07:00
{"ibm", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef aix
2006-11-25 09:15:45 -07:00
{"aix", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sun
2006-11-25 09:15:45 -07:00
{"sun", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sun2
2006-11-25 09:15:45 -07:00
{"sun2", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sun3
2006-11-25 09:15:45 -07:00
{"sun3", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sun4
2006-11-25 09:15:45 -07:00
{"sun4", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sparc
2006-11-25 09:15:45 -07:00
{"sparc", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparc
2006-11-25 09:15:45 -07:00
{"__sparc", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparcv9
2006-11-25 09:15:45 -07:00
{"__sparcv9", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparc__
2006-11-25 09:15:45 -07:00
{"__sparc__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparcv9__
2006-11-25 09:15:45 -07:00
{"__sparcv9__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef hpux
2006-11-25 09:15:45 -07:00
{"hpux", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __hpux
2006-11-25 09:15:45 -07:00
{"__hpux", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __hp9000s800
2006-11-25 09:15:45 -07:00
{"__hp9000s800", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __hp9000s700
2006-11-25 09:15:45 -07:00
{"__hp9000s700", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef vax
2006-11-25 09:15:45 -07:00
{"vax", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef VMS
2006-11-25 09:15:45 -07:00
{"VMS", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef cray
2006-11-25 09:15:45 -07:00
{"cray", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef CRAY
2006-11-25 09:15:45 -07:00
{"CRAY", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _CRAY
2006-11-25 09:15:45 -07:00
{"_CRAY", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef att
2006-11-25 09:15:45 -07:00
{"att", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef mips
2006-11-25 09:15:45 -07:00
{"mips", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __mips__
2006-11-25 09:15:45 -07:00
{"__mips__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef ultrix
2006-11-25 09:15:45 -07:00
{"ultrix", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef stellar
2006-11-25 09:15:45 -07:00
{"stellar", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef mc68000
2006-11-25 09:15:45 -07:00
{"mc68000", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef mc68020
2006-11-25 09:15:45 -07:00
{"mc68020", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __GNUC__
2006-11-25 09:15:45 -07:00
{"__GNUC__", DEF_STRINGIFY(__GNUC__)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __STRICT_ANSI__
2006-11-25 09:15:45 -07:00
{"__STRICT_ANSI__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __STDC__
2006-11-25 09:15:45 -07:00
{"__STDC__", DEF_STRINGIFY(__STDC__)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __HIGHC__
2006-11-25 09:15:45 -07:00
{"__HIGHC__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __OPENSERVER__
2006-11-25 09:15:45 -07:00
{"__OPENSERVER__", DEF_STRINGIFY(__OPENSERVER__)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _SCO_DS
2006-11-25 09:15:45 -07:00
{"_SCO_DS", DEF_STRINGIFY(_SCO_DS)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _SCO_DS_LL
2006-11-25 09:15:45 -07:00
{"_SCO_DS_LL", DEF_STRINGIFY(_SCO_DS_LL)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SCO_VERSION__
2006-11-25 09:15:45 -07:00
{"__SCO_VERSION__", DEF_STRINGIFY(__SCO_VERSION__)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __UNIXWARE__
2006-11-25 09:15:45 -07:00
{"__UNIXWARE__", DEF_STRINGIFY(__UNIXWARE__)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __USLC__
2006-11-25 09:15:45 -07:00
{"__USLC__", DEF_STRINGIFY(__USLC__)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef CMU
2006-11-25 09:15:45 -07:00
{"CMU", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef luna
2006-11-25 09:15:45 -07:00
{"luna", "1"},
2010-04-17 12:41:16 -06:00
# ifdef luna1
2006-11-25 09:15:45 -07:00
{"luna1", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef luna2
2006-11-25 09:15:45 -07:00
{"luna2", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef luna88k
2006-11-25 09:15:45 -07:00
{"luna88k", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef uniosb
2006-11-25 09:15:45 -07:00
{"uniosb", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef uniosu
2006-11-25 09:15:45 -07:00
{"uniosu", "1"},
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef ieeep754
2006-11-25 09:15:45 -07:00
{"ieeep754", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef is68k
2006-11-25 09:15:45 -07:00
{"is68k", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef m68k
2006-11-25 09:15:45 -07:00
{"m68k", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef M68k
2006-11-25 09:15:45 -07:00
{"M68k", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __m68k__
2006-11-25 09:15:45 -07:00
{"__m68k__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef m88k
2006-11-25 09:15:45 -07:00
{"m88k", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __m88k__
2006-11-25 09:15:45 -07:00
{"__m88k__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef bsd43
2006-11-25 09:15:45 -07:00
{"bsd43", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef hcx
2006-11-25 09:15:45 -07:00
{"hcx", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sony
2006-11-25 09:15:45 -07:00
{"sony", "1"},
2010-04-17 12:41:16 -06:00
# ifdef SYSTYPE_SYSV
2006-11-25 09:15:45 -07:00
{"SYSTYPE_SYSV", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _SYSTYPE_SYSV
2006-11-25 09:15:45 -07:00
{"_SYSTYPE_SYSV", "1"},
2010-04-17 12:41:16 -06:00
# endif
# endif
# ifdef __OSF__
2006-11-25 09:15:45 -07:00
{"__OSF__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __osf__
2006-11-25 09:15:45 -07:00
{"__osf__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __amiga__
2006-11-25 09:15:45 -07:00
{"__amiga__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __alpha
2006-11-25 09:15:45 -07:00
{"__alpha", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __alpha__
2006-11-25 09:15:45 -07:00
{"__alpha__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __DECC
2006-11-25 09:15:45 -07:00
{"__DECC", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __decc
2006-11-25 09:15:45 -07:00
{"__decc", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __unix__
2006-11-25 09:15:45 -07:00
{"__unix__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __uxp__
2006-11-25 09:15:45 -07:00
{"__uxp__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sxg__
2006-11-25 09:15:45 -07:00
{"__sxg__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _SEQUENT_
2006-11-25 09:15:45 -07:00
{"_SEQUENT_", "1"},
{"__STDC__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __bsdi__
2006-11-25 09:15:45 -07:00
{"__bsdi__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef nec_ews_svr2
2006-11-25 09:15:45 -07:00
{"nec_ews_svr2", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef nec_ews_svr4
2006-11-25 09:15:45 -07:00
{"nec_ews_svr4", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _nec_ews_svr4
2006-11-25 09:15:45 -07:00
{"_nec_ews_svr4", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _nec_up
2006-11-25 09:15:45 -07:00
{"_nec_up", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef SX
2006-11-25 09:15:45 -07:00
{"SX", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef nec
2006-11-25 09:15:45 -07:00
{"nec", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _nec_ft
2006-11-25 09:15:45 -07:00
{"_nec_ft", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef PC_UX
2006-11-25 09:15:45 -07:00
{"PC_UX", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sgi
2006-11-25 09:15:45 -07:00
{"sgi", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sgi
2006-11-25 09:15:45 -07:00
{"__sgi", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _MIPS_FPSET
2006-11-25 09:15:45 -07:00
{"_MIPS_FPSET", DEF_STRINGIFY(_MIPS_FPSET)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _MIPS_ISA
2006-11-25 09:15:45 -07:00
{"_MIPS_ISA", DEF_STRINGIFY(_MIPS_ISA)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _MIPS_SIM
2006-11-25 09:15:45 -07:00
{"_MIPS_SIM", DEF_STRINGIFY(_MIPS_SIM)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _MIPS_SZINT
2006-11-25 09:15:45 -07:00
{"_MIPS_SZINT", DEF_STRINGIFY(_MIPS_SZINT)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _MIPS_SZLONG
2006-11-25 09:15:45 -07:00
{"_MIPS_SZLONG", DEF_STRINGIFY(_MIPS_SZLONG)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef _MIPS_SZPTR
2006-11-25 09:15:45 -07:00
{"_MIPS_SZPTR", DEF_STRINGIFY(_MIPS_SZPTR)},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __DragonFly__
2006-11-25 09:15:45 -07:00
{"__DragonFly__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __FreeBSD__
2006-11-25 09:15:45 -07:00
{"__FreeBSD__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __OpenBSD__
2006-11-25 09:15:45 -07:00
{"__OpenBSD__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __NetBSD__
2006-11-25 09:15:45 -07:00
{"__NetBSD__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __GNU__
2006-11-25 09:15:45 -07:00
{"__GNU__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __ELF__
2006-11-25 09:15:45 -07:00
{"__ELF__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __UNIXOS2__
2006-11-25 09:15:45 -07:00
{"__UNIXOS2__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined(__QNX__)
2006-11-25 09:15:45 -07:00
{"__QNX__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __QNXNTO__
2006-11-25 09:15:45 -07:00
{"__QNXNTO__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __powerpc__
2006-11-25 09:15:45 -07:00
{"__powerpc__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __powerpc64__
2006-11-25 09:15:45 -07:00
{"__powerpc64__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef PowerMAX_OS
2006-11-25 09:15:45 -07:00
{"PowerMAX_OS", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef ia64
2006-11-25 09:15:45 -07:00
{"ia64", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __ia64__
2006-11-25 09:15:45 -07:00
{"__ia64__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined (amd64) || defined (x86_64)
2006-11-25 09:15:45 -07:00
{"amd64", "1"},
{"x86_64", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined (__amd64__) || defined (__x86_64__)
2006-11-25 09:15:45 -07:00
{"__amd64__", "1"},
{"__x86_64__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined (__amd64) || defined(__x86_64)
2006-11-25 09:15:45 -07:00
{"__amd64", "1"},
{"__x86_64", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __x86
2006-11-25 09:15:45 -07:00
{"__x86", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i386
2006-11-25 09:15:45 -07:00
{"__i386", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i386__
2006-11-25 09:15:45 -07:00
{"__i386__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i486__
2006-11-25 09:15:45 -07:00
{"__i486__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i586__
2006-11-25 09:15:45 -07:00
{"__i586__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __i686__
2006-11-25 09:15:45 -07:00
{"__i686__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __k6__
2006-11-25 09:15:45 -07:00
{"__k6__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef i386
2006-11-25 09:15:45 -07:00
{"i386", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef i486
2006-11-25 09:15:45 -07:00
{"i486", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef i586
2006-11-25 09:15:45 -07:00
{"i586", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef i686
2006-11-25 09:15:45 -07:00
{ "i686", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef k6
2006-11-25 09:15:45 -07:00
{"k6", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef sparc
2006-11-25 09:15:45 -07:00
{"sparc", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sparc__
2006-11-25 09:15:45 -07:00
{"__sparc__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __s390__
2006-11-25 09:15:45 -07:00
{"__s390__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __hppa__
2006-11-25 09:15:45 -07:00
{"__hppa__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sh__
2006-11-25 09:15:45 -07:00
{"__sh__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __sh3_
2006-11-25 09:15:45 -07:00
{"__sh3__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SH3__
2006-11-25 09:15:45 -07:00
{"__SH3__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SH4__
2006-11-25 09:15:45 -07:00
{"__SH4__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# ifdef __SH4NOFPU__
2006-11-25 09:15:45 -07:00
{"__SH4NOFPU__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined(__ppc__)
2006-11-25 09:15:45 -07:00
{"__ppc__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined(__ppc64__)
2006-11-25 09:15:45 -07:00
{"__ppc64__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined(__BIG_ENDIAN__)
2006-11-25 09:15:45 -07:00
{"__BIG_ENDIAN__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined(__LITTLE_ENDIAN__)
2006-11-25 09:15:45 -07:00
{"__LITTLE_ENDIAN__", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined (__CHAR_BIT__)
2006-11-25 09:15:45 -07:00
{"__CHAR_BIT__", DEF_STRINGIFY(__CHAR_BIT__)},
2010-04-17 12:41:16 -06:00
# endif
# if defined (__BUILTIN_VA_STRUCT)
2006-11-25 09:15:45 -07:00
{"__BUILTIN_VA_STRUCT", "1"},
2010-04-17 12:41:16 -06:00
# endif
# if defined (__BUILTIN_VA_ARG_INCR)
2006-11-25 09:15:45 -07:00
{"__BUILTIN_VA_ARG_INCR", "1"},
2010-04-17 12:41:16 -06:00
# endif
2006-11-25 09:15:45 -07:00
/* add any additional symbols before this line */
{NULL, NULL}
};
2010-04-17 12:41:16 -06:00
# undef DEF_EVALUATE
# undef DEF_STRINGIFY
# endif /* CROSSCOMPILE */
# endif /* MAKEDEPEND */
2006-11-25 09:15:45 -07:00
# ifndef MAKEDEPEND
2010-04-17 12:41:16 -06:00
# if defined (CROSSCOMPILE_CPP)
2006-11-25 09:15:45 -07:00
# ifdef USE_CC_E
boolean crosscompile_use_cc_e = TRUE;
# ifdef DEFAULT_CC
char* crosscompile_cpp = DEFAULT_CC;
# else
char* crosscompile_cpp = "cc";
# endif
# else
boolean crosscompile_use_cc_e = FALSE;
# ifdef DEFAULT_CPP
char* crosscompile_cpp = DEFAULT_CPP;
# else
char* crosscompile_cpp = "cpp";
# endif
# endif
# ifdef FIXUP_CPP_WHITESPACE
boolean fixup_whitespace = TRUE;
# else
boolean fixup_whitespace = FALSE;
# endif
# ifdef REMOVE_CPP_LEADSPACE
boolean remove_cpp_leadspace = TRUE;
# else
boolean remove_cpp_leadspace = FALSE;
# endif
# ifdef INLINE_SYNTAX
boolean inline_syntax = TRUE;
# else
boolean inline_syntax = FALSE;
# endif
# ifdef MAGIC_MAKE_VARS
boolean magic_make_vars = TRUE;
# else
boolean magic_make_vars = FALSE;
# endif
typedef enum {
unknown,
freeBSD,
netBSD,
LinuX,
emx,
win32,
dragonfly
} System;
# if defined(linux) || defined(__GLIBC__)
System sys = LinuX;
# elif defined __FreeBSD__
System sys = freebsd;
# elif defined __NetBSD__
System sys = netBSD;
# elif defined __EMX__
System sys = emx;
# elif defined WIN32
System sys = win32;
# elif defined __DragonFly__
System sys = dragonfly;
# else
System sys = unknown;
# endif
# if defined __GNUC__
int gnu_c = __GNUC__;
int gnu_c_minor = __GNUC_MINOR__;
2010-04-17 12:41:16 -06:00
# else
2006-11-25 09:15:45 -07:00
int gnu_c = 0;
int gnu_c_minor = -1;
# endif
# if defined(linux) || defined(__GLIBC__)
# include <features.h>
int glibc_major = __GLIBC__ + 4;
int glibc_minor = __GLIBC_MINOR__;
# else
int glibc_major = 0;
int glibc_minor = -1;
# endif
# endif /* !CROSSCOMPILE || CROSSCOMPILE_CPP */
# endif /* MAKEDEPEND */
#endif /* CCIMAKE */