diff options
author | Doug Evans <dje@gnu.org> | 1994-04-06 00:04:56 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1994-04-06 00:04:56 +0000 |
commit | ea694f2d44213d1db71d7f163100f939cd1cd0c4 (patch) | |
tree | 4b36fc352f547548d4ca7e92de61c08c912cc203 | |
parent | 5625b0521defe673b22cd65c99f1134a6d2944e0 (diff) | |
download | gcc-ea694f2d44213d1db71d7f163100f939cd1cd0c4.zip gcc-ea694f2d44213d1db71d7f163100f939cd1cd0c4.tar.gz gcc-ea694f2d44213d1db71d7f163100f939cd1cd0c4.tar.bz2 |
(process_command): Add "include" prefix for [blah/]stageN.
From-SVN: r6968
-rw-r--r-- | gcc/gcc.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -2432,12 +2432,16 @@ process_command (argc, argv) add_prefix (&include_prefix, concat (value, "include", ""), 1, 0, 0); - /* As a kludge, if the arg is "stageN/", just add + /* As a kludge, if the arg is "[blah/]stageN/", just add "include" to the include prefix. */ - if (strlen (value) == 7 && value[6] == '/' - && strncmp (value, "stage", 5) == 0 - && isdigit (value[5])) - add_prefix (&include_prefix, "include", 1, 0, 0); + { + int len = strlen (value); + if ((len == 7 || (len > 7 && value[len-8] == '/')) + && strncmp (value+len-7, "stage", 5) == 0 + && isdigit (value[len-2]) + && value[len-1] == '/') + add_prefix (&include_prefix, "include", 1, 0, 0); + } } break; |