summaryrefslogtreecommitdiff
path: root/gcc/fixinc/fixlib.c
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-04 21:42:00 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-04 21:42:00 +0000
commitcde396adc1149db3b9f67946fb53bc63136cf419 (patch)
tree8f81e15524ec14490e37b27653b87e0a00573278 /gcc/fixinc/fixlib.c
parent38cc6f0cb8e049d79a2d5f902c3220560747b744 (diff)
downloadgcc-cde396adc1149db3b9f67946fb53bc63136cf419.tar.gz
2000-02-04 Bruce Korb <bkorb@gnu.org>
* fixinc/genfixes(machname.h): Move the functionality from gen-machine.h into this file. UNdef MN_NAME_PAT if there are no names to change. Also, be a little kinder when AutoGen is not present. * fixinc/Makefile.in(machname.h): Change the generation rule to use genfixes. * fixinc/fixfixes.c(machine_name): machine_name_fix's functionality now dependent upon whether MN_NAME_PAT is defined. * fixinc/fixtests.c(machine_name): ditto. * fixinc/fixlib.c(mn_get_regexps): conditional on definition of MN_NAME_PAT. * fixinc/fixlib.h(mn_get_regexps): ditto * fixinc/gen-machine.h: DELETED git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31793 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc/fixlib.c')
-rw-r--r--gcc/fixinc/fixlib.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c
index 6ca564638fa..9c8e53408ee 100644
--- a/gcc/fixinc/fixlib.c
+++ b/gcc/fixinc/fixlib.c
@@ -181,7 +181,7 @@ compile_re( pat, re, match, e1, e2 )
Helper routine and data for the machine_name test and fix.
machname.h is created by black magic in the Makefile. */
-#include "machname.h"
+#ifdef MN_NAME_PAT
tSCC mn_label_pat[] = "^[ \t]*#[ \t]*(if|ifdef|ifndef)[ \t]+";
static regex_t mn_label_re;
@@ -191,16 +191,12 @@ static regex_t mn_name_re;
static int mn_compiled = 0;
-int
+void
mn_get_regexps( label_re, name_re, who )
regex_t **label_re;
regex_t **name_re;
tCC *who;
{
- /* Maybe we don't need to do this fix at all? */
- if (mn_name_pat[0] == '\0')
- return 1;
-
if (! mn_compiled)
{
compile_re (mn_label_pat, &mn_label_re, 1, "label pattern", who);
@@ -209,5 +205,5 @@ mn_get_regexps( label_re, name_re, who )
}
*label_re = &mn_label_re;
*name_re = &mn_name_re;
- return 0;
}
+#endif