Commit 5c0d5b94 by Zack Weinberg Committed by Zack Weinberg

Makefile.in: Correct dependencies of fixincl and fixincl.o.

	* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
	* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
	(fix_char_macro_defines, fix_char_macro_uses): New functions.

	* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
	Recognize Emacs mode markers also.
	* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
	C++ comments in C++ headers.  Call is_cxx_header only if
	necessary.

	* fixinc/inclhack.def (avoid_bool): Add select for the problem and
	bypass for ncurses.
	(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
	(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
	... these, which use the new C fixes.
	(math_exception): Escape literal '+' in bypass expression.

	* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
	Regenerate.

From-SVN: r31512
parent 5170877a
2000-01-19 Zack Weinberg <zack@wolery.cumb.org>
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
(fix_char_macro_defines, fix_char_macro_uses): New functions.
* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
Recognize Emacs mode markers also.
* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
C++ comments in C++ headers. Call is_cxx_header only if
necessary.
* fixinc/inclhack.def (avoid_bool): Add select for the problem and
bypass for ncurses.
(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
... these, which use the new C fixes.
(math_exception): Escape literal '+' in bypass expression.
* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
Regenerate.
2000-01-19 Geoff Keating <geoffk@cygnus.com> 2000-01-19 Geoff Keating <geoffk@cygnus.com>
* rtlanal.c (reg_referenced_p): A CLOBBER of a MEM uses any REGs * rtlanal.c (reg_referenced_p): A CLOBBER of a MEM uses any REGs
......
...@@ -76,7 +76,7 @@ gen : $(SH_TARGET) fixincl.x ...@@ -76,7 +76,7 @@ gen : $(SH_TARGET) fixincl.x
$(FIOBJ): $(HDR) $(FIOBJ): $(HDR)
fixincl: $(FIOBJ) fixfixes fixtests fixincl: $(FIOBJ)
@echo $(CC) -o $@ $(FIOBJ) $(LIBERTY) $(LIB) ; \ @echo $(CC) -o $@ $(FIOBJ) $(LIBERTY) $(LIB) ; \
if $(CC) -o $@ $(FIOBJ) $(LIBERTY) $(LIB) ; then : ; else \ if $(CC) -o $@ $(FIOBJ) $(LIBERTY) $(LIB) ; then : ; else \
rm -f $@ ; (echo "#! /bin/sh" ; echo exit 1 ) > $@ ; \ rm -f $@ ; (echo "#! /bin/sh" ; echo exit 1 ) > $@ ; \
...@@ -94,7 +94,7 @@ gnu-regex.o: gnu-regex.c ...@@ -94,7 +94,7 @@ gnu-regex.o: gnu-regex.c
-$(CC) $(CFLAGS) $(FIXINC_DEFS) $(INCLUDES) -DREGEX_MALLOC \ -$(CC) $(CFLAGS) $(FIXINC_DEFS) $(INCLUDES) -DREGEX_MALLOC \
-c $(srcdir)/gnu-regex.c -c $(srcdir)/gnu-regex.c
fixincl.o : fixincl.x fixincl.c fixincl.o : fixincl.x fixincl.c fixfixes.c fixtests.c
server.o : server.c server.h server.o : server.c server.h
procopen.o : procopen.c server.h procopen.o : procopen.c server.h
......
...@@ -73,7 +73,11 @@ typedef struct { ...@@ -73,7 +73,11 @@ typedef struct {
#define FIXUP_TABLE \ #define FIXUP_TABLE \
_FT_( "no_double_slash", double_slash_fix ) \ _FT_( "no_double_slash", double_slash_fix ) \
_FT_( "else_endif_label", else_endif_label_fix ) _FT_( "else_endif_label", else_endif_label_fix ) \
_FT_( "IO_use", IO_use_fix ) \
_FT_( "CTRL_use", CTRL_use_fix) \
_FT_( "IO_defn", IO_defn_fix ) \
_FT_( "CTRL_defn", CTRL_defn_fix )
#define FIX_PROC_HEAD( fix ) \ #define FIX_PROC_HEAD( fix ) \
...@@ -354,6 +358,196 @@ FIX_PROC_HEAD( else_endif_label_fix ) ...@@ -354,6 +358,196 @@ FIX_PROC_HEAD( else_endif_label_fix )
return; return;
} }
/* Scan the input file for all occurrences of text like this:
#define TIOCCONS _IO(T, 12)
and change them to read like this:
#define TIOCCONS _IO('T', 12)
which is the required syntax per the C standard. (The definition of
_IO also has to be tweaked - see below.) 'IO' is actually whatever you
provide in the STR argument. */
void
fix_char_macro_uses (text, str)
const char *text;
const char *str;
{
/* This regexp looks for a traditional-syntax #define (# in column 1)
of an object-like macro. */
static const char pat[] =
"^#[ \t]*define[ \t]+[A-Za-z][A-Za-z0-9]*[ \t]+";
static regex_t re;
regmatch_t rm[1];
const char *p, *limit;
size_t len = strlen (str);
compile_re (pat, &re, 1, "macro pattern", "fix_char_macro_uses");
for (p = text;
regexec (&re, p, 1, rm, 0) == 0;
p = limit + 1)
{
/* p + rm[0].rm_eo is the first character of the macro replacement.
Find the end of the macro replacement, and the STR we were
sent to look for within the replacement. */
p += rm[0].rm_eo;
limit = p - 1;
do
{
limit = strchr (limit + 1, '\n');
if (!limit)
goto done;
}
while (limit[-1] == '\\');
do
{
if (*p == str[0] && !strncmp (p+1, str+1, len-1))
goto found;
}
while (++p < limit - len);
/* Hit end of line. */
continue;
found:
/* Found STR on this line. If the macro needs fixing,
the next few chars will be whitespace or uppercase,
then an open paren, then a single letter. */
while ((isspace (*p) || isupper (*p)) && p < limit) p++;
if (*p++ != '(')
continue;
if (!isalpha (*p))
continue;
if (isalnum (p[1]) || p[1] == '_')
continue;
/* Splat all preceding text into the output buffer,
quote the character at p, then proceed. */
fwrite (text, 1, p - text, stdout);
putchar ('\'');
putchar (*p);
putchar ('\'');
text = p + 1;
}
done:
fputs (text, stdout);
}
/* Scan the input file for all occurrences of text like this:
#define _IO(x, y) ('x'<<16+y)
and change them to read like this:
#define _IO(x, y) (x<<16+y)
which is the required syntax per the C standard. (The uses of _IO
also have to be tweaked - see above.) 'IO' is actually whatever
you provide in the STR argument. */
void
fix_char_macro_defines (text, str)
const char *text;
const char *str;
{
/* This regexp looks for any traditional-syntax #define (# in column 1). */
static const char pat[] =
"^#[ \t]*define[ \t]+";
static regex_t re;
regmatch_t rm[1];
const char *p, *limit;
size_t len = strlen (str);
char arg;
compile_re (pat, &re, 1, "macro pattern", "fix_char_macro_defines");
for (p = text;
regexec (&re, p, 1, rm, 0) == 0;
p = limit + 1)
{
/* p + rm[0].rm_eo is the first character of the macro name.
Find the end of the macro replacement, and the STR we were
sent to look for within the name. */
p += rm[0].rm_eo;
limit = p - 1;
do
{
limit = strchr (limit + 1, '\n');
if (!limit)
goto done;
}
while (limit[-1] == '\\');
do
{
if (*p == str[0] && !strncmp (p+1, str+1, len-1))
goto found;
}
while (isalpha (*p) || isalnum (*p) || *p == '_');
/* Hit end of macro name without finding the string. */
continue;
found:
/* Found STR in this macro name. If the macro needs fixing,
there may be a few uppercase letters, then there will be an
open paren with _no_ intervening whitespace, and then a
single letter. */
while (isupper (*p) && p < limit) p++;
if (*p++ != '(')
continue;
if (!isalpha (*p))
continue;
if (isalnum (p[1]) || p[1] == '_')
continue;
/* The character at P is the one to look for in the following
text. */
arg = *p;
p += 2;
while (p < limit)
{
if (p[-1] == '\'' && p[0] == arg && p[1] == '\'')
{
/* Remove the quotes from this use of ARG. */
p--;
fwrite (text, 1, p - text, stdout);
putchar (arg);
p += 3;
text = p;
}
else
p++;
}
}
done:
fputs (text, stdout);
}
/* The various prefixes on these macros are handled automatically
because the fixers don't care where they start matching. */
FIX_PROC_HEAD( IO_use_fix )
{
fix_char_macro_uses (text, "IO");
}
FIX_PROC_HEAD( CTRL_use_fix )
{
fix_char_macro_uses (text, "CTRL");
}
FIX_PROC_HEAD( IO_defn_fix )
{
fix_char_macro_defines (text, "IO");
}
FIX_PROC_HEAD( CTRL_defn_fix )
{
fix_char_macro_defines (text, "CTRL");
}
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
test for fix selector test for fix selector
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a # files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search. # directory that GNU C will search.
# #
# This script contains 112 fixup scripts. # This script contains 113 fixup scripts.
# #
# See README-fixinc for more information. # See README-fixinc for more information.
# #
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a * files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search. * directory that GNU C will search.
* *
* This file contains 112 fixup descriptions. * This file contains 113 fixup descriptions.
* *
* See README-fixinc for more information. * See README-fixinc for more information.
* *
...@@ -1006,8 +1006,23 @@ tSCC zAvoid_BoolList[] = ...@@ -1006,8 +1006,23 @@ tSCC zAvoid_BoolList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzAvoid_BoolMachs (const char**)NULL #define apzAvoid_BoolMachs (const char**)NULL
#define AVOID_BOOL_TEST_CT 0
#define aAvoid_BoolTests (tTestDesc*)NULL /*
* content selection pattern - do fix if pattern found
*/
tSCC zAvoid_BoolSelect0[] =
"char[ \t]+bool|bool[ \t]+char";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zAvoid_BoolBypass0[] =
"we must use the C\\+\\+ compiler's type";
#define AVOID_BOOL_TEST_CT 2
tTestDesc aAvoid_BoolTests[] = {
{ TT_NEGREP, zAvoid_BoolBypass0, (regex_t*)NULL },
{ TT_EGREP, zAvoid_BoolSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Avoid_Bool * Fix Command Arguments for Avoid_Bool
...@@ -1217,43 +1232,9 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed", ...@@ -1217,43 +1232,9 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Bsd43_Io_Macros fix
*/
#define BSD43_IO_MACROS_FIXIDX 27
tSCC zBsd43_Io_MacrosName[] =
"Bsd43_Io_Macros";
/*
* File name selection pattern
*/
#define zBsd43_Io_MacrosList (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzBsd43_Io_MacrosMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zBsd43_Io_MacrosSelect0[] =
"BSD43__IO";
#define BSD43_IO_MACROS_TEST_CT 1
tTestDesc aBsd43_Io_MacrosTests[] = {
{ TT_EGREP, zBsd43_Io_MacrosSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Bsd43_Io_Macros
*/
const char* apzBsd43_Io_MacrosPatch[] = { "sed",
"-e", "/[ \t]BSD43__IO[A-Z]*[ \t]*(/s/(\\(.\\),/('\\1',/",
"-e", "/#[ \t]*define[ \t]*[ \t]BSD43__IO/s/'\\([cgx]\\)'/\\1/g",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Dec_Intern_Asm fix * Description of Dec_Intern_Asm fix
*/ */
#define DEC_INTERN_ASM_FIXIDX 28 #define DEC_INTERN_ASM_FIXIDX 27
tSCC zDec_Intern_AsmName[] = tSCC zDec_Intern_AsmName[] =
"Dec_Intern_Asm"; "Dec_Intern_Asm";
/* /*
...@@ -1282,7 +1263,7 @@ const char* apzDec_Intern_AsmPatch[] = { "sed", ...@@ -1282,7 +1263,7 @@ const char* apzDec_Intern_AsmPatch[] = { "sed",
* *
* Description of No_Double_Slash fix * Description of No_Double_Slash fix
*/ */
#define NO_DOUBLE_SLASH_FIXIDX 29 #define NO_DOUBLE_SLASH_FIXIDX 28
tSCC zNo_Double_SlashName[] = tSCC zNo_Double_SlashName[] =
"No_Double_Slash"; "No_Double_Slash";
/* /*
...@@ -1313,7 +1294,7 @@ const char* apzNo_Double_SlashPatch[] = {"no_double_slash", ...@@ -1313,7 +1294,7 @@ const char* apzNo_Double_SlashPatch[] = {"no_double_slash",
* *
* Description of Ecd_Cursor fix * Description of Ecd_Cursor fix
*/ */
#define ECD_CURSOR_FIXIDX 30 #define ECD_CURSOR_FIXIDX 29
tSCC zEcd_CursorName[] = tSCC zEcd_CursorName[] =
"Ecd_Cursor"; "Ecd_Cursor";
/* /*
...@@ -1339,7 +1320,7 @@ const char* apzEcd_CursorPatch[] = { "sed", ...@@ -1339,7 +1320,7 @@ const char* apzEcd_CursorPatch[] = { "sed",
* *
* Description of Sco5_Stat_Wrappers fix * Description of Sco5_Stat_Wrappers fix
*/ */
#define SCO5_STAT_WRAPPERS_FIXIDX 31 #define SCO5_STAT_WRAPPERS_FIXIDX 30
tSCC zSco5_Stat_WrappersName[] = tSCC zSco5_Stat_WrappersName[] =
"Sco5_Stat_Wrappers"; "Sco5_Stat_Wrappers";
/* /*
...@@ -1375,7 +1356,7 @@ extern \"C\"\\\n\ ...@@ -1375,7 +1356,7 @@ extern \"C\"\\\n\
* *
* Description of End_Else_Label fix * Description of End_Else_Label fix
*/ */
#define END_ELSE_LABEL_FIXIDX 32 #define END_ELSE_LABEL_FIXIDX 31
tSCC zEnd_Else_LabelName[] = tSCC zEnd_Else_LabelName[] =
"End_Else_Label"; "End_Else_Label";
/* /*
...@@ -1406,7 +1387,7 @@ const char* apzEnd_Else_LabelPatch[] = {"else_endif_label", ...@@ -1406,7 +1387,7 @@ const char* apzEnd_Else_LabelPatch[] = {"else_endif_label",
* *
* Description of Hp_Inline fix * Description of Hp_Inline fix
*/ */
#define HP_INLINE_FIXIDX 33 #define HP_INLINE_FIXIDX 32
tSCC zHp_InlineName[] = tSCC zHp_InlineName[] =
"Hp_Inline"; "Hp_Inline";
/* /*
...@@ -1441,7 +1422,7 @@ const char* apzHp_InlinePatch[] = { "sed", ...@@ -1441,7 +1422,7 @@ const char* apzHp_InlinePatch[] = { "sed",
* *
* Description of Hp_Sysfile fix * Description of Hp_Sysfile fix
*/ */
#define HP_SYSFILE_FIXIDX 34 #define HP_SYSFILE_FIXIDX 33
tSCC zHp_SysfileName[] = tSCC zHp_SysfileName[] =
"Hp_Sysfile"; "Hp_Sysfile";
/* /*
...@@ -1475,7 +1456,7 @@ const char* apzHp_SysfilePatch[] = { "sed", ...@@ -1475,7 +1456,7 @@ const char* apzHp_SysfilePatch[] = { "sed",
* *
* Description of Cxx_Unready fix * Description of Cxx_Unready fix
*/ */
#define CXX_UNREADY_FIXIDX 35 #define CXX_UNREADY_FIXIDX 34
tSCC zCxx_UnreadyName[] = tSCC zCxx_UnreadyName[] =
"Cxx_Unready"; "Cxx_Unready";
/* /*
...@@ -1517,7 +1498,7 @@ extern \"C\" {\\\n\ ...@@ -1517,7 +1498,7 @@ extern \"C\" {\\\n\
* *
* Description of Hpux_Maxint fix * Description of Hpux_Maxint fix
*/ */
#define HPUX_MAXINT_FIXIDX 36 #define HPUX_MAXINT_FIXIDX 35
tSCC zHpux_MaxintName[] = tSCC zHpux_MaxintName[] =
"Hpux_Maxint"; "Hpux_Maxint";
/* /*
...@@ -1546,7 +1527,7 @@ const char* apzHpux_MaxintPatch[] = { "sed", ...@@ -1546,7 +1527,7 @@ const char* apzHpux_MaxintPatch[] = { "sed",
* *
* Description of Hpux_Systime fix * Description of Hpux_Systime fix
*/ */
#define HPUX_SYSTIME_FIXIDX 37 #define HPUX_SYSTIME_FIXIDX 36
tSCC zHpux_SystimeName[] = tSCC zHpux_SystimeName[] =
"Hpux_Systime"; "Hpux_Systime";
/* /*
...@@ -1580,7 +1561,7 @@ const char* apzHpux_SystimePatch[] = { "sed", ...@@ -1580,7 +1561,7 @@ const char* apzHpux_SystimePatch[] = { "sed",
* *
* Description of Hpux8_Bogus_Inlines fix * Description of Hpux8_Bogus_Inlines fix
*/ */
#define HPUX8_BOGUS_INLINES_FIXIDX 38 #define HPUX8_BOGUS_INLINES_FIXIDX 37
tSCC zHpux8_Bogus_InlinesName[] = tSCC zHpux8_Bogus_InlinesName[] =
"Hpux8_Bogus_Inlines"; "Hpux8_Bogus_Inlines";
/* /*
...@@ -1617,7 +1598,7 @@ const char* apzHpux8_Bogus_InlinesPatch[] = { "sed", ...@@ -1617,7 +1598,7 @@ const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
* *
* Description of Hpux11_Uint32_C fix * Description of Hpux11_Uint32_C fix
*/ */
#define HPUX11_UINT32_C_FIXIDX 39 #define HPUX11_UINT32_C_FIXIDX 38
tSCC zHpux11_Uint32_CName[] = tSCC zHpux11_Uint32_CName[] =
"Hpux11_Uint32_C"; "Hpux11_Uint32_C";
/* /*
...@@ -1651,7 +1632,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed", ...@@ -1651,7 +1632,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed",
* *
* Description of Isc_Omits_With_Stdc fix * Description of Isc_Omits_With_Stdc fix
*/ */
#define ISC_OMITS_WITH_STDC_FIXIDX 40 #define ISC_OMITS_WITH_STDC_FIXIDX 39
tSCC zIsc_Omits_With_StdcName[] = tSCC zIsc_Omits_With_StdcName[] =
"Isc_Omits_With_Stdc"; "Isc_Omits_With_Stdc";
/* /*
...@@ -1683,6 +1664,38 @@ const char* apzIsc_Omits_With_StdcPatch[] = { "sed", ...@@ -1683,6 +1664,38 @@ const char* apzIsc_Omits_With_StdcPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Io_Use_Quotes fix
*/
#define IO_USE_QUOTES_FIXIDX 40
tSCC zIo_Use_QuotesName[] =
"Io_Use_Quotes";
/*
* File name selection pattern
*/
#define zIo_Use_QuotesList (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzIo_Use_QuotesMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zIo_Use_QuotesSelect0[] =
"define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*\\( *[^,']";
#define IO_USE_QUOTES_TEST_CT 1
tTestDesc aIo_Use_QuotesTests[] = {
{ TT_EGREP, zIo_Use_QuotesSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Io_Use_Quotes
*/
const char* apzIo_Use_QuotesPatch[] = {"IO_use",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Io_Def_Quotes fix * Description of Io_Def_Quotes fix
*/ */
#define IO_DEF_QUOTES_FIXIDX 41 #define IO_DEF_QUOTES_FIXIDX 41
...@@ -1701,7 +1714,7 @@ tSCC zIo_Def_QuotesName[] = ...@@ -1701,7 +1714,7 @@ tSCC zIo_Def_QuotesName[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zIo_Def_QuotesSelect0[] = tSCC zIo_Def_QuotesSelect0[] =
"[ \t]*[ \t](_|DES)IO[A-Z]*[ \t]*\\( *[^,']"; "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\(([a-zA-Z]).*'\\1'";
#define IO_DEF_QUOTES_TEST_CT 1 #define IO_DEF_QUOTES_TEST_CT 1
tTestDesc aIo_Def_QuotesTests[] = { tTestDesc aIo_Def_QuotesTests[] = {
...@@ -1710,56 +1723,78 @@ tTestDesc aIo_Def_QuotesTests[] = { ...@@ -1710,56 +1723,78 @@ tTestDesc aIo_Def_QuotesTests[] = {
/* /*
* Fix Command Arguments for Io_Def_Quotes * Fix Command Arguments for Io_Def_Quotes
*/ */
const char* apzIo_Def_QuotesPatch[] = { "sed", const char* apzIo_Def_QuotesPatch[] = {"IO_defn",
"-e", "s/\\([ \t]*[ \t]_IO[A-Z]*[ \t]*(\\)\\([^,']\\),/\\1'\\2',/", (char*)NULL };
"-e", "s/\\([ \t]*[ \t]DESIO[A-Z]*[ \t]*(\\)\\([^,']\\),/\\1'\\2',/",
"-e", "/#[ \t]*define[ \t]*[ \t]_IO/s/'\\([cgxtf]\\)'/\\1/g", /* * * * * * * * * * * * * * * * * * * * * * * * * *
"-e", "/#[ \t]*define[ \t]*[ \t]DESIOC/s/'\\([cdgx]\\)'/\\1/g", *
* Description of Ctrl_Use_Quotes fix
*/
#define CTRL_USE_QUOTES_FIXIDX 42
tSCC zCtrl_Use_QuotesName[] =
"Ctrl_Use_Quotes";
/*
* File name selection pattern
*/
#define zCtrl_Use_QuotesList (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzCtrl_Use_QuotesMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zCtrl_Use_QuotesSelect0[] =
"define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
#define CTRL_USE_QUOTES_TEST_CT 1
tTestDesc aCtrl_Use_QuotesTests[] = {
{ TT_EGREP, zCtrl_Use_QuotesSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_Use_Quotes
*/
const char* apzCtrl_Use_QuotesPatch[] = {"CTRL_use",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ioctl_Fix_Ctrl fix * Description of Ctrl_Def_Quotes fix
*/ */
#define IOCTL_FIX_CTRL_FIXIDX 42 #define CTRL_DEF_QUOTES_FIXIDX 43
tSCC zIoctl_Fix_CtrlName[] = tSCC zCtrl_Def_QuotesName[] =
"Ioctl_Fix_Ctrl"; "Ctrl_Def_Quotes";
/* /*
* File name selection pattern * File name selection pattern
*/ */
#define zIoctl_Fix_CtrlList (char*)NULL #define zCtrl_Def_QuotesList (char*)NULL
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzIoctl_Fix_CtrlMachs (const char**)NULL #define apzCtrl_Def_QuotesMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zIoctl_Fix_CtrlSelect0[] = tSCC zCtrl_Def_QuotesSelect0[] =
"CTRL[ \t]*\\("; "define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
#define IOCTL_FIX_CTRL_TEST_CT 1 #define CTRL_DEF_QUOTES_TEST_CT 1
tTestDesc aIoctl_Fix_CtrlTests[] = { tTestDesc aCtrl_Def_QuotesTests[] = {
{ TT_EGREP, zIoctl_Fix_CtrlSelect0, (regex_t*)NULL }, }; { TT_EGREP, zCtrl_Def_QuotesSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Ioctl_Fix_Ctrl * Fix Command Arguments for Ctrl_Def_Quotes
*/ */
const char* apzIoctl_Fix_CtrlPatch[] = { "sed", const char* apzCtrl_Def_QuotesPatch[] = {"CTRL_defn",
"-e", "/[^A-Z0-9_]CTRL[ \t]*(/s/\\([^']\\))/'\\1')/",
"-e", "/[^A-Z0-9]_CTRL[ \t]*(/s/\\([^']\\))/'\\1')/",
"-e", "/#[ \t]*define[ \t]*[ \t]CTRL/s/'\\([cgx]\\)'/\\1/g",
"-e", "/#[ \t]*define[ \t]*[ \t]_CTRL/s/'\\([cgx]\\)'/\\1/g",
"-e", "/#[ \t]*define[ \t]*[ \t]BSD43_CTRL/s/'\\([cgx]\\)'/\\1/g",
"-e", "/#[ \t]*define[ \t]*[ \t][_]*ISCTRL/s/'\\([cgx]\\)'/\\1/g",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ip_Missing_Semi fix * Description of Ip_Missing_Semi fix
*/ */
#define IP_MISSING_SEMI_FIXIDX 43 #define IP_MISSING_SEMI_FIXIDX 44
tSCC zIp_Missing_SemiName[] = tSCC zIp_Missing_SemiName[] =
"Ip_Missing_Semi"; "Ip_Missing_Semi";
/* /*
...@@ -1793,7 +1828,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed", ...@@ -1793,7 +1828,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed",
* *
* Description of Irix_Multiline_Cmnt fix * Description of Irix_Multiline_Cmnt fix
*/ */
#define IRIX_MULTILINE_CMNT_FIXIDX 44 #define IRIX_MULTILINE_CMNT_FIXIDX 45
tSCC zIrix_Multiline_CmntName[] = tSCC zIrix_Multiline_CmntName[] =
"Irix_Multiline_Cmnt"; "Irix_Multiline_Cmnt";
/* /*
...@@ -1820,7 +1855,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed", ...@@ -1820,7 +1855,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed",
* *
* Description of Irix_Sockaddr fix * Description of Irix_Sockaddr fix
*/ */
#define IRIX_SOCKADDR_FIXIDX 45 #define IRIX_SOCKADDR_FIXIDX 46
tSCC zIrix_SockaddrName[] = tSCC zIrix_SockaddrName[] =
"Irix_Sockaddr"; "Irix_Sockaddr";
/* /*
...@@ -1855,7 +1890,7 @@ struct sockaddr;\n", ...@@ -1855,7 +1890,7 @@ struct sockaddr;\n",
* *
* Description of Irix_Struct__File fix * Description of Irix_Struct__File fix
*/ */
#define IRIX_STRUCT__FILE_FIXIDX 46 #define IRIX_STRUCT__FILE_FIXIDX 47
tSCC zIrix_Struct__FileName[] = tSCC zIrix_Struct__FileName[] =
"Irix_Struct__File"; "Irix_Struct__File";
/* /*
...@@ -1882,7 +1917,7 @@ struct __file_s;\n", ...@@ -1882,7 +1917,7 @@ struct __file_s;\n",
* *
* Description of Irix_Asm_Apostrophe fix * Description of Irix_Asm_Apostrophe fix
*/ */
#define IRIX_ASM_APOSTROPHE_FIXIDX 47 #define IRIX_ASM_APOSTROPHE_FIXIDX 48
tSCC zIrix_Asm_ApostropheName[] = tSCC zIrix_Asm_ApostropheName[] =
"Irix_Asm_Apostrophe"; "Irix_Asm_Apostrophe";
/* /*
...@@ -1916,7 +1951,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed", ...@@ -1916,7 +1951,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed",
* *
* Description of Isc_Fmod fix * Description of Isc_Fmod fix
*/ */
#define ISC_FMOD_FIXIDX 48 #define ISC_FMOD_FIXIDX 49
tSCC zIsc_FmodName[] = tSCC zIsc_FmodName[] =
"Isc_Fmod"; "Isc_Fmod";
/* /*
...@@ -1950,7 +1985,7 @@ const char* apzIsc_FmodPatch[] = { "sed", ...@@ -1950,7 +1985,7 @@ const char* apzIsc_FmodPatch[] = { "sed",
* *
* Description of Motorola_Nested fix * Description of Motorola_Nested fix
*/ */
#define MOTOROLA_NESTED_FIXIDX 49 #define MOTOROLA_NESTED_FIXIDX 50
tSCC zMotorola_NestedName[] = tSCC zMotorola_NestedName[] =
"Motorola_Nested"; "Motorola_Nested";
/* /*
...@@ -1979,7 +2014,7 @@ const char* apzMotorola_NestedPatch[] = { "sed", ...@@ -1979,7 +2014,7 @@ const char* apzMotorola_NestedPatch[] = { "sed",
* *
* Description of Isc_Sys_Limits fix * Description of Isc_Sys_Limits fix
*/ */
#define ISC_SYS_LIMITS_FIXIDX 50 #define ISC_SYS_LIMITS_FIXIDX 51
tSCC zIsc_Sys_LimitsName[] = tSCC zIsc_Sys_LimitsName[] =
"Isc_Sys_Limits"; "Isc_Sys_Limits";
/* /*
...@@ -2014,7 +2049,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed", ...@@ -2014,7 +2049,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed",
* *
* Description of Kandr_Concat fix * Description of Kandr_Concat fix
*/ */
#define KANDR_CONCAT_FIXIDX 51 #define KANDR_CONCAT_FIXIDX 52
tSCC zKandr_ConcatName[] = tSCC zKandr_ConcatName[] =
"Kandr_Concat"; "Kandr_Concat";
/* /*
...@@ -2048,7 +2083,7 @@ const char* apzKandr_ConcatPatch[] = { "sed", ...@@ -2048,7 +2083,7 @@ const char* apzKandr_ConcatPatch[] = { "sed",
* *
* Description of Limits_Ifndefs fix * Description of Limits_Ifndefs fix
*/ */
#define LIMITS_IFNDEFS_FIXIDX 52 #define LIMITS_IFNDEFS_FIXIDX 53
tSCC zLimits_IfndefsName[] = tSCC zLimits_IfndefsName[] =
"Limits_Ifndefs"; "Limits_Ifndefs";
/* /*
...@@ -2106,7 +2141,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed", ...@@ -2106,7 +2141,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed",
* *
* Description of Lynx_Void_Int fix * Description of Lynx_Void_Int fix
*/ */
#define LYNX_VOID_INT_FIXIDX 53 #define LYNX_VOID_INT_FIXIDX 54
tSCC zLynx_Void_IntName[] = tSCC zLynx_Void_IntName[] =
"Lynx_Void_Int"; "Lynx_Void_Int";
/* /*
...@@ -2140,7 +2175,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed", ...@@ -2140,7 +2175,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed",
* *
* Description of Lynxos_Fcntl_Proto fix * Description of Lynxos_Fcntl_Proto fix
*/ */
#define LYNXOS_FCNTL_PROTO_FIXIDX 54 #define LYNXOS_FCNTL_PROTO_FIXIDX 55
tSCC zLynxos_Fcntl_ProtoName[] = tSCC zLynxos_Fcntl_ProtoName[] =
"Lynxos_Fcntl_Proto"; "Lynxos_Fcntl_Proto";
/* /*
...@@ -2174,7 +2209,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed", ...@@ -2174,7 +2209,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed",
* *
* Description of M88k_Bad_Hypot_Opt fix * Description of M88k_Bad_Hypot_Opt fix
*/ */
#define M88K_BAD_HYPOT_OPT_FIXIDX 55 #define M88K_BAD_HYPOT_OPT_FIXIDX 56
tSCC zM88k_Bad_Hypot_OptName[] = tSCC zM88k_Bad_Hypot_OptName[] =
"M88k_Bad_Hypot_Opt"; "M88k_Bad_Hypot_Opt";
/* /*
...@@ -2215,7 +2250,7 @@ static __inline__ double fake_hypot (x, y)\\\n\ ...@@ -2215,7 +2250,7 @@ static __inline__ double fake_hypot (x, y)\\\n\
* *
* Description of M88k_Bad_S_If fix * Description of M88k_Bad_S_If fix
*/ */
#define M88K_BAD_S_IF_FIXIDX 56 #define M88K_BAD_S_IF_FIXIDX 57
tSCC zM88k_Bad_S_IfName[] = tSCC zM88k_Bad_S_IfName[] =
"M88k_Bad_S_If"; "M88k_Bad_S_If";
/* /*
...@@ -2252,7 +2287,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed", ...@@ -2252,7 +2287,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed",
* *
* Description of M88k_Multi_Incl fix * Description of M88k_Multi_Incl fix
*/ */
#define M88K_MULTI_INCL_FIXIDX 57 #define M88K_MULTI_INCL_FIXIDX 58
tSCC zM88k_Multi_InclName[] = tSCC zM88k_Multi_InclName[] =
"M88k_Multi_Incl"; "M88k_Multi_Incl";
/* /*
...@@ -2293,7 +2328,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c", ...@@ -2293,7 +2328,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
* *
* Description of Machine_Name fix * Description of Machine_Name fix
*/ */
#define MACHINE_NAME_FIXIDX 58 #define MACHINE_NAME_FIXIDX 59
tSCC zMachine_NameName[] = tSCC zMachine_NameName[] =
"Machine_Name"; "Machine_Name";
/* /*
...@@ -2362,7 +2397,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\ ...@@ -2362,7 +2397,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\
* *
* Description of Math_Exception fix * Description of Math_Exception fix
*/ */
#define MATH_EXCEPTION_FIXIDX 59 #define MATH_EXCEPTION_FIXIDX 60
tSCC zMath_ExceptionName[] = tSCC zMath_ExceptionName[] =
"Math_Exception"; "Math_Exception";
/* /*
...@@ -2385,7 +2420,7 @@ tSCC zMath_ExceptionSelect0[] = ...@@ -2385,7 +2420,7 @@ tSCC zMath_ExceptionSelect0[] =
* content bypass pattern - skip fix if pattern found * content bypass pattern - skip fix if pattern found
*/ */
tSCC zMath_ExceptionBypass0[] = tSCC zMath_ExceptionBypass0[] =
"We have a problem when using C++"; "We have a problem when using C\\+\\+";
#define MATH_EXCEPTION_TEST_CT 2 #define MATH_EXCEPTION_TEST_CT 2
tTestDesc aMath_ExceptionTests[] = { tTestDesc aMath_ExceptionTests[] = {
...@@ -2410,7 +2445,7 @@ const char* apzMath_ExceptionPatch[] = { "sed", ...@@ -2410,7 +2445,7 @@ const char* apzMath_ExceptionPatch[] = { "sed",
* *
* Description of Math_Huge_Val_From_Dbl_Max fix * Description of Math_Huge_Val_From_Dbl_Max fix
*/ */
#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 60 #define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 61
tSCC zMath_Huge_Val_From_Dbl_MaxName[] = tSCC zMath_Huge_Val_From_Dbl_MaxName[] =
"Math_Huge_Val_From_Dbl_Max"; "Math_Huge_Val_From_Dbl_Max";
/* /*
...@@ -2456,7 +2491,7 @@ const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c", ...@@ -2456,7 +2491,7 @@ const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c",
* *
* Description of Math_Huge_Val_Ifndef fix * Description of Math_Huge_Val_Ifndef fix
*/ */
#define MATH_HUGE_VAL_IFNDEF_FIXIDX 61 #define MATH_HUGE_VAL_IFNDEF_FIXIDX 62
tSCC zMath_Huge_Val_IfndefName[] = tSCC zMath_Huge_Val_IfndefName[] =
"Math_Huge_Val_Ifndef"; "Math_Huge_Val_Ifndef";
/* /*
...@@ -2493,7 +2528,7 @@ const char* apzMath_Huge_Val_IfndefPatch[] = { "sed", ...@@ -2493,7 +2528,7 @@ const char* apzMath_Huge_Val_IfndefPatch[] = { "sed",
* *
* Description of Nested_Comment fix * Description of Nested_Comment fix
*/ */
#define NESTED_COMMENT_FIXIDX 62 #define NESTED_COMMENT_FIXIDX 63
tSCC zNested_CommentName[] = tSCC zNested_CommentName[] =
"Nested_Comment"; "Nested_Comment";
/* /*
...@@ -2519,7 +2554,7 @@ const char* apzNested_CommentPatch[] = { "sed", ...@@ -2519,7 +2554,7 @@ const char* apzNested_CommentPatch[] = { "sed",
* *
* Description of News_Os_Recursion fix * Description of News_Os_Recursion fix
*/ */
#define NEWS_OS_RECURSION_FIXIDX 63 #define NEWS_OS_RECURSION_FIXIDX 64
tSCC zNews_Os_RecursionName[] = tSCC zNews_Os_RecursionName[] =
"News_Os_Recursion"; "News_Os_Recursion";
/* /*
...@@ -2556,7 +2591,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed", ...@@ -2556,7 +2591,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed",
* *
* Description of Next_Math_Prefix fix * Description of Next_Math_Prefix fix
*/ */
#define NEXT_MATH_PREFIX_FIXIDX 64 #define NEXT_MATH_PREFIX_FIXIDX 65
tSCC zNext_Math_PrefixName[] = tSCC zNext_Math_PrefixName[] =
"Next_Math_Prefix"; "Next_Math_Prefix";
/* /*
...@@ -2594,7 +2629,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed", ...@@ -2594,7 +2629,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed",
* *
* Description of Next_Template fix * Description of Next_Template fix
*/ */
#define NEXT_TEMPLATE_FIXIDX 65 #define NEXT_TEMPLATE_FIXIDX 66
tSCC zNext_TemplateName[] = tSCC zNext_TemplateName[] =
"Next_Template"; "Next_Template";
/* /*
...@@ -2629,7 +2664,7 @@ const char* apzNext_TemplatePatch[] = { "sed", ...@@ -2629,7 +2664,7 @@ const char* apzNext_TemplatePatch[] = { "sed",
* *
* Description of Next_Volitile fix * Description of Next_Volitile fix
*/ */
#define NEXT_VOLITILE_FIXIDX 66 #define NEXT_VOLITILE_FIXIDX 67
tSCC zNext_VolitileName[] = tSCC zNext_VolitileName[] =
"Next_Volitile"; "Next_Volitile";
/* /*
...@@ -2664,7 +2699,7 @@ const char* apzNext_VolitilePatch[] = { "sed", ...@@ -2664,7 +2699,7 @@ const char* apzNext_VolitilePatch[] = { "sed",
* *
* Description of Next_Wait_Union fix * Description of Next_Wait_Union fix
*/ */
#define NEXT_WAIT_UNION_FIXIDX 67 #define NEXT_WAIT_UNION_FIXIDX 68
tSCC zNext_Wait_UnionName[] = tSCC zNext_Wait_UnionName[] =
"Next_Wait_Union"; "Next_Wait_Union";
/* /*
...@@ -2698,7 +2733,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed", ...@@ -2698,7 +2733,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed",
* *
* Description of Nodeent_Syntax fix * Description of Nodeent_Syntax fix
*/ */
#define NODEENT_SYNTAX_FIXIDX 68 #define NODEENT_SYNTAX_FIXIDX 69
tSCC zNodeent_SyntaxName[] = tSCC zNodeent_SyntaxName[] =
"Nodeent_Syntax"; "Nodeent_Syntax";
/* /*
...@@ -2724,7 +2759,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed", ...@@ -2724,7 +2759,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed",
* *
* Description of Osf_Namespace_A fix * Description of Osf_Namespace_A fix
*/ */
#define OSF_NAMESPACE_A_FIXIDX 69 #define OSF_NAMESPACE_A_FIXIDX 70
tSCC zOsf_Namespace_AName[] = tSCC zOsf_Namespace_AName[] =
"Osf_Namespace_A"; "Osf_Namespace_A";
/* /*
...@@ -2769,7 +2804,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed", ...@@ -2769,7 +2804,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed",
* *
* Description of Osf_Namespace_B fix * Description of Osf_Namespace_B fix
*/ */
#define OSF_NAMESPACE_B_FIXIDX 70 #define OSF_NAMESPACE_B_FIXIDX 71
tSCC zOsf_Namespace_BName[] = tSCC zOsf_Namespace_BName[] =
"Osf_Namespace_B"; "Osf_Namespace_B";
/* /*
...@@ -2815,7 +2850,7 @@ typedef __regmatch_t\tregmatch_t;\n", ...@@ -2815,7 +2850,7 @@ typedef __regmatch_t\tregmatch_t;\n",
* *
* Description of Pthread_Page_Size fix * Description of Pthread_Page_Size fix
*/ */
#define PTHREAD_PAGE_SIZE_FIXIDX 71 #define PTHREAD_PAGE_SIZE_FIXIDX 72
tSCC zPthread_Page_SizeName[] = tSCC zPthread_Page_SizeName[] =
"Pthread_Page_Size"; "Pthread_Page_Size";
/* /*
...@@ -2849,7 +2884,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed", ...@@ -2849,7 +2884,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed",
* *
* Description of Read_Ret_Type fix * Description of Read_Ret_Type fix
*/ */
#define READ_RET_TYPE_FIXIDX 72 #define READ_RET_TYPE_FIXIDX 73
tSCC zRead_Ret_TypeName[] = tSCC zRead_Ret_TypeName[] =
"Read_Ret_Type"; "Read_Ret_Type";
/* /*
...@@ -2884,7 +2919,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed", ...@@ -2884,7 +2919,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed",
* *
* Description of Rs6000_Double fix * Description of Rs6000_Double fix
*/ */
#define RS6000_DOUBLE_FIXIDX 73 #define RS6000_DOUBLE_FIXIDX 74
tSCC zRs6000_DoubleName[] = tSCC zRs6000_DoubleName[] =
"Rs6000_Double"; "Rs6000_Double";
/* /*
...@@ -2921,7 +2956,7 @@ const char* apzRs6000_DoublePatch[] = { "sed", ...@@ -2921,7 +2956,7 @@ const char* apzRs6000_DoublePatch[] = { "sed",
* *
* Description of Rs6000_Fchmod fix * Description of Rs6000_Fchmod fix
*/ */
#define RS6000_FCHMOD_FIXIDX 74 #define RS6000_FCHMOD_FIXIDX 75
tSCC zRs6000_FchmodName[] = tSCC zRs6000_FchmodName[] =
"Rs6000_Fchmod"; "Rs6000_Fchmod";
/* /*
...@@ -2955,7 +2990,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed", ...@@ -2955,7 +2990,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed",
* *
* Description of Rs6000_Param fix * Description of Rs6000_Param fix
*/ */
#define RS6000_PARAM_FIXIDX 75 #define RS6000_PARAM_FIXIDX 76
tSCC zRs6000_ParamName[] = tSCC zRs6000_ParamName[] =
"Rs6000_Param"; "Rs6000_Param";
/* /*
...@@ -2989,7 +3024,7 @@ const char* apzRs6000_ParamPatch[] = { "sed", ...@@ -2989,7 +3024,7 @@ const char* apzRs6000_ParamPatch[] = { "sed",
* *
* Description of Sony_Include fix * Description of Sony_Include fix
*/ */
#define SONY_INCLUDE_FIXIDX 76 #define SONY_INCLUDE_FIXIDX 77
tSCC zSony_IncludeName[] = tSCC zSony_IncludeName[] =
"Sony_Include"; "Sony_Include";
/* /*
...@@ -3023,7 +3058,7 @@ const char* apzSony_IncludePatch[] = { "sed", ...@@ -3023,7 +3058,7 @@ const char* apzSony_IncludePatch[] = { "sed",
* *
* Description of Statsswtch fix * Description of Statsswtch fix
*/ */
#define STATSSWTCH_FIXIDX 77 #define STATSSWTCH_FIXIDX 78
tSCC zStatsswtchName[] = tSCC zStatsswtchName[] =
"Statsswtch"; "Statsswtch";
/* /*
...@@ -3057,7 +3092,7 @@ const char* apzStatsswtchPatch[] = { "sed", ...@@ -3057,7 +3092,7 @@ const char* apzStatsswtchPatch[] = { "sed",
* *
* Description of Stdio_Va_List fix * Description of Stdio_Va_List fix
*/ */
#define STDIO_VA_LIST_FIXIDX 78 #define STDIO_VA_LIST_FIXIDX 79
tSCC zStdio_Va_ListName[] = tSCC zStdio_Va_ListName[] =
"Stdio_Va_List"; "Stdio_Va_List";
/* /*
...@@ -3108,7 +3143,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c", ...@@ -3108,7 +3143,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c",
* *
* Description of Sun_Bogus_Ifdef fix * Description of Sun_Bogus_Ifdef fix
*/ */
#define SUN_BOGUS_IFDEF_FIXIDX 79 #define SUN_BOGUS_IFDEF_FIXIDX 80
tSCC zSun_Bogus_IfdefName[] = tSCC zSun_Bogus_IfdefName[] =
"Sun_Bogus_Ifdef"; "Sun_Bogus_Ifdef";
/* /*
...@@ -3142,7 +3177,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed", ...@@ -3142,7 +3177,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed",
* *
* Description of Sun_Bogus_Ifdef_Sun4c fix * Description of Sun_Bogus_Ifdef_Sun4c fix
*/ */
#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 80 #define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 81
tSCC zSun_Bogus_Ifdef_Sun4cName[] = tSCC zSun_Bogus_Ifdef_Sun4cName[] =
"Sun_Bogus_Ifdef_Sun4c"; "Sun_Bogus_Ifdef_Sun4c";
/* /*
...@@ -3176,7 +3211,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed", ...@@ -3176,7 +3211,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
* *
* Description of Sun_Catmacro fix * Description of Sun_Catmacro fix
*/ */
#define SUN_CATMACRO_FIXIDX 81 #define SUN_CATMACRO_FIXIDX 82
tSCC zSun_CatmacroName[] = tSCC zSun_CatmacroName[] =
"Sun_Catmacro"; "Sun_Catmacro";
/* /*
...@@ -3215,7 +3250,7 @@ const char* apzSun_CatmacroPatch[] = { "sed", ...@@ -3215,7 +3250,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
* *
* Description of Sun_Malloc fix * Description of Sun_Malloc fix
*/ */
#define SUN_MALLOC_FIXIDX 82 #define SUN_MALLOC_FIXIDX 83
tSCC zSun_MallocName[] = tSCC zSun_MallocName[] =
"Sun_Malloc"; "Sun_Malloc";
/* /*
...@@ -3244,7 +3279,7 @@ const char* apzSun_MallocPatch[] = { "sed", ...@@ -3244,7 +3279,7 @@ const char* apzSun_MallocPatch[] = { "sed",
* *
* Description of Sun_Rusers_Semi fix * Description of Sun_Rusers_Semi fix
*/ */
#define SUN_RUSERS_SEMI_FIXIDX 83 #define SUN_RUSERS_SEMI_FIXIDX 84
tSCC zSun_Rusers_SemiName[] = tSCC zSun_Rusers_SemiName[] =
"Sun_Rusers_Semi"; "Sun_Rusers_Semi";
/* /*
...@@ -3278,7 +3313,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed", ...@@ -3278,7 +3313,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
* *
* Description of Sun_Signal fix * Description of Sun_Signal fix
*/ */
#define SUN_SIGNAL_FIXIDX 84 #define SUN_SIGNAL_FIXIDX 85
tSCC zSun_SignalName[] = tSCC zSun_SignalName[] =
"Sun_Signal"; "Sun_Signal";
/* /*
...@@ -3317,7 +3352,7 @@ void\t(*signal(...))(...);\\\n\ ...@@ -3317,7 +3352,7 @@ void\t(*signal(...))(...);\\\n\
* *
* Description of Sun_Auth_Proto fix * Description of Sun_Auth_Proto fix
*/ */
#define SUN_AUTH_PROTO_FIXIDX 85 #define SUN_AUTH_PROTO_FIXIDX 86
tSCC zSun_Auth_ProtoName[] = tSCC zSun_Auth_ProtoName[] =
"Sun_Auth_Proto"; "Sun_Auth_Proto";
/* /*
...@@ -3356,7 +3391,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed", ...@@ -3356,7 +3391,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed",
* *
* Description of Sunos_Matherr_Decl fix * Description of Sunos_Matherr_Decl fix
*/ */
#define SUNOS_MATHERR_DECL_FIXIDX 86 #define SUNOS_MATHERR_DECL_FIXIDX 87
tSCC zSunos_Matherr_DeclName[] = tSCC zSunos_Matherr_DeclName[] =
"Sunos_Matherr_Decl"; "Sunos_Matherr_Decl";
/* /*
...@@ -3392,7 +3427,7 @@ struct exception;\n", ...@@ -3392,7 +3427,7 @@ struct exception;\n",
* *
* Description of Sunos_Strlen fix * Description of Sunos_Strlen fix
*/ */
#define SUNOS_STRLEN_FIXIDX 87 #define SUNOS_STRLEN_FIXIDX 88
tSCC zSunos_StrlenName[] = tSCC zSunos_StrlenName[] =
"Sunos_Strlen"; "Sunos_Strlen";
/* /*
...@@ -3426,7 +3461,7 @@ const char* apzSunos_StrlenPatch[] = { "sed", ...@@ -3426,7 +3461,7 @@ const char* apzSunos_StrlenPatch[] = { "sed",
* *
* Description of Systypes fix * Description of Systypes fix
*/ */
#define SYSTYPES_FIXIDX 88 #define SYSTYPES_FIXIDX 89
tSCC zSystypesName[] = tSCC zSystypesName[] =
"Systypes"; "Systypes";
/* /*
...@@ -3484,7 +3519,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\ ...@@ -3484,7 +3519,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
* *
* Description of Systypes_For_Aix fix * Description of Systypes_For_Aix fix
*/ */
#define SYSTYPES_FOR_AIX_FIXIDX 89 #define SYSTYPES_FOR_AIX_FIXIDX 90
tSCC zSystypes_For_AixName[] = tSCC zSystypes_For_AixName[] =
"Systypes_For_Aix"; "Systypes_For_Aix";
/* /*
...@@ -3529,7 +3564,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed", ...@@ -3529,7 +3564,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed",
* *
* Description of Sysv68_String fix * Description of Sysv68_String fix
*/ */
#define SYSV68_STRING_FIXIDX 90 #define SYSV68_STRING_FIXIDX 91
tSCC zSysv68_StringName[] = tSCC zSysv68_StringName[] =
"Sysv68_String"; "Sysv68_String";
/* /*
...@@ -3565,7 +3600,7 @@ extern unsigned int\\\n\ ...@@ -3565,7 +3600,7 @@ extern unsigned int\\\n\
* *
* Description of Sysz_Stdlib_For_Sun fix * Description of Sysz_Stdlib_For_Sun fix
*/ */
#define SYSZ_STDLIB_FOR_SUN_FIXIDX 91 #define SYSZ_STDLIB_FOR_SUN_FIXIDX 92
tSCC zSysz_Stdlib_For_SunName[] = tSCC zSysz_Stdlib_For_SunName[] =
"Sysz_Stdlib_For_Sun"; "Sysz_Stdlib_For_Sun";
/* /*
...@@ -3602,7 +3637,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed", ...@@ -3602,7 +3637,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
* *
* Description of Sysz_Stdtypes_For_Sun fix * Description of Sysz_Stdtypes_For_Sun fix
*/ */
#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 92 #define SYSZ_STDTYPES_FOR_SUN_FIXIDX 93
tSCC zSysz_Stdtypes_For_SunName[] = tSCC zSysz_Stdtypes_For_SunName[] =
"Sysz_Stdtypes_For_Sun"; "Sysz_Stdtypes_For_Sun";
/* /*
...@@ -3642,7 +3677,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed", ...@@ -3642,7 +3677,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
* *
* Description of Tinfo_Cplusplus fix * Description of Tinfo_Cplusplus fix
*/ */
#define TINFO_CPLUSPLUS_FIXIDX 93 #define TINFO_CPLUSPLUS_FIXIDX 94
tSCC zTinfo_CplusplusName[] = tSCC zTinfo_CplusplusName[] =
"Tinfo_Cplusplus"; "Tinfo_Cplusplus";
/* /*
...@@ -3676,7 +3711,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed", ...@@ -3676,7 +3711,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
* *
* Description of Ultrix_Fix_Fixproto fix * Description of Ultrix_Fix_Fixproto fix
*/ */
#define ULTRIX_FIX_FIXPROTO_FIXIDX 94 #define ULTRIX_FIX_FIXPROTO_FIXIDX 95
tSCC zUltrix_Fix_FixprotoName[] = tSCC zUltrix_Fix_FixprotoName[] =
"Ultrix_Fix_Fixproto"; "Ultrix_Fix_Fixproto";
/* /*
...@@ -3711,7 +3746,7 @@ struct utsname;\n", ...@@ -3711,7 +3746,7 @@ struct utsname;\n",
* *
* Description of Ultrix_Atof_Param fix * Description of Ultrix_Atof_Param fix
*/ */
#define ULTRIX_ATOF_PARAM_FIXIDX 95 #define ULTRIX_ATOF_PARAM_FIXIDX 96
tSCC zUltrix_Atof_ParamName[] = tSCC zUltrix_Atof_ParamName[] =
"Ultrix_Atof_Param"; "Ultrix_Atof_Param";
/* /*
...@@ -3745,7 +3780,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed", ...@@ -3745,7 +3780,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed",
* *
* Description of Ultrix_Const fix * Description of Ultrix_Const fix
*/ */
#define ULTRIX_CONST_FIXIDX 96 #define ULTRIX_CONST_FIXIDX 97
tSCC zUltrix_ConstName[] = tSCC zUltrix_ConstName[] =
"Ultrix_Const"; "Ultrix_Const";
/* /*
...@@ -3779,7 +3814,7 @@ const char* apzUltrix_ConstPatch[] = { "sed", ...@@ -3779,7 +3814,7 @@ const char* apzUltrix_ConstPatch[] = { "sed",
* *
* Description of Ultrix_Ifdef fix * Description of Ultrix_Ifdef fix
*/ */
#define ULTRIX_IFDEF_FIXIDX 97 #define ULTRIX_IFDEF_FIXIDX 98
tSCC zUltrix_IfdefName[] = tSCC zUltrix_IfdefName[] =
"Ultrix_Ifdef"; "Ultrix_Ifdef";
/* /*
...@@ -3813,7 +3848,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed", ...@@ -3813,7 +3848,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed",
* *
* Description of Ultrix_Nested_Cmnt fix * Description of Ultrix_Nested_Cmnt fix
*/ */
#define ULTRIX_NESTED_CMNT_FIXIDX 98 #define ULTRIX_NESTED_CMNT_FIXIDX 99
tSCC zUltrix_Nested_CmntName[] = tSCC zUltrix_Nested_CmntName[] =
"Ultrix_Nested_Cmnt"; "Ultrix_Nested_Cmnt";
/* /*
...@@ -3839,7 +3874,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed", ...@@ -3839,7 +3874,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed",
* *
* Description of Ultrix_Static fix * Description of Ultrix_Static fix
*/ */
#define ULTRIX_STATIC_FIXIDX 99 #define ULTRIX_STATIC_FIXIDX 100
tSCC zUltrix_StaticName[] = tSCC zUltrix_StaticName[] =
"Ultrix_Static"; "Ultrix_Static";
/* /*
...@@ -3875,7 +3910,7 @@ const char* apzUltrix_StaticPatch[] = { "sed", ...@@ -3875,7 +3910,7 @@ const char* apzUltrix_StaticPatch[] = { "sed",
* *
* Description of Undefine_Null fix * Description of Undefine_Null fix
*/ */
#define UNDEFINE_NULL_FIXIDX 100 #define UNDEFINE_NULL_FIXIDX 101
tSCC zUndefine_NullName[] = tSCC zUndefine_NullName[] =
"Undefine_Null"; "Undefine_Null";
/* /*
...@@ -3916,7 +3951,7 @@ const char* apzUndefine_NullPatch[] = { "sed", ...@@ -3916,7 +3951,7 @@ const char* apzUndefine_NullPatch[] = { "sed",
* *
* Description of Unixware7_Byteorder_Fix fix * Description of Unixware7_Byteorder_Fix fix
*/ */
#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 101 #define UNIXWARE7_BYTEORDER_FIX_FIXIDX 102
tSCC zUnixware7_Byteorder_FixName[] = tSCC zUnixware7_Byteorder_FixName[] =
"Unixware7_Byteorder_Fix"; "Unixware7_Byteorder_Fix";
/* /*
...@@ -3958,7 +3993,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed", ...@@ -3958,7 +3993,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed",
* *
* Description of Va_I960_Macro fix * Description of Va_I960_Macro fix
*/ */
#define VA_I960_MACRO_FIXIDX 102 #define VA_I960_MACRO_FIXIDX 103
tSCC zVa_I960_MacroName[] = tSCC zVa_I960_MacroName[] =
"Va_I960_Macro"; "Va_I960_Macro";
/* /*
...@@ -3995,7 +4030,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed", ...@@ -3995,7 +4030,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed",
* *
* Description of Void_Null fix * Description of Void_Null fix
*/ */
#define VOID_NULL_FIXIDX 103 #define VOID_NULL_FIXIDX 104
tSCC zVoid_NullName[] = tSCC zVoid_NullName[] =
"Void_Null"; "Void_Null";
/* /*
...@@ -4029,7 +4064,7 @@ const char* apzVoid_NullPatch[] = { "sed", ...@@ -4029,7 +4064,7 @@ const char* apzVoid_NullPatch[] = { "sed",
* *
* Description of Vxworks_Gcc_Problem fix * Description of Vxworks_Gcc_Problem fix
*/ */
#define VXWORKS_GCC_PROBLEM_FIXIDX 104 #define VXWORKS_GCC_PROBLEM_FIXIDX 105
tSCC zVxworks_Gcc_ProblemName[] = tSCC zVxworks_Gcc_ProblemName[] =
"Vxworks_Gcc_Problem"; "Vxworks_Gcc_Problem";
/* /*
...@@ -4078,7 +4113,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", ...@@ -4078,7 +4113,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
* *
* Description of Vxworks_Needs_Vxtypes fix * Description of Vxworks_Needs_Vxtypes fix
*/ */
#define VXWORKS_NEEDS_VXTYPES_FIXIDX 105 #define VXWORKS_NEEDS_VXTYPES_FIXIDX 106
tSCC zVxworks_Needs_VxtypesName[] = tSCC zVxworks_Needs_VxtypesName[] =
"Vxworks_Needs_Vxtypes"; "Vxworks_Needs_Vxtypes";
/* /*
...@@ -4112,7 +4147,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed", ...@@ -4112,7 +4147,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed",
* *
* Description of Vxworks_Needs_Vxworks fix * Description of Vxworks_Needs_Vxworks fix
*/ */
#define VXWORKS_NEEDS_VXWORKS_FIXIDX 106 #define VXWORKS_NEEDS_VXWORKS_FIXIDX 107
tSCC zVxworks_Needs_VxworksName[] = tSCC zVxworks_Needs_VxworksName[] =
"Vxworks_Needs_Vxworks"; "Vxworks_Needs_Vxworks";
/* /*
...@@ -4160,7 +4195,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed", ...@@ -4160,7 +4195,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
* *
* Description of Vxworks_Time fix * Description of Vxworks_Time fix
*/ */
#define VXWORKS_TIME_FIXIDX 107 #define VXWORKS_TIME_FIXIDX 108
tSCC zVxworks_TimeName[] = tSCC zVxworks_TimeName[] =
"Vxworks_Time"; "Vxworks_Time";
/* /*
...@@ -4210,7 +4245,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\ ...@@ -4210,7 +4245,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\
* *
* Description of X11_Class fix * Description of X11_Class fix
*/ */
#define X11_CLASS_FIXIDX 108 #define X11_CLASS_FIXIDX 109
tSCC zX11_ClassName[] = tSCC zX11_ClassName[] =
"X11_Class"; "X11_Class";
/* /*
...@@ -4249,7 +4284,7 @@ const char* apzX11_ClassPatch[] = { "sed", ...@@ -4249,7 +4284,7 @@ const char* apzX11_ClassPatch[] = { "sed",
* *
* Description of X11_Class_Usage fix * Description of X11_Class_Usage fix
*/ */
#define X11_CLASS_USAGE_FIXIDX 109 #define X11_CLASS_USAGE_FIXIDX 110
tSCC zX11_Class_UsageName[] = tSCC zX11_Class_UsageName[] =
"X11_Class_Usage"; "X11_Class_Usage";
/* /*
...@@ -4283,7 +4318,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed", ...@@ -4283,7 +4318,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed",
* *
* Description of X11_New fix * Description of X11_New fix
*/ */
#define X11_NEW_FIXIDX 110 #define X11_NEW_FIXIDX 111
tSCC zX11_NewName[] = tSCC zX11_NewName[] =
"X11_New"; "X11_New";
/* /*
...@@ -4323,7 +4358,7 @@ const char* apzX11_NewPatch[] = { "sed", ...@@ -4323,7 +4358,7 @@ const char* apzX11_NewPatch[] = { "sed",
* *
* Description of X11_Sprintf fix * Description of X11_Sprintf fix
*/ */
#define X11_SPRINTF_FIXIDX 111 #define X11_SPRINTF_FIXIDX 112
tSCC zX11_SprintfName[] = tSCC zX11_SprintfName[] =
"X11_Sprintf"; "X11_Sprintf";
/* /*
...@@ -4359,9 +4394,9 @@ extern char *\tsprintf();\\\n\ ...@@ -4359,9 +4394,9 @@ extern char *\tsprintf();\\\n\
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 105 #define REGEX_COUNT 108
#define MACH_LIST_SIZE_LIMIT 279 #define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 112 #define FIX_COUNT 113
tFixDesc fixDescList[ FIX_COUNT ] = { tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList, { zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
...@@ -4499,11 +4534,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4499,11 +4534,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
BROKEN_ASSERT_STDLIB_TEST_CT, FD_MACH_ONLY, BROKEN_ASSERT_STDLIB_TEST_CT, FD_MACH_ONLY,
aBroken_Assert_StdlibTests, apzBroken_Assert_StdlibPatch }, aBroken_Assert_StdlibTests, apzBroken_Assert_StdlibPatch },
{ zBsd43_Io_MacrosName, zBsd43_Io_MacrosList,
apzBsd43_Io_MacrosMachs, (regex_t*)NULL,
BSD43_IO_MACROS_TEST_CT, FD_MACH_ONLY,
aBsd43_Io_MacrosTests, apzBsd43_Io_MacrosPatch },
{ zDec_Intern_AsmName, zDec_Intern_AsmList, { zDec_Intern_AsmName, zDec_Intern_AsmList,
apzDec_Intern_AsmMachs, (regex_t*)NULL, apzDec_Intern_AsmMachs, (regex_t*)NULL,
DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY, DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY,
...@@ -4569,15 +4599,25 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4569,15 +4599,25 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY, ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY,
aIsc_Omits_With_StdcTests, apzIsc_Omits_With_StdcPatch }, aIsc_Omits_With_StdcTests, apzIsc_Omits_With_StdcPatch },
{ zIo_Use_QuotesName, zIo_Use_QuotesList,
apzIo_Use_QuotesMachs, (regex_t*)NULL,
IO_USE_QUOTES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_Use_QuotesTests, apzIo_Use_QuotesPatch },
{ zIo_Def_QuotesName, zIo_Def_QuotesList, { zIo_Def_QuotesName, zIo_Def_QuotesList,
apzIo_Def_QuotesMachs, (regex_t*)NULL, apzIo_Def_QuotesMachs, (regex_t*)NULL,
IO_DEF_QUOTES_TEST_CT, FD_MACH_ONLY, IO_DEF_QUOTES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_Def_QuotesTests, apzIo_Def_QuotesPatch }, aIo_Def_QuotesTests, apzIo_Def_QuotesPatch },
{ zIoctl_Fix_CtrlName, zIoctl_Fix_CtrlList, { zCtrl_Use_QuotesName, zCtrl_Use_QuotesList,
apzIoctl_Fix_CtrlMachs, (regex_t*)NULL, apzCtrl_Use_QuotesMachs, (regex_t*)NULL,
IOCTL_FIX_CTRL_TEST_CT, FD_MACH_ONLY, CTRL_USE_QUOTES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIoctl_Fix_CtrlTests, apzIoctl_Fix_CtrlPatch }, aCtrl_Use_QuotesTests, apzCtrl_Use_QuotesPatch },
{ zCtrl_Def_QuotesName, zCtrl_Def_QuotesList,
apzCtrl_Def_QuotesMachs, (regex_t*)NULL,
CTRL_DEF_QUOTES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_Def_QuotesTests, apzCtrl_Def_QuotesPatch },
{ zIp_Missing_SemiName, zIp_Missing_SemiList, { zIp_Missing_SemiName, zIp_Missing_SemiList,
apzIp_Missing_SemiMachs, (regex_t*)NULL, apzIp_Missing_SemiMachs, (regex_t*)NULL,
......
...@@ -112,43 +112,27 @@ is_cxx_header (fname, text) ...@@ -112,43 +112,27 @@ is_cxx_header (fname, text)
} }
} not_cxx_name:; } not_cxx_name:;
/* Or it might contain the phrase 'extern "C++"' */ /* Or it might contain one of several phrases which indicate C++ code.
for (;;) Currently recognized are:
extern "C++"
-*- (Mode: )? C++ -*- (emacs mode marker)
template <
*/
{ {
tSCC zExtern[] = "extern"; tSCC cxxpat[] = "\
tSCC zExtCxx[] = "\"C++\""; extern[ \t]*\"C\\+\\+\"|\
tSCC zTemplate[] = "template"; -\\*-[ \t]*([mM]ode:[ \t]*)?[cC]\\+\\+[; \t]*-\\*-|\
template[ \t]*<";
switch (*(text++)) static regex_t cxxre;
{ static int compiled;
case 'e':
/* Check for "extern \"C++\"" */ if (!compiled)
if (strncmp (text, zExtern+1, sizeof( zExtern )-2) != 0) compile_re (cxxpat, &cxxre, 0, "contents check", "is_cxx_header");
break;
text += sizeof( zExtern )-2; if (regexec (&cxxre, text, 0, 0, 0) == 0)
if (! isspace( *(text++)) ) return BOOL_TRUE;
break; }
while (isspace( *text )) text++;
if (strncmp (text, zExtCxx, sizeof (zExtCxx) -1) == 0)
return BOOL_TRUE;
break;
case 't':
/* Check for "template<" */
if (strncmp (text, zTemplate+1, sizeof( zTemplate )-2) != 0)
break;
text += sizeof( zTemplate )-2;
while (isspace( *text )) text++;
if (*text == '<')
return BOOL_TRUE;
break;
case NUL:
goto text_done;
break;
}
} text_done:;
return BOOL_FALSE; return BOOL_FALSE;
} }
......
...@@ -153,9 +153,9 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test ) ...@@ -153,9 +153,9 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
static regex_t label_re; static regex_t label_re;
char ch; char ch;
tCC* pz_next = (char*)NULL; tCC* pz_next;
tCC* all_text = text;
regmatch_t match[2]; regmatch_t match[2];
t_bool file_is_cxx = is_cxx_header( fname, text );
/* /*
This routine may be run many times within a single execution. This routine may be run many times within a single execution.
...@@ -170,20 +170,14 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test ) ...@@ -170,20 +170,14 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
for (;;) /* entire file */ for (;;) /* entire file */
{ {
/* /* Find the next else or endif in the file. */
See if we need to advance to the next candidate directive if (regexec (&label_re, text, 2, match, 0) != 0)
If the scanning pointer passes over the end of the directive, break;
then the directive is inside a comment */ pz_next = text + match[0].rm_eo;
if (pz_next < text)
{ /* Scan from where we are up to that position, to make sure
if (regexec (&label_re, text, 2, match, 0) != 0) we didn't find something in a string or comment. */
break; while (pz_next > text)
pz_next = text + match[0].rm_eo;
}
/*
IF the scan pointer has not reached the directive end, ... */
if (pz_next > text)
{ {
/* /*
Advance the scanning pointer. If we are at the start Advance the scanning pointer. If we are at the start
...@@ -209,34 +203,23 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test ) ...@@ -209,34 +203,23 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
case '\'': case '\'':
text = skip_quote( ch, text ); text = skip_quote( ch, text );
break; break;
} /* switch (ch) */ }
continue; }
} /* if (still shy of directive end) */ if (pz_next < text)
continue;
/* /* We're at the end of a real directive. Check for bogons here. */
The scanning pointer (text) has reached the end of the current for (;;)
directive under test, then check for bogons here */
for (;;) /* bogon check */
{ {
char ch = *(pz_next++); char ch = *(pz_next++);
if (isspace (ch)) switch (ch)
{ {
if (ch == '\n') case '\n':
{ /* It is clean. No bogons on this directive. */
/* goto next_directive;
It is clean. No bogons on this directive */
text = pz_next;
pz_next = (char*)NULL; /* force a new regex search */
break;
}
continue;
}
switch (ch)
{
case '\\': case '\\':
/* /* Skip escaped newlines. Otherwise, we have a bogon. */
Skip escaped newlines. Otherwise, we have a bogon */
if (*pz_next != '\n') if (*pz_next != '\n')
return APPLY_FIX; return APPLY_FIX;
...@@ -244,47 +227,48 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test ) ...@@ -244,47 +227,48 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
break; break;
case '/': case '/':
/* /* Skip comments. Otherwise, we have a bogon */
Skip comments. Otherwise, we have a bogon */ switch (*pz_next)
switch (*pz_next) {
{ case '/':
case '/': /* // in a C header is a bogon. */
/* IF we found a "//" in a C header, THEN fix it. */ if (! is_cxx_header( fname, all_text ))
if (! file_is_cxx)
return APPLY_FIX; return APPLY_FIX;
/* C++ header. Skip to newline and continue. */ /* C++ comment is allowed in a C++ header.
Skip to newline and continue. */
pz_next = strchr( pz_next+1, '\n' ); pz_next = strchr( pz_next+1, '\n' );
if (pz_next == (char*)NULL) if (pz_next == (char*)NULL)
return SKIP_FIX; return SKIP_FIX;
pz_next++; pz_next++;
break; goto next_directive;
case '*': case '*':
/* A comment for either C++ or C. Skip over it. */ /* A comment for either C++ or C. Skip over it. */
pz_next = strstr( pz_next+1, "*/" ); pz_next = strstr( pz_next+1, "*/" );
if (pz_next == (char*)NULL) if (pz_next == (char*)NULL)
return SKIP_FIX; return SKIP_FIX;
pz_next += 2; pz_next += 2;
break; break;
default: default:
/* a '/' followed by other junk. */ return APPLY_FIX;
return APPLY_FIX; }
} break;
break; /* a C or C++ comment */
default: default:
/* if (!isspace (ch))
GOTTA BE A BOGON */ return APPLY_FIX;
return APPLY_FIX;
} /* switch (ch) */ } /* switch (ch) */
} /* for (bogon check loop) */ } /* for (bogon check loop) */
next_directive:;
text = pz_next;
} /* for (entire file) loop */ } /* for (entire file) loop */
return SKIP_FIX; return SKIP_FIX;
} }
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
test for fix selector test for fix selector
......
...@@ -631,6 +631,9 @@ fix = { ...@@ -631,6 +631,9 @@ fix = {
files = term.h; files = term.h;
files = tinfo.h; files = tinfo.h;
select = "char[ \t]+bool|bool[ \t]+char";
bypass = "we must use the C\\+\\+ compiler's type";
sed = "/^#[ \t]*define[ \t][ \t]*bool[ \t][ \t]*char[ \t]*$/i\\\n" sed = "/^#[ \t]*define[ \t][ \t]*bool[ \t][ \t]*char[ \t]*$/i\\\n"
"#ifndef __cplusplus\n"; "#ifndef __cplusplus\n";
...@@ -749,21 +752,6 @@ fix = { ...@@ -749,21 +752,6 @@ fix = {
/* /*
* Note that BSD43_* are used on recent MIPS systems.
*/
fix = {
hackname = bsd43_io_macros;
select = "BSD43__IO";
/*
* Put single quotes aroung the character that appears after '('
* and before ',', UNLESS it is a 'c' or 'g' or 'x'.
*/
sed = "/[ \t]BSD43__IO[A-Z]*[ \t]*(/" 's/(\(.\),/(\'\1\',/';
sed = "/#[ \t]*define[ \t]*[ \t]BSD43__IO/" 's/\'\([cgx]\)\'/\1/g';
};
/*
* Fix <c_asm.h> on Digital UNIX V4.0: * Fix <c_asm.h> on Digital UNIX V4.0:
* It contains a prototype for a DEC C internal asm() function, * It contains a prototype for a DEC C internal asm() function,
* clashing with gcc's asm keyword. So protect this with __DECC. * clashing with gcc's asm keyword. So protect this with __DECC.
...@@ -970,52 +958,45 @@ fix = { ...@@ -970,52 +958,45 @@ fix = {
}; };
/* /*
* Fix various _IO* defines, but do *not* quote the characters cgxtf. * Fix various macros used to define ioctl numbers. The traditional
* syntax was
* #define _IO(n, x) (('n'<<8)+x)
* #define TIOCFOO _IO(T, 1)
* but this does not work with the C standard, which disallows macro
* expansion inside strings. We have to rewrite it thus:
* #define _IO(n, x) ((n<<8)+x)
* #define TIOCFOO _IO('T', 1)
* The select expressions match too much, but the c_fix code is cautious.
*
* _IO might be: _IO DESIO BSD43__IO with W, R, WR, C, ... suffixes.
*/ */
fix = { fix = {
hackname = io_def_quotes; hackname = io_use_quotes;
select = "[ \t]*[ \t](_|DES)IO[A-Z]*[ \t]*\\( *[^,']"; select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*\\( *[^,']";
sed = "s/\\([ \t]*[ \t]_IO[A-Z]*[ \t]*(\\)\\([^,']\\),/\\1'\\2',/"; c_fix = IO_use;
sed = "s/\\([ \t]*[ \t]DESIO[A-Z]*[ \t]*(\\)\\([^,']\\),/\\1'\\2',/";
sed = "/#[ \t]*define[ \t]*[ \t]_IO/" "s/'\\([cgxtf]\\)'/\\1/g";
sed = "/#[ \t]*define[ \t]*[ \t]DESIOC/" 's/\'\([cdgx]\)\'/\1/g';
}; };
fix = {
hackname = io_def_quotes;
select = "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\(([a-zA-Z]).*'\\1'";
c_fix = IO_defn;
};
/* /*
* Fix CTRL macros * Same deal for CTRL() macros.
* * CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ...
* Basically, what is supposed to be happening is that every
* _invocation_ of the "_CTRL()" or "CTRL()" macros is supposed to have
* its argument inserted into single quotes. We _must_ do this because
* ANSI macro substitution rules prohibit looking inside quoted strings
* for the substitution names. A side effect is that the quotes are
* inserted in the definitions of those macros as well. So, the last
* several sed expressions are supposed to clean up the definitions, as
* long as those definitions are using "c", "g" or "x" as the macro
* argument :). Yuck.
*/ */
fix = { fix = {
hackname = ioctl_fix_ctrl; hackname = ctrl_use_quotes;
select = "CTRL[ \t]*\\("; select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
c_fix = CTRL_use;
sed = "/[^A-Z0-9_]CTRL[ \t]*(/" };
"s/\\([^']\\))/'\\1')/";
fix = {
sed = "/[^A-Z0-9]_CTRL[ \t]*(/" hackname = ctrl_def_quotes;
"s/\\([^']\\))/'\\1')/"; select = "define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
c_fix = CTRL_defn;
sed = "/#[ \t]*define[ \t]*[ \t]CTRL/"
"s/'\\([cgx]\\)'/\\1/g";
sed = "/#[ \t]*define[ \t]*[ \t]_CTRL/"
"s/'\\([cgx]\\)'/\\1/g";
sed = "/#[ \t]*define[ \t]*[ \t]BSD43_CTRL/"
"s/'\\([cgx]\\)'/\\1/g";
sed = "/#[ \t]*define[ \t]*[ \t][_]*ISCTRL/"
"s/'\\([cgx]\\)'/\\1/g";
}; };
...@@ -1372,7 +1353,7 @@ fix = { ...@@ -1372,7 +1353,7 @@ fix = {
hackname = math_exception; hackname = math_exception;
files = math.h; files = math.h;
select = "struct exception"; select = "struct exception";
bypass = "We have a problem when using C++"; bypass = "We have a problem when using C\\+\\+";
sed = "/struct exception/i\\\n" sed = "/struct exception/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#define exception __math_exception\\\n" "#define exception __math_exception\\\n"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a # files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search. # directory that GNU C will search.
# #
# This script contains 112 fixup scripts. # This script contains 113 fixup scripts.
# #
# See README-fixinc for more information. # See README-fixinc for more information.
# #
...@@ -1056,6 +1056,10 @@ struct rusage; ...@@ -1056,6 +1056,10 @@ struct rusage;
./curses_colr/curses.h | \ ./curses_colr/curses.h | \
./term.h | \ ./term.h | \
./tinfo.h ) ./tinfo.h )
if ( test -n "`egrep 'char[ ]+bool|bool[ ]+char' ${file}`"
) > /dev/null 2>&1 ; then
if ( test -z "`egrep 'we must use the C\\+\\+ compiler'\\''s type' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
avoid_bool" avoid_bool"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -1095,6 +1099,8 @@ struct rusage; ...@@ -1095,6 +1099,8 @@ struct rusage;
< $infile > ${DESTDIR}/fixinc.tmp < $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE} rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of bypass 'if'
fi # end of select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
...@@ -1227,25 +1233,6 @@ struct rusage; ...@@ -1227,25 +1233,6 @@ struct rusage;
# #
# Fix Bsd43_Io_Macros
#
if ( test -n "`egrep 'BSD43__IO' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
bsd43_io_macros"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
sed -e '/[ ]BSD43__IO[A-Z]*[ ]*(/s/(\(.\),/('\''\1'\'',/' \
-e '/#[ ]*define[ ]*[ ]BSD43__IO/s/'\''\([cgx]\)'\''/\1/g' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if'
#
# Fix Dec_Intern_Asm # Fix Dec_Intern_Asm
# #
case "${file}" in ./c_asm.h ) case "${file}" in ./c_asm.h )
...@@ -1541,44 +1528,64 @@ extern "C" {\ ...@@ -1541,44 +1528,64 @@ extern "C" {\
# #
# Fix Io_Use_Quotes
#
if ( test -n "`egrep 'define[ ]+[A-Z0-9_]+[ ]+[A-Z0-9_]+IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
io_use_quotes"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
${FIXFIXES} ${file} IO_use < $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if'
#
# Fix Io_Def_Quotes # Fix Io_Def_Quotes
# #
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`" if ( test -n "`egrep 'define[ ]+[A-Z0-9_]+IO[A-Z]*\\(([a-zA-Z]).*'\\''\\1'\\''' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
io_def_quotes" io_def_quotes"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
then infile=${file} then infile=${file}
else infile=${DESTFILE} ; fi else infile=${DESTFILE} ; fi
${FIXFIXES} ${file} IO_defn < $infile > ${DESTDIR}/fixinc.tmp
sed -e 's/\([ ]*[ ]_IO[A-Z]*[ ]*(\)\([^,'\'']\),/\1'\''\2'\'',/' \
-e 's/\([ ]*[ ]DESIO[A-Z]*[ ]*(\)\([^,'\'']\),/\1'\''\2'\'',/' \
-e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE} rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if' fi # end of select 'if'
# #
# Fix Ioctl_Fix_Ctrl # Fix Ctrl_Use_Quotes
# #
if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`" if ( test -n "`egrep 'define[ ]+[A-Z0-9_]+[ ]+[A-Z0-9_]+CTRL[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
ioctl_fix_ctrl" ctrl_use_quotes"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
then infile=${file} then infile=${file}
else infile=${DESTFILE} ; fi else infile=${DESTFILE} ; fi
${FIXFIXES} ${file} CTRL_use < $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if'
sed -e '/[^A-Z0-9_]CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \
-e '/[^A-Z0-9]_CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ #
-e '/#[ ]*define[ ]*[ ]CTRL/s/'\''\([cgx]\)'\''/\1/g' \ # Fix Ctrl_Def_Quotes
-e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ #
-e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ if ( test -n "`egrep 'define[ ]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\''\\1'\\''' ${file}`"
-e '/#[ ]*define[ ]*[ ][_]*ISCTRL/s/'\''\([cgx]\)'\''/\1/g' \ ) > /dev/null 2>&1 ; then
< $infile > ${DESTDIR}/fixinc.tmp fixlist="${fixlist}
ctrl_def_quotes"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
${FIXFIXES} ${file} CTRL_defn < $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE} rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if' fi # end of select 'if'
...@@ -2043,7 +2050,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2043,7 +2050,7 @@ s/\\+++fixinc_eol+++/\\/g
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test -n "`egrep 'struct exception' ${file}`" if ( test -n "`egrep 'struct exception' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
if ( test -z "`egrep 'We have a problem when using C++' ${file}`" if ( test -z "`egrep 'We have a problem when using C\\+\\+' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
math_exception" math_exception"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment