From 7c53e4e8212e2a1a82c2f5565f32b159c1bbbb8f Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Tue, 2 Mar 2004 20:09:15 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/cppinit.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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 -- 2.47.2