diff options
author | Bruce Korb <bkorb@gnu.org> | 2000-02-04 21:42:00 +0000 |
---|---|---|
committer | Bruce Korb <korbb@gcc.gnu.org> | 2000-02-04 21:42:00 +0000 |
commit | bff0dc38c2f7a20945942c52039866a82572e5ef (patch) | |
tree | 8f81e15524ec14490e37b27653b87e0a00573278 /gcc/fixinc/fixlib.c | |
parent | 1c71e60ef78d26b2146bdcf45f2177722ec1ff30 (diff) | |
download | gcc-bff0dc38c2f7a20945942c52039866a82572e5ef.zip gcc-bff0dc38c2f7a20945942c52039866a82572e5ef.tar.gz gcc-bff0dc38c2f7a20945942c52039866a82572e5ef.tar.bz2 |
genfixes (machname.h): Move the functionality from gen-machine.h into this file.
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
From-SVN: r31793
Diffstat (limited to 'gcc/fixinc/fixlib.c')
-rw-r--r-- | gcc/fixinc/fixlib.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c index 6ca5646..9c8e534 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 |