]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cppinit.c (init_standard_includes): Check that sysroot string is not empty.
authorDanny Smith <dannysmith@users.sourceforge.net>
Tue, 2 Mar 2004 20:09:15 +0000 (20:09 +0000)
committerDanny Smith <dannysmith@gcc.gnu.org>
Tue, 2 Mar 2004 20:09:15 +0000 (20:09 +0000)
* cppinit.c (init_standard_includes): Check that sysroot
string is not empty.

From-SVN: r78776

gcc/ChangeLog
gcc/cppinit.c

index 45a28d693e373786177c62a489e3b4b514fdc3fd..be13cd700fbf6169d131cab4b3b41179a131aac8 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-02  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * cppinit.c (init_standard_includes): Check that sysroot
+       string is not empty.
+
 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        Backport from 3.4.0:
index 77d3d4220883c4a82806668827734c99cb1c4827..4cd3a786ec6a222d0465ebcbfe53be28ae70e10c 100644 (file)
@@ -818,7 +818,8 @@ init_standard_includes (pfile)
              /* Should we be translating sysrooted dirs too?  Assume
                 that iprefix and sysroot are mutually exclusive, for
                 now.  */
-             if (p->add_sysroot && CPP_OPTION (pfile, sysroot))
+             if (p->add_sysroot && CPP_OPTION (pfile, sysroot)
+                 && *(CPP_OPTION (pfile, sysroot)))
                continue;
 
              /* Does this dir start with the prefix?  */
@@ -850,7 +851,8 @@ init_standard_includes (pfile)
          char *str;
 
          /* Should this dir start with the sysroot?  */
-         if (p->add_sysroot && CPP_OPTION (pfile, sysroot))
+         if (p->add_sysroot && CPP_OPTION (pfile, sysroot)
+             && *(CPP_OPTION (pfile, sysroot)))
            str = concat (CPP_OPTION (pfile, sysroot), p->fname, NULL);
 
          else