summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>1994-04-06 00:04:56 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>1994-04-06 00:04:56 +0000
commitaed95d0d1f41b5b233aae90cc360ce69c831551c (patch)
tree4b36fc352f547548d4ca7e92de61c08c912cc203 /gcc/gcc.c
parentc3c01c5d611e2bcd247227e892d53db5361c3b89 (diff)
downloadgcc-aed95d0d1f41b5b233aae90cc360ce69c831551c.tar.gz
(process_command): Add "include" prefix for [blah/]stageN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 9ea6fb9bab3..0871edb53d2 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -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;