From: Danny Smith Date: Tue, 2 Mar 2004 20:09:15 +0000 (+0000) Subject: cppinit.c (init_standard_includes): Check that sysroot string is not empty. X-Git-Tag: releases/gcc-3.3.4~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c53e4e8212e2a1a82c2f5565f32b159c1bbbb8f;p=thirdparty%2Fgcc.git cppinit.c (init_standard_includes): Check that sysroot string is not empty. * cppinit.c (init_standard_includes): Check that sysroot string is not empty. From-SVN: r78776 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 45a28d693e37..be13cd700fbf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-03-02 Danny Smith + + * cppinit.c (init_standard_includes): Check that sysroot + string is not empty. + 2004-03-01 Gabriel Dos Reis Backport from 3.4.0: diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 77d3d4220883..4cd3a786ec6a 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -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