diff options
| author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 13:32:57 +0000 |
|---|---|---|
| committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 13:32:57 +0000 |
| commit | 31b04dee8eb4afbb67f914bf9286b1adb271e820 (patch) | |
| tree | 46be915f501e15ade713cd78a6d183f24dbe2920 /gcc/fixinc/fixlib.c | |
| parent | eea75c62dcbf1b56c47134dbd5c703fdaac76f9d (diff) | |
| download | ppe42-gcc-31b04dee8eb4afbb67f914bf9286b1adb271e820.tar.gz ppe42-gcc-31b04dee8eb4afbb67f914bf9286b1adb271e820.zip | |
2004-08-30 Paolo Bonzini <bonzini@gnu.org>
* fixinc/Makefile.in (machname.h): Remove.
(fixincl.x): Do not pass $@ to genfixes.
* fixinc/genfixes: Remove code to produce machname.h.
* fixinc/fixincl.sh: Move it here instead.
* fixinc/fixlib.c: Do not conditionalize on MN_NAME_PAT's presence,
instead check if pz_mn_name_pat is NULL. Make mn_get_regexps
return a bool indicating whether pz_mn_name_pat is NULL.
* fixinc/fixlib.h: Do not conditionalize on MN_NAME_PAT's presence.
Declare extern C variables for the ENV_TABLE.
* fixinc/fixfixes.c: Do not conditionalize on MN_NAME_PAT's presence,
instead use the result of mn_get_regexps.
* fixinc/fixtests.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86771 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc/fixlib.c')
| -rw-r--r-- | gcc/fixinc/fixlib.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c index 99d04cc5531..e0fa94a14ba 100644 --- a/gcc/fixinc/fixlib.c +++ b/gcc/fixinc/fixlib.c @@ -204,32 +204,30 @@ compile_re( tCC* pat, regex_t* re, int match, tCC* e1, tCC* e2 ) /* * * * * * * * * * * * * - Helper routine and data for the machine_name test and fix. - machname.h is created by black magic in the Makefile. */ - -#ifdef MN_NAME_PAT + Helper routine and data for the machine_name test and fix. */ tSCC mn_label_pat[] = "^[ \t]*#[ \t]*(if|ifdef|ifndef)[ \t]+"; static regex_t mn_label_re; - -tSCC mn_name_pat[] = MN_NAME_PAT; static regex_t mn_name_re; static int mn_compiled = 0; -void +t_bool mn_get_regexps(regex_t** label_re, regex_t** name_re, tCC* who ) { + if (! pz_mn_name_pat) + return BOOL_FALSE; + if (! mn_compiled) { compile_re (mn_label_pat, &mn_label_re, 1, "label pattern", who); - compile_re (mn_name_pat, &mn_name_re, 1, "name pattern", who); + compile_re (pz_mn_name_pat, &mn_name_re, 1, "name pattern", who); mn_compiled++; } *label_re = &mn_label_re; *name_re = &mn_name_re; + return BOOL_TRUE; } -#endif #ifdef SEPARATE_FIX_PROC |

