Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.221
 
1.222
 
MAIN:ragge:20120802180751
 
cc.c
_>11 /*      $Id$    */
<> 2+
  3+/*-
  4+ * Copyright (c) 2011 Joerg Sonnenberger <joerg@NetBSD.org>.
  5+ * All rights reserved.
  6+ *
  7+ * Redistribution and use in source and binary forms, with or without
  8+ * modification, are permitted provided that the following conditions
  9+ * are met:
  10+ *
  11+ * 1. Redistributions of source code must retain the above copyright
  12+ *    notice, this list of conditions and the following disclaimer.
  13+ * 2. Redistributions in binary form must reproduce the above copyright
  14+ *    notice, this list of conditions and the following disclaimer in
  15+ *    the documentation and/or other materials provided with the
  16+ *    distribution.
  17+ *
  18+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  21+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
  22+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  23+ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
  24+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  26+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  27+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  28+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29+ * SUCH DAMAGE.
  30+ */
  31+
232 /*
 333  * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
 434  *
     
 !
6999 #ifdef HAVE_UNISTD_H
 70100 #include <unistd.h>
 71101 #endif
<> 102+#include <assert.h>
72103 
 73104 #ifdef os_win32
 74105 #include <windows.h>
     
 !
155186 void oerror(char *);
 156187 char *argnxt(char *, char *);
 157188 char *nxtopt(char *o);
<> 189+void setup_cpp_flags(void);
  190+static void expand_sysroot(void);
158191 #ifdef os_win32
 159192 char *win32pathsubst(char *);
 160193 char *win32commandline(char *, char *[]);
     
 !
214247 char    *passxx0 = LIBEXECDIR "cxxcom";
 215248 char    *as = ASSEMBLER;
 216249 char    *ld = LINKER;
<>217 -char    *sysroot;
  250+char    *sysroot = "", *isysroot;
218251 char *cppadd[] = CPPADD;
 219252 #ifdef DYNLINKER
 220253 char *dynlinker[] = DYNLINKER;
     
 !
237270 char *startfiles_S[] = STARTFILES_S;
 238271 char *endfiles_S[] = ENDFILES_S;
 239272 #endif
<>240 -#ifdef MULTITARGET
 241 -char *mach = DEFMACH;
 242 -struct cppmd {
 243 -        char *mach;
 244 -        char *cppmdadd[MAXCPPMDARGS];
 245 -};
 246 -
 247 -struct cppmd cppmds[] = CPPMDADDS;
 248 -#else
249273 char *cppmdadd[] = CPPMDADD;
<>250 -#endif
251274 #ifdef LIBCLIBS
 252275 char *libclibs[] = LIBCLIBS;
 253276 #else
     
 !
357380 struct strlist incdirs;
 358381 struct strlist user_sysincdirs;
 359382 struct strlist includes;
<> 383+struct strlist sysincdirs;
  384+struct strlist crtdirs;
  385+struct strlist libdirs;
  386+struct strlist progdirs;
360387 
 361388 int
 362389 main(int argc, char *argv[])
     
 !
366393         char *t, *u, *argp;
 367394         char *assource;
 368395         int nc, nl, nas, ncpp, i, j, c, nxo, na;
<>369 -#ifdef MULTITARGET
 370 -        int k;
 371 -#endif
  396+
372397         lav = argv;
 373398         lac = argc;
 374399 
<> 400+        strlist_init(&crtdirs);
  401+        strlist_init(&libdirs);
  402+        strlist_init(&progdirs);
375403         strlist_init(&preprocessor_flags);
 376404         strlist_init(&incdirs);
 377405         strlist_init(&user_sysincdirs);
 378406         strlist_init(&includes);
<> 407+        strlist_init(&sysincdirs);
379408 
 380409         if ((t = strrchr(argv[0], '/')))
 381410                 t = copy(t+1, 0);
     
 !
457486                         add_prefix(argp + 2);
 458487                         break;
 459488 
<>460 -#ifdef MULTITARGET
 461 -                case 'b':
 462 -                        t = &argp[2];
 463 -                        if (*t == '\0' && i + 1 < argc) {
 464 -                                t = nxtopt(0);
 465 -                        }
 466 -                        if (strncmp(t, "?", 1) == 0) {
 467 -                                /* show machine targets */
 468 -                                printf("Available machine targets:");
 469 -                                for (j=0; cppmds[j].mach; j++)
 470 -                                        printf(" %s",cppmds[j].mach);
 471 -                                printf("\n");
 472 -                                exit(0);
 473 -                        }
 474 -                        for (j=0; cppmds[j].mach; j++)
 475 -                                if (strcmp(t, cppmds[j].mach) == 0) {
 476 -                                        mach = cppmds[j].mach;
 477 -                                        break;
 478 -                                }
 479 -                        if (cppmds[j].mach == NULL)
 480 -                                errorx(1, "unknown target arch %s", t);
 481 -                        break;
 482 -#endif
 483 -
484489                 case 'C':
 485490                         if (match(argp, "-C") || match(argp, "-CC"))
 486491                                 strlist_append(&preprocessor_flags, argp);
     
 !
597602                                 strlist_append(&user_sysincdirs, nxtopt(0));
 598603                         } else if (match(argp, "-include")) {
 599604                                 strlist_append(&includes, nxtopt(0));
<> 605+                        } else if (match(argp, "-isysroot")) {
  606+                                isysroot = nxtopt(0);
600607                         } else if (strcmp(argp, "-idirafter") == 0) {
<>601 -                                idirafter = nxtopt("-idirafter");
  608+                                idirafter = nxtopt(0);
602609 #ifdef os_darwin
 603610                         } else if (strcmp(argp, "-install_name") == 0) {
 604611                                 llist[nl++] = argp;
     
 !
821828                                 nxo++;
 822829                 }
 823830         }
<> 831+
  832+        setup_cpp_flags();
  833+
  834+        if (isysroot == NULL)
  835+                isysroot = sysroot;
  836+        expand_sysroot();
  837+
824838         /* Sanity checking */
 825839         if (cppflag) {
 826840                 if (nc == 0)
     
 !
847861                 signal(SIGINT, idexit);
 848862         if (signal(SIGTERM, SIG_IGN) != SIG_IGN)        /* terminate */
 849863                 signal(SIGTERM, idexit);
<>850 -#ifdef MULTITARGET
 851 -        pass0 = cat(LIBEXECDIR "/ccom_", mach);
 852 -#endif
  864+
853865         for (i=0; i<nc; i++) {
 854866                 /*
 855867                  * C preprocessor
     
 !
870882                         assource = clist[i];
 871883                         goto assemble;
 872884                 }
<> 885+
  886+
873887                 if (pflag)
 874888                         tmp4 = setsuf(clist[i], 'i');
 875889                 na = 0;
 876890                 av[na++] = "cpp";
<>877 -                if (vflag)
 878 -                        av[na++] = "-v";
 879 -                av[na++] = "-D__PCC__=" MKS(PCC_MAJOR);
 880 -                av[na++] = "-D__PCC_MINOR__=" MKS(PCC_MINOR);
 881 -                av[na++] = "-D__PCC_MINORMINOR__=" MKS(PCC_MINORMINOR);
 882 -#ifndef os_win32
 883 -#ifdef GCC_COMPAT
 884 -                av[na++] = "-D__GNUC__=4";
 885 -                av[na++] = "-D__GNUC_MINOR__=3";
 886 -                av[na++] = "-D__GNUC_PATCHLEVEL__=1";
 887 -                if (xgnu89)
 888 -                        av[na++] = "-D__GNUC_GNU_INLINE__";
 889 -                else
 890 -                        av[na++] = "-D__GNUC_STDC_INLINE__";
 891 -#endif
 892 -#endif
 893 -                av[na++] = "-D__VERSION__=" MKS(VERSSTR);
 894 -                av[na++] = "-D__SCHAR_MAX__=" MKS(MAX_CHAR);
 895 -                av[na++] = "-D__SHRT_MAX__=" MKS(MAX_SHORT);
 896 -                av[na++] = "-D__INT_MAX__=" MKS(MAX_INT);
 897 -                av[na++] = "-D__LONG_MAX__=" MKS(MAX_LONG);
 898 -                av[na++] = "-D__LONG_LONG_MAX__=" MKS(MAX_LONGLONG);
 899 -                if (freestanding)
 900 -                        av[na++] = "-D__STDC_HOSTED__=0";
 901 -                else
 902 -                        av[na++] = "-D__STDC_HOSTED__=1";
 903 -                if (cxxflag)
 904 -                        av[na++] = "-D__cplusplus";
 905 -                if (xuchar)
 906 -                        av[na++] = "-D__CHAR_UNSIGNED__";
 907 -                if (ascpp)
 908 -                        av[na++] = "-D__ASSEMBLER__";
 909 -                if (sspflag)
 910 -                        av[na++] = "-D__SSP__";
 911 -                if (pthreads)
 912 -                        av[na++] = "-D_PTHREADS";
  891+
913892                 if (Mflag)
 914893                         av[na++] = "-M";
 915894                 if (MPflag)
 916895                         av[na++] = "-xMP";
 917896                 for (j = 0; j < nMfiles; j++)
 918897                         av[na++] = Mfiles[j];
<>919 -                if (Oflag)
 920 -                        av[na++] = "-D__OPTIMIZE__";
 921 -#ifdef GCC_COMPAT
 922 -                av[na++] = "-D__REGISTER_PREFIX__=" REGISTER_PREFIX;
 923 -                av[na++] = "-D__USER_LABEL_PREFIX__=" USER_LABEL_PREFIX;
 924 -#endif
 925 -                for (j = 0; cppadd[j]; j++)
 926 -                        av[na++] = cppadd[j];
927898                 STRLIST_FOREACH(s, &preprocessor_flags) {
 928899                         av[na++] = s->value;
 929900                 }
     
 !
939910                         av[na++] = "-S";
 940911                         av[na++] = s->value;
 941912                 }
<>942 -                av[na++] = "-D__STDC_ISO_10646__=200009L";
 943 -                av[na++] = "-D__WCHAR_TYPE__=" WCT;
 944 -                av[na++] = "-D__SIZEOF_WCHAR_T__=" MKS(WCHAR_SIZE);
 945 -                av[na++] = "-D__WCHAR_MAX__=" WCM;
 946 -                av[na++] = "-D__WINT_TYPE__=" PCC_WINT_TYPE;
 947 -                av[na++] = "-D__SIZE_TYPE__=" PCC_SIZE_TYPE;
 948 -                av[na++] = "-D__PTRDIFF_TYPE__=" PCC_PTRDIFF_TYPE;
 949 -                av[na++] = "-D__SIZEOF_WINT_T__=4";
 950 -#if defined(os_darwin) || defined(os_netbsd)
 951 -                av[na++] = "-D__FLT_RADIX__=2";
 952 -                av[na++] = "-D__FLT_DIG__=6";
 953 -                av[na++] = "-D__FLT_EPSILON__=1.19209290e-07F";
 954 -                av[na++] = "-D__FLT_MANT_DIG__=24";
 955 -                av[na++] = "-D__FLT_MAX_10_EXP__=38";
 956 -                av[na++] = "-D__FLT_MAX_EXP__=128";
 957 -                av[na++] = "-D__FLT_MAX__=3.40282347e+38F";
 958 -                av[na++] = "-D__FLT_MIN_10_EXP__=(-37)";
 959 -                av[na++] = "-D__FLT_MIN_EXP__=(-125)";
 960 -                av[na++] = "-D__FLT_MIN__=1.17549435e-38F";
 961 -                av[na++] = "-D__DBL_DIG__=15";
 962 -                av[na++] = "-D__DBL_EPSILON__=2.2204460492503131e-16";
 963 -                av[na++] = "-D__DBL_MANT_DIG__=53";
 964 -                av[na++] = "-D__DBL_MAX_10_EXP__=308";
 965 -                av[na++] = "-D__DBL_MAX_EXP__=1024";
 966 -                av[na++] = "-D__DBL_MAX__=1.7976931348623157e+308";
 967 -                av[na++] = "-D__DBL_MIN_10_EXP__=(-307)";
 968 -                av[na++] = "-D__DBL_MIN_EXP__=(-1021)";
 969 -                av[na++] = "-D__DBL_MIN__=2.2250738585072014e-308";
 970 -#if defined(mach_i386) || defined(mach_amd64)
 971 -                av[na++] = "-D__LDBL_DIG__=18";
 972 -                av[na++] = "-D__LDBL_EPSILON__=1.08420217248550443401e-19L";
 973 -                av[na++] = "-D__LDBL_MANT_DIG__=64";
 974 -                av[na++] = "-D__LDBL_MAX_10_EXP__=4932";
 975 -                av[na++] = "-D__LDBL_MAX_EXP__=16384";
 976 -                av[na++] = "-D__LDBL_MAX__=1.18973149535723176502e+4932L";
 977 -                av[na++] = "-D__LDBL_MIN_10_EXP__=(-4931)";
 978 -                av[na++] = "-D__LDBL_MIN_EXP__=(-16381)";
 979 -                av[na++] = "-D__LDBL_MIN__=3.36210314311209350626e-4932L";
 980 -#else
 981 -                av[na++] = "-D__LDBL_DIG__=15";
 982 -                av[na++] = "-D__LDBL_EPSILON__=2.2204460492503131e-16";
 983 -                av[na++] = "-D__LDBL_MANT_DIG__=53";
 984 -                av[na++] = "-D__LDBL_MAX_10_EXP__=308";
 985 -                av[na++] = "-D__LDBL_MAX_EXP__=1024";
 986 -                av[na++] = "-D__LDBL_MAX__=1.7976931348623157e+308";
 987 -                av[na++] = "-D__LDBL_MIN_10_EXP__=(-307)";
 988 -                av[na++] = "-D__LDBL_MIN_EXP__=(-1021)";
 989 -                av[na++] = "-D__LDBL_MIN__=2.2250738585072014e-308";
 990 -#endif
 991 -#endif
 992 -#ifdef MULTITARGET
 993 -                for (k = 0; cppmds[k].mach; k++) {
 994 -                        if (strcmp(cppmds[k].mach, mach) != 0)
 995 -                                continue;
 996 -                        for (j = 0; cppmds[k].cppmdadd[j]; j++)
 997 -                                av[na++] = cppmds[k].cppmdadd[j];
 998 -                        break;
 999 -                }
 1000 -#else
 1001 -                for (j = 0; cppmdadd[j]; j++)
 1002 -                        av[na++] = cppmdadd[j];
 1003 -#endif
 1004 -                if (tflag)
 1005 -                        av[na++] = "-t";
  913+
1006914                 if (!nostdinc) {
<>1007 -                        av[na++] = "-S", av[na++] = cat(sysroot, altincdir);
 1008 -                        av[na++] = "-S", av[na++] = cat(sysroot, incdir);
 1009 -#ifdef PCCINCDIR
 1010 -                        if (cxxflag)
 1011 -                                av[na++] = "-S", av[na++] = pxxincdir;
 1012 -                        av[na++] = "-S", av[na++] = pccincdir;
 1013 -#endif
  915+                        STRLIST_FOREACH(s, &sysincdirs) {
  916+                                av[na++] = "-S";
  917+                                av[na++] = s->value;
  918+                        }
1014919                 }
<> 920+
1015921                 if (idirafter) {
 1016922                         av[na++] = "-I";
 1017923                         av[na++] = idirafter;
     
 !
13591265                 }
 13601266         }
 13611267 #ifdef notdef
<> 1268+        strlist_free(&crtdirs);
  1269+        strlist_free(&libdirs);
  1270+        strlist_free(&progdirs);
13621271         strlist_free(&incdirs);
 13631272         strlist_free(&preprocessor_flags);
 13641273         strlist_free(&user_sysincdirs);
 13651274         strlist_free(&includes);
<> 1275+        strlist_free(&sysincdirs);
13661276 #endif
 13671277         dexit(eflag);
 13681278         return 0;
     
 !
16981608         return rv;
 16991609 }
 17001610 
<> 1611+static void
  1612+expand_sysroot(void)
  1613+{
  1614+        struct string *s;
  1615+        struct strlist *lists[] = { &crtdirs, &sysincdirs, &incdirs,
  1616+            &user_sysincdirs, &libdirs, &progdirs, NULL };
  1617+        const char *sysroots[] = { sysroot, isysroot, isysroot, isysroot,
  1618+            sysroot, sysroot, NULL };
  1619+        size_t i, sysroot_len, value_len;
  1620+        char *path;
  1621+
  1622+        assert(sizeof(lists) / sizeof(lists[0]) ==
  1623+               sizeof(sysroots) / sizeof(sysroots[0]));
  1624+
  1625+        for (i = 0; lists[i] != NULL; ++i) {
  1626+                STRLIST_FOREACH(s, lists[i]) {
  1627+                        if (s->value[0] != '=')
  1628+                                continue;
  1629+                        sysroot_len = strlen(sysroots[i]);
  1630+                        /* Skipped '=' compensates additional space for '\0' */
  1631+                        value_len = strlen(s->value);
  1632+                        path = xmalloc(sysroot_len + value_len);
  1633+                        memcpy(path, sysroots[i], sysroot_len);
  1634+                        memcpy(path + sysroot_len, s->value + 1, value_len);
  1635+                        free(s->value);
  1636+                        s->value = path;
  1637+                }
  1638+        }
  1639+}
  1640+
  1641+
17011642 void
 17021643 oerror(char *s)
 17031644 {
     
 !
17441685         return lav[0];
 17451686 }
 17461687 
<> 1688+struct flgcheck {
  1689+        int *flag;
  1690+        int set;
  1691+        char *def;
  1692+} cppflgcheck[] = {
  1693+        { &vflag, 1, "-v" },
  1694+        { &freestanding, 1, "-D__STDC_HOSTED__=0" },
  1695+        { &freestanding, 0, "-D__STDC_HOSTED__=1" },
  1696+        { &cxxflag, 1, "-D__cplusplus" },
  1697+        { &xuchar, 1, "-D__CHAR_UNSIGNED__" },
  1698+        { &ascpp, 1, "-D__ASSEMBLER__" },
  1699+        { &sspflag, 1, "-D__SSP__" },
  1700+        { &pthreads, 1, "-D_PTHREADS" },
  1701+        { &Oflag, 1, "-D__OPTIMIZE__" },
  1702+        { &tflag, 1, "-t" },
  1703+        { 0 },
  1704+};
  1705+
  1706+static void
  1707+cksetflags(struct flgcheck *fs, struct strlist *sl)
  1708+{
  1709+
  1710+        for (; fs->flag; fs++) {
  1711+                if (fs->set && *fs->flag)
  1712+                        strlist_append(sl, fs->def);
  1713+                if (!fs->set && !*fs->flag)
  1714+                        strlist_append(sl, fs->def);
  1715+        }
  1716+}
  1717+
  1718+static char *defflags[] = {
  1719+        "-D__PCC__=" MKS(PCC_MAJOR),
  1720+        "-D__PCC_MINOR__=" MKS(PCC_MINOR),
  1721+        "-D__PCC_MINORMINOR__=" MKS(PCC_MINORMINOR),
  1722+        "-D__VERSION__=" MKS(VERSSTR),
  1723+        "-D__SCHAR_MAX__=" MKS(MAX_CHAR),
  1724+        "-D__SHRT_MAX__=" MKS(MAX_SHORT),
  1725+        "-D__INT_MAX__=" MKS(MAX_INT),
  1726+        "-D__LONG_MAX__=" MKS(MAX_LONG),
  1727+        "-D__LONG_LONG_MAX__=" MKS(MAX_LONGLONG),
  1728+
  1729+        "-D__STDC_ISO_10646__=200009L",
  1730+        "-D__WCHAR_TYPE__=" WCT,
  1731+        "-D__SIZEOF_WCHAR_T__=" MKS(WCHAR_SIZE),
  1732+        "-D__WCHAR_MAX__=" WCM,
  1733+        "-D__WINT_TYPE__=" PCC_WINT_TYPE,
  1734+        "-D__SIZE_TYPE__=" PCC_SIZE_TYPE,
  1735+        "-D__PTRDIFF_TYPE__=" PCC_PTRDIFF_TYPE,
  1736+        "-D__SIZEOF_WINT_T__=4",
  1737+};
  1738+
  1739+static char *gcppflags[] = {
  1740+#ifndef os_win32
  1741+#ifdef GCC_COMPAT
  1742+        "-D__GNUC__=4",
  1743+        "-D__GNUC_MINOR__=3",
  1744+        "-D__GNUC_PATCHLEVEL__=1",
  1745+        "-D__REGISTER_PREFIX__=" REGISTER_PREFIX,
  1746+        "-D__USER_LABEL_PREFIX__=" USER_LABEL_PREFIX,
  1747+#endif
  1748+#endif
  1749+};
  1750+
  1751+/* These should _not_ be defined here */
  1752+static char *fpflags[] = {
  1753+#if defined(os_darwin) || defined(os_netbsd)
  1754+        "-D__FLT_RADIX__=2";
  1755+        "-D__FLT_DIG__=6";
  1756+        "-D__FLT_EPSILON__=1.19209290e-07F";
  1757+        "-D__FLT_MANT_DIG__=24";
  1758+        "-D__FLT_MAX_10_EXP__=38";
  1759+        "-D__FLT_MAX_EXP__=128";
  1760+        "-D__FLT_MAX__=3.40282347e+38F";
  1761+        "-D__FLT_MIN_10_EXP__=(-37)";
  1762+        "-D__FLT_MIN_EXP__=(-125)";
  1763+        "-D__FLT_MIN__=1.17549435e-38F";
  1764+        "-D__DBL_DIG__=15";
  1765+        "-D__DBL_EPSILON__=2.2204460492503131e-16";
  1766+        "-D__DBL_MANT_DIG__=53";
  1767+        "-D__DBL_MAX_10_EXP__=308";
  1768+        "-D__DBL_MAX_EXP__=1024";
  1769+        "-D__DBL_MAX__=1.7976931348623157e+308";
  1770+        "-D__DBL_MIN_10_EXP__=(-307)";
  1771+        "-D__DBL_MIN_EXP__=(-1021)";
  1772+        "-D__DBL_MIN__=2.2250738585072014e-308";
  1773+#if defined(mach_i386) || defined(mach_amd64)
  1774+        "-D__LDBL_DIG__=18";
  1775+        "-D__LDBL_EPSILON__=1.08420217248550443401e-19L";
  1776+        "-D__LDBL_MANT_DIG__=64";
  1777+        "-D__LDBL_MAX_10_EXP__=4932";
  1778+        "-D__LDBL_MAX_EXP__=16384";
  1779+        "-D__LDBL_MAX__=1.18973149535723176502e+4932L";
  1780+        "-D__LDBL_MIN_10_EXP__=(-4931)";
  1781+        "-D__LDBL_MIN_EXP__=(-16381)";
  1782+        "-D__LDBL_MIN__=3.36210314311209350626e-4932L";
  1783+#else
  1784+        "-D__LDBL_DIG__=15";
  1785+        "-D__LDBL_EPSILON__=2.2204460492503131e-16";
  1786+        "-D__LDBL_MANT_DIG__=53";
  1787+        "-D__LDBL_MAX_10_EXP__=308";
  1788+        "-D__LDBL_MAX_EXP__=1024";
  1789+        "-D__LDBL_MAX__=1.7976931348623157e+308";
  1790+        "-D__LDBL_MIN_10_EXP__=(-307)";
  1791+        "-D__LDBL_MIN_EXP__=(-1021)";
  1792+        "-D__LDBL_MIN__=2.2250738585072014e-308";
  1793+#endif
  1794+#endif
  1795+};
  1796+
  1797+
  1798+/*
  1799+ * Configure the standard cpp flags.
  1800+ */
  1801+void
  1802+setup_cpp_flags(void)
  1803+{
  1804+        int i;
  1805+
  1806+        /* a bunch of misc defines */
  1807+        for (i = 0; i < (int)sizeof(defflags)/(int)sizeof(char *); i++)
  1808+                strlist_append(&preprocessor_flags, defflags[i]);
  1809+
  1810+        for (i = 0; i < (int)sizeof(gcppflags)/(int)sizeof(char *); i++)
  1811+                strlist_append(&preprocessor_flags, gcppflags[i]);
  1812+        strlist_append(&preprocessor_flags, xgnu89 ?
  1813+            "-D__GNUC_GNU_INLINE__" : "-D__GNUC_STDC_INLINE__");
  1814+
  1815+        cksetflags(cppflgcheck, &preprocessor_flags);
  1816+
  1817+        for (i = 0; i < (int)sizeof(fpflags)/(int)sizeof(char *); i++)
  1818+                strlist_append(&preprocessor_flags, fpflags[i]);
  1819+
  1820+        for (i = 0; cppadd[i]; i++)
  1821+                strlist_append(&preprocessor_flags, cppadd[i]);
  1822+        for (i = 0; cppmdadd[i]; i++)
  1823+                strlist_append(&preprocessor_flags, cppmdadd[i]);
  1824+
  1825+        /* Include dirs */
  1826+        strlist_append(&sysincdirs, "=" INCLUDEDIR "pcc/");
  1827+        strlist_append(&sysincdirs, "=" STDINC);
  1828+        if (cxxflag)
  1829+                strlist_append(&sysincdirs, "=" PCCINCDIR "/c++");
  1830+        strlist_append(&sysincdirs, "=" PCCINCDIR);
  1831+}
  1832+
<_17471833 #ifdef os_win32
 17481834 char *
 17491835 win32pathsubst(char *s)
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-21 06:23 +0200