X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fconfig%2Fimake%2Fimakemdep.h;h=bad190de04a590623d199d595acf2b65f61bc1ed;hb=904a48b8229911fd59f4dbc98b010ed2380c319f;hp=76e2c4a9ad8e0cb6b98a1d2a61a1bb8171454f96;hpb=83b6996daa2c5ae22fc2b69093814cb08314954a;p=oweals%2Fcde.git diff --git a/cde/config/imake/imakemdep.h b/cde/config/imake/imakemdep.h index 76e2c4a9..bad190de 100644 --- a/cde/config/imake/imakemdep.h +++ b/cde/config/imake/imakemdep.h @@ -1,3 +1,25 @@ +/* + * CDE - Common Desktop Environment + * + * Copyright (c) 1993-2012, The Open Group. All rights reserved. + * + * These libraries and programs are free software; you can + * redistribute them and/or modify them under the terms of the GNU + * Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * These libraries and programs are distributed in the hope that + * they will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with these libraries and programs; if not, write + * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + * Floor, Boston, MA 02110-1301 USA + */ /* $TOG: imakemdep.h /main/102 1998/02/06 11:02:26 kaleb $ */ /* @@ -43,26 +65,14 @@ in this Software without prior written authorization from The Open Group. #endif #endif -#if defined(macII) || defined(_AUX_SOURCE) -#define imake_ccflags "-DmacII -DSYSV" -#endif - #ifdef stellar #define imake_ccflags "-DSYSV" #endif -#if defined(USL) || defined(__USLC__) || defined(Oki) || defined(NCR) +#if defined(Oki) || defined(NCR) #define imake_ccflags "-Xa -DSVR4" #endif -/* SCO may define __USLC__ so put this after the USL check */ -#if defined(M_UNIX) || defined(_SCO_DS) -#ifdef imake_ccflags -#undef imake_ccflags -#endif -#define imake_ccflags "-Dsco" -#endif - #ifdef sony #if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV) #define imake_ccflags "-DSVR4" @@ -122,10 +132,6 @@ in this Software without prior written authorization from The Open Group. #define imake_ccflags "-fn -tm c1" #endif -#ifdef apollo -#define imake_ccflags "-DX_NOT_POSIX" -#endif - #ifdef WIN32 #if _MSC_VER < 1000 #define imake_ccflags "-nologo -batch -D__STDC__" @@ -134,10 +140,6 @@ in this Software without prior written authorization from The Open Group. #endif #endif -#ifdef __uxp__ -#define imake_ccflags "-DSVR4 -DANSICPP" -#endif - #ifdef __sxg__ #define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS" #endif @@ -166,6 +168,17 @@ in this Software without prior written authorization from The Open Group. #define imake_ccflags "-DNOSTDHDRS" #endif +#ifdef __FreeBSD__ +#include +#if defined(__FreeBSD_version) +#if __FreeBSD_version < 500000 +#define imake_ccflags "-DCPP_IN_LIBEXEC" +#endif +#else +#define imake_ccflags "-DCPP_IN_LIBEXEC" +#endif +#endif + /* this is for OS/2 under EMX. This won't work with DOS */ #if defined(__EMX__) #define imake_ccflags "-DBSD43" @@ -179,7 +192,7 @@ in this Software without prior written authorization from The Open Group. * descriptor onto another, define such a mechanism here (if you don't * already fall under the existing category(ies). */ -#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(sco) +#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ fcntl(fd1, F_DUPFD, fd2))) #endif @@ -194,7 +207,7 @@ in this Software without prior written authorization from The Open Group. * 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. */ -#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || (defined(AMOEBA) && defined(CROSS_COMPILE)) +#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__llvm__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) #define FIXUP_CPP_WHITESPACE #endif #ifdef WIN32 @@ -216,30 +229,28 @@ in this Software without prior written authorization from The Open Group. #define USE_CC_E #define DEFAULT_CC "cl" #endif -#ifdef apollo -#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__ +#if defined(__NetBSD__) || (defined(__FreeBSD__) && !defined(CPP_IN_LIBEXEC)) #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__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__386BSD__) || defined(__OpenBSD__) \ + || (defined(__FreeBSD__) && defined(CPP_IN_LIBEXEC)) #define DEFAULT_CPP "/usr/libexec/cpp" #endif +#if defined(__FreeBSD__) && (__FreeBSD__ >= 10) && !defined(__llvm__) +#undef DEFAULT_CPP +#endif #if defined(__sgi) && defined(__ANSI_CPP__) #define USE_CC_E #endif @@ -278,26 +289,60 @@ char *cpp_argv[ARGUMENTS] = { #ifdef unix "-Uunix", /* remove unix symbol so that filename unix.c okay */ #endif -#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) +#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(ISC) || defined(__linux__) || defined(__hpux__) || defined(__vxworks) # ifdef __i386__ "-D__i386__", # endif -# ifdef __GNUC__ +# ifdef __i486__ + "-D__i486__", +# endif +# ifdef __i586__ + "-D__i586__", +# endif +# ifdef __i686__ + "-D__i686__", +# endif +# ifdef __k6__ + "-D__k6__", +# endif +# ifdef __ia64__ + "-D__ia64__", +# endif +# ifdef __amd64__ + "-D__amd64__", +# endif +# ifdef __x86_64__ + "-D__amd64__", +# endif +# ifdef __ppc__ + {"-D__powerpc__", "1"}, +# endif +# ifdef __ppc64__ + {"-D__powerpc64__", "1"}, +# endif +# ifdef __powerpc__ + {"-D__powerpc__", "1"}, +# endif +# ifdef __powerpc64__ + {"-D__powerpc64__", "1"}, +# endif + +# if defined(__GNUC__) && !defined(__llvm__) "-traditional", # endif +# ifdef __llvm__ + "-fms-extensions", + "-Wno-invalid-token-paste", + "-Wno-invalid-pp-token", +# endif #endif + #ifdef M4330 "-DM4330", /* Tektronix */ #endif #ifdef M4310 "-DM4310", /* Tektronix */ #endif -#if defined(macII) || defined(_AUX_SOURCE) - "-DmacII", /* Apple A/UX */ -#endif -#if defined(USL) || defined(__USLC__) - "-DUSL", /* USL */ -#endif #ifdef sony "-Dsony", /* Sony */ #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42 @@ -354,12 +399,6 @@ char *cpp_argv[ARGUMENTS] = { "-DSVR4", # endif #endif /* MOTOROLA */ -#if defined(M_UNIX) || defined(sco) - "-Dsco", -# if defined(sco324) - "-Dsco324", -# endif -#endif #ifdef i386 "-Di386", # ifdef SVR4 @@ -383,12 +422,6 @@ char *cpp_argv[ARGUMENTS] = { # endif # endif # endif -# ifdef SCO - "-DSCO", -# ifdef SCO324 - "-DSCO324", -# endif -# endif # ifdef ESIX "-DESIX", # endif @@ -423,12 +456,6 @@ char *cpp_argv[ARGUMENTS] = { # endif # endif # endif -# ifdef SCO - "-DSCO", -# ifdef SCO324 - "-DSCO324", -# endif -# endif # ifdef ESIX "-DESIX", # endif @@ -440,21 +467,6 @@ char *cpp_argv[ARGUMENTS] = { # endif # endif #endif -#ifdef __osf__ - "-D__osf__", -# ifdef __mips__ - "-D__mips__", -# endif -# ifdef __alpha - "-D__alpha", -# endif -# ifdef __i386__ - "-D__i386__", -# endif -# ifdef __GNUC__ - "-traditional", -# endif -#endif #ifdef Oki "-DOki", #endif @@ -476,10 +488,7 @@ char *cpp_argv[ARGUMENTS] = { #endif #ifdef linux "-traditional", - "-Dlinux", -#endif -#ifdef __uxp__ - "-D__uxp__", + "-D__linux__", #endif #ifdef __sxg__ "-D__sxg__", @@ -544,7 +553,7 @@ char *cpp_argv[ARGUMENTS] = { # define DEFAULT_OS_MINOR_REV "r %[0-9]" /* No information available to generate default OSTeenyVersion value. */ # define DEFAULT_OS_NAME "srvm %[^\n]" -#elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(linux) || defined(sony) +#elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__linux__) || defined(sony) /* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */ # define DEFAULT_OS_MAJOR_REV "r %[0-9]" # define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" @@ -556,29 +565,22 @@ char *cpp_argv[ARGUMENTS] = { # 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__) -/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */ -# 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(__osf__) -/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */ -# 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__) -/* NOTE: "x.y[.z]" above handles UXP/DF. This is a sample alternative. */ -/* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */ -# 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(__FreeBSD__) -/* NetBSD, OpenBSD, 386BSD, and BSD/OS too? */ +/* uname -r returns "x.y[.z]-mumble", e.g. "9.0-RELEASE" or "11.0-CURRENT" */ +# define DEFAULT_OS_MAJOR_REV "r %[0-9]" +# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" +# define DEFAULT_OS_TEENY_REV "v %*s %*s %*s r%[0-9]" +# define DEFAULT_OS_NAME "srm %[^\n]" +#elif defined(__NetBSD__) +/* 386BSD, and BSD/OS too? */ /* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */ # 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_TEENY_REV "r %*d.%*d.%[0-9]" +# define DEFAULT_OS_NAME "srm %[^\n]" +#elif defined(__OpenBSD__) +# define DEFAULT_OS_MAJOR_REV "r %[0-9]" +# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]" # define DEFAULT_OS_NAME "srm %[^\n]" #endif @@ -589,10 +591,12 @@ char *cpp_argv[ARGUMENTS] = { * them to the the following table. The definition of struct symtab is * in util/makedepend/def.h. */ +#undef DEF_EVALUATE +#undef DEF_STRINGIFY +#define DEF_EVALUATE(__x) #__x +#define DEF_STRINGIFY(_x) DEF_EVALUATE(_x) + struct symtab predefs[] = { -#ifdef apollo - {"apollo", "1"}, -#endif #ifdef ibm032 {"ibm032", "1"}, #endif @@ -668,8 +672,11 @@ struct symtab predefs[] = { #ifdef mc68020 {"mc68020", "1"}, #endif -#ifdef __GNUC__ - {"__GNUC__", "1"}, +#if defined(__GNUC__) && !defined(__linux__) + {"__GNUC__", DEF_STRINGIFY(__GNUC__)}, +#endif +#ifdef __GNUC_MINOR__ + {"__GNUC_MINOR__", DEF_STRINGIFY(__GNUC_MINOR__)}, #endif #if __STDC__ {"__STDC__", "1"}, @@ -728,27 +735,12 @@ struct symtab predefs[] = { {"_SYSTYPE_SYSV", "1"}, #endif #endif -#ifdef __OSF__ - {"__OSF__", "1"}, -#endif -#ifdef __osf__ - {"__osf__", "1"}, -#endif #ifdef __alpha {"__alpha", "1"}, #endif -#ifdef __DECC - {"__DECC", "1"}, -#endif -#ifdef __decc - {"__decc", "1"}, -#endif #ifdef __unix__ {"__unix__", "1"}, #endif -#ifdef __uxp__ - {"__uxp__", "1"}, -#endif #ifdef __sxg__ {"__sxg__", "1"}, #endif @@ -756,9 +748,6 @@ struct symtab predefs[] = { {"_SEQUENT_", "1"}, {"__STDC__", "1"}, #endif -#ifdef __bsdi__ - {"__bsdi__", "1"}, -#endif #ifdef nec_ews_svr2 {"nec_ews_svr2", "1"}, #endif @@ -800,6 +789,80 @@ struct symtab predefs[] = { #endif #ifdef __EMX__ {"__EMX__", "1"}, +#endif +# ifdef ia64 + {"ia64", "1"}, +# endif +# ifdef __ia64__ + {"__ia64__", "1"}, +# endif +# if defined (amd64) || defined (x86_64) + {"amd64", "1"}, + {"x86_64", "1"}, +# endif +# if defined (__amd64__) || defined (__x86_64__) + {"__amd64__", "1"}, + {"__x86_64__", "1"}, +# endif +# ifdef __i386 + {"__i386", "1"}, +# endif +# ifdef __i386__ + {"__i386__", "1"}, +# endif +# ifdef __i486__ + {"__i486__", "1"}, +# endif +# ifdef __i586__ + {"__i586__", "1"}, +# endif +# ifdef __i686__ + {"__i686__", "1"}, +# endif +# ifdef __k6__ + {"__k6__", "1"}, +# endif +# ifdef i386 + {"i386", "1"}, +# endif +# ifdef i486 + {"i486", "1"}, +# endif +# ifdef i586 + {"i586", "1"}, +# endif +# ifdef i686 + { "i686", "1"}, +# endif +# ifdef k6 + {"k6", "1"}, +# endif +# ifdef sparc + {"sparc", "1"}, +# endif +# ifdef __sparc__ + {"__sparc__", "1"}, +# endif +#if defined(__ppc__) + {"__ppc__", "1"}, +#endif +#if defined(__ppc64__) + {"__ppc64__", "1"}, +#endif +# ifdef __powerpc__ + {"__powerpc__", "1"}, +# endif +# ifdef __powerpc64__ + {"__powerpc64__", "1"}, +# endif +#if defined(__BIG_ENDIAN__) + {"__BIG_ENDIAN__", "1"}, +#endif +#if defined(__LITTLE_ENDIAN__) + {"__LITTLE_ENDIAN__", "1"}, +#endif +#if defined(__vxworks) + {"vxworks", "1"}, #endif /* add any additional symbols before this line */ {NULL, NULL}