Commit d7eb5a45 by Zack Weinberg Committed by Zack Weinberg

fixtests.c (is_cxx_header): New fn, split out of double_slash_test.

1999-12-17 13:21 -0800  Zack Weinberg  <zack@rabi.columbia.edu>

	* fixtests.c (is_cxx_header): New fn, split out of
	double_slash_test.
	(else_endif_label): Allow "#endif // comment" in C++ headers,
	as determined by is_cxx_header.
	* fixfixes.c (else_endif_label_fix): Update comment.
	* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
	a tty.
	* genfixes: Correct double thinko in commandline parsing.
	* hackshell.tpl: Generate correct sh syntax for bypass
	entries.

	* inclhack.def (all): Whenever an inserted preprocessor
	conditional is split over multiple lines, use double
	backslashes in this file so the fixed header will be readable.

	(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
	and add bypass entry for correct version of this header.
	(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
	(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.

	(hpux8_bogus_inlines): New fix, split from...
	(ultrix_atof_param) ... here.
	(math_expression): Add bypass entry keyed to glibc comment
	indicating the problem has been dealt with; disable
	unnecessary sed operations; update commentary.
	(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
	add select and bypass entries, simplify shell operation.
	(math_huge_val_ifndef): Split from math_gcc_ifndefs.

	(ip_missing_semi, rs6000_param, tinfo_cplusplus,
	 ultrix_atof_param): Add select entry.
	(stdio_va_list, sunos_mather_decl): Add bypass entry.
	(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
	comments with the fixes they describe.

	* fixincl.x, fixincl.sh, inclhack.sh: Regen.

From-SVN: r30999
parent cdfff38e
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu> 1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* c-parse.in (string action): Do not warn about ANSI string * c-parse.in (string action): Do not warn about ANSI string
concatenation in system headers. Affects C parser only. concatenation in system headers. Affects C parser only.
* c-parse.y, c-parse.c, c-parse.h: Rebuild. * c-parse.y, c-parse.c, c-parse.h: Rebuild.
......
...@@ -312,10 +312,6 @@ FIX_PROC_HEAD( else_endif_label_fix ) ...@@ -312,10 +312,6 @@ FIX_PROC_HEAD( else_endif_label_fix )
break; break;
} }
/*
FIXME: if this is a C++ file, then a double slash comment
is allowed to follow the directive. */
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
......
...@@ -114,6 +114,7 @@ typedef enum { ...@@ -114,6 +114,7 @@ typedef enum {
} te_verbose; } te_verbose;
te_verbose verbose_level = VERB_PROGRESS; te_verbose verbose_level = VERB_PROGRESS;
int have_tty = 0;
#define VLEVEL(l) (verbose_level >= l) #define VLEVEL(l) (verbose_level >= l)
#define NOT_SILENT VLEVEL(VERB_FIXES) #define NOT_SILENT VLEVEL(VERB_FIXES)
...@@ -192,6 +193,8 @@ main (argc, argv) ...@@ -192,6 +193,8 @@ main (argc, argv)
initialize (); initialize ();
have_tty = isatty (fileno (stderr));
/* Before anything else, ensure we can allocate our file name buffer. */ /* Before anything else, ensure we can allocate our file name buffer. */
file_name_buf = load_file_data (stdin); file_name_buf = load_file_data (stdin);
...@@ -1336,7 +1339,7 @@ process () ...@@ -1336,7 +1339,7 @@ process ()
#ifdef DO_STATS #ifdef DO_STATS
process_ct++; process_ct++;
#endif #endif
if (VLEVEL( VERB_PROGRESS )) if (VLEVEL( VERB_PROGRESS ) && have_tty)
fprintf (stderr, "%6d %-50s \r", data_map_size, pz_curr_file ); fprintf (stderr, "%6d %-50s \r", data_map_size, pz_curr_file );
process_chain_head = NOPROCESS; process_chain_head = NOPROCESS;
......
...@@ -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 114 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 114 fixup descriptions.
* *
* See README-fixinc for more information. * See README-fixinc for more information.
* *
...@@ -313,38 +313,54 @@ typedef char * va_list;\n\ ...@@ -313,38 +313,54 @@ typedef char * va_list;\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Aab_Fd_Zero_Glibc_1_0 fix * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix
*/ */
#define AAB_FD_ZERO_GLIBC_1_0_FIXIDX 7 #define AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX 7
tSCC zAab_Fd_Zero_Glibc_1_0Name[] = tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] =
"Aab_Fd_Zero_Glibc_1_0"; "Aab_Fd_Zero_Asm_Posix_Types_H";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zAab_Fd_Zero_Glibc_1_0List[] = tSCC zAab_Fd_Zero_Asm_Posix_Types_HList[] =
"|asm/posix_types.h|"; "|asm/posix_types.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzAab_Fd_Zero_Glibc_1_0Machs[] = { tSCC* apzAab_Fd_Zero_Asm_Posix_Types_HMachs[] = {
"i[34567]86-*-linux-gnu*", "i[34567]86-*-linux-gnu*",
(const char*)NULL }; (const char*)NULL };
#define AAB_FD_ZERO_GLIBC_1_0_TEST_CT 0
#define AAB_FD_ZERO_GLIBC_1_0_RE_CT 0
#define aAab_Fd_Zero_Glibc_1_0Tests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Aab_Fd_Zero_Glibc_1_0 * content bypass pattern - skip fix if pattern found
*/ */
const char* apzAab_Fd_Zero_Glibc_1_0Patch[] = { tSCC zAab_Fd_Zero_Asm_Posix_Types_HBypass0[] =
"/* This file fixes __FD_ZERO bug for glibc-1.x. */\n\ "} while";
#define AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT 1
#define AAB_FD_ZERO_ASM_POSIX_TYPES_H_RE_CT 1
tTestDesc aAab_Fd_Zero_Asm_Posix_Types_HTests[] = {
{ TT_NEGREP, zAab_Fd_Zero_Asm_Posix_Types_HBypass0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aab_Fd_Zero_Asm_Posix_Types_H
*/
const char* apzAab_Fd_Zero_Asm_Posix_Types_HPatch[] = {
"/* This file fixes a bug in the __FD_ZERO macro\n\
for older versions of the Linux kernel. */\n\
#ifndef _POSIX_TYPES_H_WRAPPER\n\ #ifndef _POSIX_TYPES_H_WRAPPER\n\
#include <features.h>\n\ #include <features.h>\n\
#include_next <asm/posix_types.h>\n\ #include_next <asm/posix_types.h>\n\
\n\ \n\
#if defined(__FD_ZERO) && !defined(__GLIBC__)\n\ #if defined(__FD_ZERO) && !defined(__GLIBC__)\n\
#undef __FD_ZERO\n\ #undef __FD_ZERO\n\
#define __FD_ZERO(fdsetp) do { int __d0, __d1; \t\t__asm__ __volatile__(\"cld ; rep ; stosl\" \t\t\t: \"=&c\" (__d0), \"=&D\" (__d1) \t\t\t: \"a\" (0), \"0\" (__FDSET_LONGS), \t\t\t \"1\" ((__kernel_fd_set *) (fdsetp)) :\"memory\"); } while (0)\n\ #define __FD_ZERO(fdsetp) \\\n\
do { \\\n\
int __d0, __d1; \\\n\
\t\t__asm__ __volatile__(\"cld ; rep ; stosl\" \\\n\
\t\t\t: \"=&c\" (__d0), \"=&D\" (__d1) \\\n\
\t\t\t: \"a\" (0), \"0\" (__FDSET_LONGS), \\\n\
\t\t\t \"1\" ((__kernel_fd_set *) (fdsetp)) :\"memory\"); \\\n\
} while (0)\n\
#endif\n\ #endif\n\
\n\ \n\
#define _POSIX_TYPES_H_WRAPPER\n\ #define _POSIX_TYPES_H_WRAPPER\n\
...@@ -353,38 +369,45 @@ const char* apzAab_Fd_Zero_Glibc_1_0Patch[] = { ...@@ -353,38 +369,45 @@ const char* apzAab_Fd_Zero_Glibc_1_0Patch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Aab_Fd_Zero_Glibc_1_X fix * Description of Aab_Fd_Zero_Gnu_Types_H fix
*/ */
#define AAB_FD_ZERO_GLIBC_1_X_FIXIDX 8 #define AAB_FD_ZERO_GNU_TYPES_H_FIXIDX 8
tSCC zAab_Fd_Zero_Glibc_1_XName[] = tSCC zAab_Fd_Zero_Gnu_Types_HName[] =
"Aab_Fd_Zero_Glibc_1_X"; "Aab_Fd_Zero_Gnu_Types_H";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zAab_Fd_Zero_Glibc_1_XList[] = tSCC zAab_Fd_Zero_Gnu_Types_HList[] =
"|gnu/types.h|"; "|gnu/types.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzAab_Fd_Zero_Glibc_1_XMachs[] = { tSCC* apzAab_Fd_Zero_Gnu_Types_HMachs[] = {
"i[34567]86-*-linux-gnu*", "i[34567]86-*-linux-gnu*",
(const char*)NULL }; (const char*)NULL };
#define AAB_FD_ZERO_GLIBC_1_X_TEST_CT 0 #define AAB_FD_ZERO_GNU_TYPES_H_TEST_CT 0
#define AAB_FD_ZERO_GLIBC_1_X_RE_CT 0 #define AAB_FD_ZERO_GNU_TYPES_H_RE_CT 0
#define aAab_Fd_Zero_Glibc_1_XTests (tTestDesc*)NULL #define aAab_Fd_Zero_Gnu_Types_HTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Aab_Fd_Zero_Glibc_1_X * Fix Command Arguments for Aab_Fd_Zero_Gnu_Types_H
*/ */
const char* apzAab_Fd_Zero_Glibc_1_XPatch[] = { const char* apzAab_Fd_Zero_Gnu_Types_HPatch[] = {
"/* This file fixes __FD_ZERO bug for glibc-1.x. */\n\ "/* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */\n\
#ifndef _TYPES_H_WRAPPER\n\ #ifndef _TYPES_H_WRAPPER\n\
#include <features.h>\n\ #include <features.h>\n\
#include_next <gnu/types.h>\n\ #include_next <gnu/types.h>\n\
\n\ \n\
#if defined(__FD_ZERO) && !defined(__GLIBC__)\n\ #if defined(__FD_ZERO) && !defined(__GLIBC__)\n\
#undef __FD_ZERO\n\ #undef __FD_ZERO\n\
# define __FD_ZERO(fdsetp) do { int __d0, __d1; \t__asm__ __volatile__(\"cld ; rep ; stosl\" \t: \"=&c\" (__d0), \"=&D\" (__d1) \t: \"a\" (0), \"0\" (__FDSET_LONGS), \t\t \"1\" ((__fd_set *) (fdsetp)) :\"memory\"); } while (0)\n\ # define __FD_ZERO(fdsetp) \\\n\
do { \\\n\
int __d0, __d1; \\\n\
\t__asm__ __volatile__(\"cld ; rep ; stosl\" \\\n\
\t: \"=&c\" (__d0), \"=&D\" (__d1) \\\n\
\t: \"a\" (0), \"0\" (__FDSET_LONGS), \\\n\
\t\t \"1\" ((__fd_set *) (fdsetp)) :\"memory\"); \\\n\
} while (0)\n\
#endif\n\ #endif\n\
\n\ \n\
#define _TYPES_H_WRAPPER\n\ #define _TYPES_H_WRAPPER\n\
...@@ -393,38 +416,49 @@ const char* apzAab_Fd_Zero_Glibc_1_XPatch[] = { ...@@ -393,38 +416,49 @@ const char* apzAab_Fd_Zero_Glibc_1_XPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Aab_Fd_Zero_Glibc_2_0 fix * Description of Aab_Fd_Zero_Selectbits_H fix
*/ */
#define AAB_FD_ZERO_GLIBC_2_0_FIXIDX 9 #define AAB_FD_ZERO_SELECTBITS_H_FIXIDX 9
tSCC zAab_Fd_Zero_Glibc_2_0Name[] = tSCC zAab_Fd_Zero_Selectbits_HName[] =
"Aab_Fd_Zero_Glibc_2_0"; "Aab_Fd_Zero_Selectbits_H";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zAab_Fd_Zero_Glibc_2_0List[] = tSCC zAab_Fd_Zero_Selectbits_HList[] =
"|selectbits.h|"; "|selectbits.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzAab_Fd_Zero_Glibc_2_0Machs[] = { tSCC* apzAab_Fd_Zero_Selectbits_HMachs[] = {
"i[34567]86-*-linux-gnu*", "i[34567]86-*-linux-gnu*",
(const char*)NULL }; (const char*)NULL };
#define AAB_FD_ZERO_GLIBC_2_0_TEST_CT 0 #define AAB_FD_ZERO_SELECTBITS_H_TEST_CT 0
#define AAB_FD_ZERO_GLIBC_2_0_RE_CT 0 #define AAB_FD_ZERO_SELECTBITS_H_RE_CT 0
#define aAab_Fd_Zero_Glibc_2_0Tests (tTestDesc*)NULL #define aAab_Fd_Zero_Selectbits_HTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Aab_Fd_Zero_Glibc_2_0 * Fix Command Arguments for Aab_Fd_Zero_Selectbits_H
*/ */
const char* apzAab_Fd_Zero_Glibc_2_0Patch[] = { const char* apzAab_Fd_Zero_Selectbits_HPatch[] = {
"/* This file fixes __FD_ZERO bug for glibc-2.0.x. */\n\ "/* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */\n\
#ifndef _SELECTBITS_H_WRAPPER\n\ #ifndef _SELECTBITS_H_WRAPPER\n\
#include <features.h>\n\ #include <features.h>\n\
#include_next <selectbits.h>\n\ #include_next <selectbits.h>\n\
\n\ \n\
#if defined(__FD_ZERO) && defined(__GLIBC__) \t&& defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \t&& __GLIBC_MINOR__ == 0\n\ #if defined(__FD_ZERO) && defined(__GLIBC__) \\\n\
\t&& defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\\n\
\t&& __GLIBC_MINOR__ == 0\n\
#undef __FD_ZERO\n\ #undef __FD_ZERO\n\
#define __FD_ZERO(fdsetp) do { int __d0, __d1; __asm__ __volatile__ (\"cld; rep; stosl\" : \"=&c\" (__d0), \"=&D\" (__d1) : \"a\" (0), \"0\" (sizeof (__fd_set) / sizeof (__fd_mask)), \"1\" ((__fd_mask *) (fdsetp)) : \"memory\"); } while (0)\n\ #define __FD_ZERO(fdsetp) \\\n\
do { \\\n\
int __d0, __d1; \\\n\
__asm__ __volatile__ (\"cld; rep; stosl\" \\\n\
: \"=&c\" (__d0), \"=&D\" (__d1) \\\n\
: \"a\" (0), \"0\" (sizeof (__fd_set) \\\n\
/ sizeof (__fd_mask)), \\\n\
\"1\" ((__fd_mask *) (fdsetp)) \\\n\
: \"memory\"); \\\n\
} while (0)\n\
#endif\n\ #endif\n\
\n\ \n\
#define _SELECTBITS_H_WRAPPER\n\ #define _SELECTBITS_H_WRAPPER\n\
...@@ -528,7 +562,9 @@ htons (unsigned int __arg)\n\ ...@@ -528,7 +562,9 @@ htons (unsigned int __arg)\n\
return __result;\n\ return __result;\n\
}\n\ }\n\
\n\ \n\
#elif ((defined (__i860__) && !defined (__i860_big_endian__))\t || defined (__ns32k__) || defined (__vax__)\t\t || defined (__spur__) || defined (__arm__))\n\ #elif ((defined (__i860__) && !defined (__i860_big_endian__))\t\\\n\
|| defined (__ns32k__) || defined (__vax__)\t\t\\\n\
|| defined (__spur__) || defined (__arm__))\n\
\n\ \n\
#ifndef __BYTE_ORDER__\n\ #ifndef __BYTE_ORDER__\n\
#define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\ #define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\
...@@ -1492,9 +1528,47 @@ const char* apzHpux_SystimePatch[] = { "sed", ...@@ -1492,9 +1528,47 @@ const char* apzHpux_SystimePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hpux8_Bogus_Inlines fix
*/
#define HPUX8_BOGUS_INLINES_FIXIDX 36
tSCC zHpux8_Bogus_InlinesName[] =
"Hpux8_Bogus_Inlines";
/*
* File name selection pattern
*/
tSCC zHpux8_Bogus_InlinesList[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzHpux8_Bogus_InlinesMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux8_Bogus_InlinesSelect0[] =
"inline";
#define HPUX8_BOGUS_INLINES_TEST_CT 1
#define HPUX8_BOGUS_INLINES_RE_CT 1
tTestDesc aHpux8_Bogus_InlinesTests[] = {
{ TT_EGREP, zHpux8_Bogus_InlinesSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hpux8_Bogus_Inlines
*/
const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
"-e", "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@",
"-e", "s@inline double abs(double [a-z][a-z]*) {.*}@@",
"-e", "s@inline int sqr(int [a-z][a-z]*) {.*}@@",
"-e", "s@inline double sqr(double [a-z][a-z]*) {.*}@@",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux11_Uint32_C fix * Description of Hpux11_Uint32_C fix
*/ */
#define HPUX11_UINT32_C_FIXIDX 36 #define HPUX11_UINT32_C_FIXIDX 37
tSCC zHpux11_Uint32_CName[] = tSCC zHpux11_Uint32_CName[] =
"Hpux11_Uint32_C"; "Hpux11_Uint32_C";
/* /*
...@@ -1529,7 +1603,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed", ...@@ -1529,7 +1603,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed",
* *
* Description of Interactv_Add1 fix * Description of Interactv_Add1 fix
*/ */
#define INTERACTV_ADD1_FIXIDX 37 #define INTERACTV_ADD1_FIXIDX 38
tSCC zInteractv_Add1Name[] = tSCC zInteractv_Add1Name[] =
"Interactv_Add1"; "Interactv_Add1";
/* /*
...@@ -1567,7 +1641,7 @@ const char* apzInteractv_Add1Patch[] = { "sed", ...@@ -1567,7 +1641,7 @@ const char* apzInteractv_Add1Patch[] = { "sed",
* *
* Description of Interactv_Add2 fix * Description of Interactv_Add2 fix
*/ */
#define INTERACTV_ADD2_FIXIDX 38 #define INTERACTV_ADD2_FIXIDX 39
tSCC zInteractv_Add2Name[] = tSCC zInteractv_Add2Name[] =
"Interactv_Add2"; "Interactv_Add2";
/* /*
...@@ -1605,7 +1679,7 @@ const char* apzInteractv_Add2Patch[] = { "sed", ...@@ -1605,7 +1679,7 @@ const char* apzInteractv_Add2Patch[] = { "sed",
* *
* Description of Interactv_Add3 fix * Description of Interactv_Add3 fix
*/ */
#define INTERACTV_ADD3_FIXIDX 39 #define INTERACTV_ADD3_FIXIDX 40
tSCC zInteractv_Add3Name[] = tSCC zInteractv_Add3Name[] =
"Interactv_Add3"; "Interactv_Add3";
/* /*
...@@ -1644,7 +1718,7 @@ const char* apzInteractv_Add3Patch[] = { "sed", ...@@ -1644,7 +1718,7 @@ const char* apzInteractv_Add3Patch[] = { "sed",
* *
* Description of Io_Def_Quotes fix * Description of Io_Def_Quotes fix
*/ */
#define IO_DEF_QUOTES_FIXIDX 40 #define IO_DEF_QUOTES_FIXIDX 41
tSCC zIo_Def_QuotesName[] = tSCC zIo_Def_QuotesName[] =
"Io_Def_Quotes"; "Io_Def_Quotes";
/* /*
...@@ -1681,7 +1755,7 @@ const char* apzIo_Def_QuotesPatch[] = { "sed", ...@@ -1681,7 +1755,7 @@ const char* apzIo_Def_QuotesPatch[] = { "sed",
* *
* Description of Ioctl_Fix_Ctrl fix * Description of Ioctl_Fix_Ctrl fix
*/ */
#define IOCTL_FIX_CTRL_FIXIDX 41 #define IOCTL_FIX_CTRL_FIXIDX 42
tSCC zIoctl_Fix_CtrlName[] = tSCC zIoctl_Fix_CtrlName[] =
"Ioctl_Fix_Ctrl"; "Ioctl_Fix_Ctrl";
/* /*
...@@ -1720,7 +1794,7 @@ const char* apzIoctl_Fix_CtrlPatch[] = { "sed", ...@@ -1720,7 +1794,7 @@ const char* apzIoctl_Fix_CtrlPatch[] = { "sed",
* *
* Description of Ip_Missing_Semi fix * Description of Ip_Missing_Semi fix
*/ */
#define IP_MISSING_SEMI_FIXIDX 42 #define IP_MISSING_SEMI_FIXIDX 43
tSCC zIp_Missing_SemiName[] = tSCC zIp_Missing_SemiName[] =
"Ip_Missing_Semi"; "Ip_Missing_Semi";
/* /*
...@@ -1732,9 +1806,17 @@ tSCC zIp_Missing_SemiList[] = ...@@ -1732,9 +1806,17 @@ tSCC zIp_Missing_SemiList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzIp_Missing_SemiMachs (const char**)NULL #define apzIp_Missing_SemiMachs (const char**)NULL
#define IP_MISSING_SEMI_TEST_CT 0
#define IP_MISSING_SEMI_RE_CT 0 /*
#define aIp_Missing_SemiTests (tTestDesc*)NULL * content selection pattern - do fix if pattern found
*/
tSCC zIp_Missing_SemiSelect0[] =
"}$";
#define IP_MISSING_SEMI_TEST_CT 1
#define IP_MISSING_SEMI_RE_CT 1
tTestDesc aIp_Missing_SemiTests[] = {
{ TT_EGREP, zIp_Missing_SemiSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Ip_Missing_Semi * Fix Command Arguments for Ip_Missing_Semi
...@@ -1747,7 +1829,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed", ...@@ -1747,7 +1829,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed",
* *
* Description of Irix_Multiline_Cmnt fix * Description of Irix_Multiline_Cmnt fix
*/ */
#define IRIX_MULTILINE_CMNT_FIXIDX 43 #define IRIX_MULTILINE_CMNT_FIXIDX 44
tSCC zIrix_Multiline_CmntName[] = tSCC zIrix_Multiline_CmntName[] =
"Irix_Multiline_Cmnt"; "Irix_Multiline_Cmnt";
/* /*
...@@ -1775,7 +1857,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed", ...@@ -1775,7 +1857,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed",
* *
* Description of Irix_Sockaddr fix * Description of Irix_Sockaddr fix
*/ */
#define IRIX_SOCKADDR_FIXIDX 44 #define IRIX_SOCKADDR_FIXIDX 45
tSCC zIrix_SockaddrName[] = tSCC zIrix_SockaddrName[] =
"Irix_Sockaddr"; "Irix_Sockaddr";
/* /*
...@@ -1811,7 +1893,7 @@ struct sockaddr;\n", ...@@ -1811,7 +1893,7 @@ struct sockaddr;\n",
* *
* Description of Irix_Struct__File fix * Description of Irix_Struct__File fix
*/ */
#define IRIX_STRUCT__FILE_FIXIDX 45 #define IRIX_STRUCT__FILE_FIXIDX 46
tSCC zIrix_Struct__FileName[] = tSCC zIrix_Struct__FileName[] =
"Irix_Struct__File"; "Irix_Struct__File";
/* /*
...@@ -1839,7 +1921,7 @@ struct __file_s;\n", ...@@ -1839,7 +1921,7 @@ struct __file_s;\n",
* *
* Description of Irix_Asm_Apostrophe fix * Description of Irix_Asm_Apostrophe fix
*/ */
#define IRIX_ASM_APOSTROPHE_FIXIDX 46 #define IRIX_ASM_APOSTROPHE_FIXIDX 47
tSCC zIrix_Asm_ApostropheName[] = tSCC zIrix_Asm_ApostropheName[] =
"Irix_Asm_Apostrophe"; "Irix_Asm_Apostrophe";
/* /*
...@@ -1874,7 +1956,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed", ...@@ -1874,7 +1956,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed",
* *
* Description of Isc_Fmod fix * Description of Isc_Fmod fix
*/ */
#define ISC_FMOD_FIXIDX 47 #define ISC_FMOD_FIXIDX 48
tSCC zIsc_FmodName[] = tSCC zIsc_FmodName[] =
"Isc_Fmod"; "Isc_Fmod";
/* /*
...@@ -1909,7 +1991,7 @@ const char* apzIsc_FmodPatch[] = { "sed", ...@@ -1909,7 +1991,7 @@ const char* apzIsc_FmodPatch[] = { "sed",
* *
* Description of Motorola_Nested fix * Description of Motorola_Nested fix
*/ */
#define MOTOROLA_NESTED_FIXIDX 48 #define MOTOROLA_NESTED_FIXIDX 49
tSCC zMotorola_NestedName[] = tSCC zMotorola_NestedName[] =
"Motorola_Nested"; "Motorola_Nested";
/* /*
...@@ -1939,7 +2021,7 @@ const char* apzMotorola_NestedPatch[] = { "sed", ...@@ -1939,7 +2021,7 @@ const char* apzMotorola_NestedPatch[] = { "sed",
* *
* Description of Isc_Sys_Limits fix * Description of Isc_Sys_Limits fix
*/ */
#define ISC_SYS_LIMITS_FIXIDX 49 #define ISC_SYS_LIMITS_FIXIDX 50
tSCC zIsc_Sys_LimitsName[] = tSCC zIsc_Sys_LimitsName[] =
"Isc_Sys_Limits"; "Isc_Sys_Limits";
/* /*
...@@ -1975,7 +2057,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed", ...@@ -1975,7 +2057,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed",
* *
* Description of Kandr_Concat fix * Description of Kandr_Concat fix
*/ */
#define KANDR_CONCAT_FIXIDX 50 #define KANDR_CONCAT_FIXIDX 51
tSCC zKandr_ConcatName[] = tSCC zKandr_ConcatName[] =
"Kandr_Concat"; "Kandr_Concat";
/* /*
...@@ -2010,7 +2092,7 @@ const char* apzKandr_ConcatPatch[] = { "sed", ...@@ -2010,7 +2092,7 @@ const char* apzKandr_ConcatPatch[] = { "sed",
* *
* Description of Limits_Ifndefs fix * Description of Limits_Ifndefs fix
*/ */
#define LIMITS_IFNDEFS_FIXIDX 51 #define LIMITS_IFNDEFS_FIXIDX 52
tSCC zLimits_IfndefsName[] = tSCC zLimits_IfndefsName[] =
"Limits_Ifndefs"; "Limits_Ifndefs";
/* /*
...@@ -2069,7 +2151,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed", ...@@ -2069,7 +2151,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed",
* *
* Description of Lynx_Void_Int fix * Description of Lynx_Void_Int fix
*/ */
#define LYNX_VOID_INT_FIXIDX 52 #define LYNX_VOID_INT_FIXIDX 53
tSCC zLynx_Void_IntName[] = tSCC zLynx_Void_IntName[] =
"Lynx_Void_Int"; "Lynx_Void_Int";
/* /*
...@@ -2104,7 +2186,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed", ...@@ -2104,7 +2186,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed",
* *
* Description of Lynxos_Fcntl_Proto fix * Description of Lynxos_Fcntl_Proto fix
*/ */
#define LYNXOS_FCNTL_PROTO_FIXIDX 53 #define LYNXOS_FCNTL_PROTO_FIXIDX 54
tSCC zLynxos_Fcntl_ProtoName[] = tSCC zLynxos_Fcntl_ProtoName[] =
"Lynxos_Fcntl_Proto"; "Lynxos_Fcntl_Proto";
/* /*
...@@ -2139,7 +2221,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed", ...@@ -2139,7 +2221,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 54 #define M88K_BAD_HYPOT_OPT_FIXIDX 55
tSCC zM88k_Bad_Hypot_OptName[] = tSCC zM88k_Bad_Hypot_OptName[] =
"M88k_Bad_Hypot_Opt"; "M88k_Bad_Hypot_Opt";
/* /*
...@@ -2181,7 +2263,7 @@ static __inline__ double fake_hypot (x, y)\\\n\ ...@@ -2181,7 +2263,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 55 #define M88K_BAD_S_IF_FIXIDX 56
tSCC zM88k_Bad_S_IfName[] = tSCC zM88k_Bad_S_IfName[] =
"M88k_Bad_S_If"; "M88k_Bad_S_If";
/* /*
...@@ -2219,7 +2301,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed", ...@@ -2219,7 +2301,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 56 #define M88K_MULTI_INCL_FIXIDX 57
tSCC zM88k_Multi_InclName[] = tSCC zM88k_Multi_InclName[] =
"M88k_Multi_Incl"; "M88k_Multi_Incl";
/* /*
...@@ -2261,7 +2343,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c", ...@@ -2261,7 +2343,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
* *
* Description of Machine_Name fix * Description of Machine_Name fix
*/ */
#define MACHINE_NAME_FIXIDX 57 #define MACHINE_NAME_FIXIDX 58
tSCC zMachine_NameName[] = tSCC zMachine_NameName[] =
"Machine_Name"; "Machine_Name";
/* /*
...@@ -2331,7 +2413,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\ ...@@ -2331,7 +2413,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\
* *
* Description of Math_Exception fix * Description of Math_Exception fix
*/ */
#define MATH_EXCEPTION_FIXIDX 58 #define MATH_EXCEPTION_FIXIDX 59
tSCC zMath_ExceptionName[] = tSCC zMath_ExceptionName[] =
"Math_Exception"; "Math_Exception";
/* /*
...@@ -2350,9 +2432,16 @@ tSCC zMath_ExceptionList[] = ...@@ -2350,9 +2432,16 @@ tSCC zMath_ExceptionList[] =
tSCC zMath_ExceptionSelect0[] = tSCC zMath_ExceptionSelect0[] =
"struct exception"; "struct exception";
#define MATH_EXCEPTION_TEST_CT 1 /*
#define MATH_EXCEPTION_RE_CT 1 * content bypass pattern - skip fix if pattern found
*/
tSCC zMath_ExceptionBypass0[] =
"We have a problem when using C++";
#define MATH_EXCEPTION_TEST_CT 2
#define MATH_EXCEPTION_RE_CT 2
tTestDesc aMath_ExceptionTests[] = { tTestDesc aMath_ExceptionTests[] = {
{ TT_NEGREP, zMath_ExceptionBypass0, (regex_t*)NULL },
{ TT_EGREP, zMath_ExceptionSelect0, (regex_t*)NULL }, }; { TT_EGREP, zMath_ExceptionSelect0, (regex_t*)NULL }, };
/* /*
...@@ -2367,60 +2456,98 @@ const char* apzMath_ExceptionPatch[] = { "sed", ...@@ -2367,60 +2456,98 @@ const char* apzMath_ExceptionPatch[] = { "sed",
#ifdef __cplusplus\\\n\ #ifdef __cplusplus\\\n\
#undef exception\\\n\ #undef exception\\\n\
#endif\n", #endif\n",
"-e", "/matherr/i\\\n\
#ifdef __cplusplus\\\n\
#define exception __math_exception\\\n\
#endif\n",
"-e", "/matherr/a\\\n\
#ifdef __cplusplus\\\n\
#undef exception\\\n\
#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Math_Gcc_Ifndefs fix * Description of Math_Huge_Val_From_Dbl_Max fix
*/ */
#define MATH_GCC_IFNDEFS_FIXIDX 59 #define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 60
tSCC zMath_Gcc_IfndefsName[] = tSCC zMath_Huge_Val_From_Dbl_MaxName[] =
"Math_Gcc_Ifndefs"; "Math_Huge_Val_From_Dbl_Max";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zMath_Gcc_IfndefsList[] = tSCC zMath_Huge_Val_From_Dbl_MaxList[] =
"|math.h|"; "|math.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzMath_Gcc_IfndefsMachs (const char**)NULL #define apzMath_Huge_Val_From_Dbl_MaxMachs (const char**)NULL
#define MATH_GCC_IFNDEFS_TEST_CT 0
#define MATH_GCC_IFNDEFS_RE_CT 0 /*
#define aMath_Gcc_IfndefsTests (tTestDesc*)NULL * content selection pattern - do fix if pattern found
*/
tSCC zMath_Huge_Val_From_Dbl_MaxSelect0[] =
"define[ \t]*HUGE_VAL[ \t]*DBL_MAX";
/* /*
* Fix Command Arguments for Math_Gcc_Ifndefs * content bypass pattern - skip fix if pattern found
*/ */
const char* apzMath_Gcc_IfndefsPatch[] = { "sh", "-c", tSCC zMath_Huge_Val_From_Dbl_MaxBypass0[] =
"define[ \t]*DBL_MAX";
#define MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT 2
#define MATH_HUGE_VAL_FROM_DBL_MAX_RE_CT 2
tTestDesc aMath_Huge_Val_From_Dbl_MaxTests[] = {
{ TT_NEGREP, zMath_Huge_Val_From_Dbl_MaxBypass0, (regex_t*)NULL },
{ TT_EGREP, zMath_Huge_Val_From_Dbl_MaxSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Math_Huge_Val_From_Dbl_Max
*/
const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c",
"\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h 2>/dev/null`\n\ "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h 2>/dev/null`\n\
\n\ \n\
\tif ( test -n \"${dbl_max_def}\" \\\n\ \tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n\
\t\t-a -n \"`egrep '#define[ \t]*HUGE_VAL[ \t]+DBL_MAX' $file`\" \\\n\ \tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/s/DBL_MAX/'\"$dbl_max_def/\"\n\
\t\t-a -z \"`egrep '#define[ \t]+DBL_MAX[ \t]+' $file`\"\n\ \telse cat\n\
\t ) > /dev/null 2>&1\n\ \tfi",
\tthen sed -e '/define[ \t]HUGE_VAL[ \t]DBL_MAX/s/DBL_MAX/$dbl_max_def/'\n\ (char*)NULL };
\telse cat ; fi |\n\
\tsed -e '/define[ \t]HUGE_VAL[ \t]/i\\\n\ /* * * * * * * * * * * * * * * * * * * * * * * * * *
#ifndef HUGE_VAL\n\ *
' -e '/define[ \t]HUGE_VAL[ \t]/a\\\n\ * Description of Math_Huge_Val_Ifndef fix
#endif\n\ */
'", #define MATH_HUGE_VAL_IFNDEF_FIXIDX 61
tSCC zMath_Huge_Val_IfndefName[] =
"Math_Huge_Val_Ifndef";
/*
* File name selection pattern
*/
tSCC zMath_Huge_Val_IfndefList[] =
"|math/math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzMath_Huge_Val_IfndefMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zMath_Huge_Val_IfndefSelect0[] =
"define[ \t]*HUGE_VAL";
#define MATH_HUGE_VAL_IFNDEF_TEST_CT 1
#define MATH_HUGE_VAL_IFNDEF_RE_CT 1
tTestDesc aMath_Huge_Val_IfndefTests[] = {
{ TT_EGREP, zMath_Huge_Val_IfndefSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Math_Huge_Val_Ifndef
*/
const char* apzMath_Huge_Val_IfndefPatch[] = { "sed",
"-e", "/define[ \t]HUGE_VAL[ \t]/i\\\n\
#ifndef HUGE_VAL\n",
"-e", "/define[ \t]HUGE_VAL[ \t]/a\\\n\
#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Nested_Comment fix * Description of Nested_Comment fix
*/ */
#define NESTED_COMMENT_FIXIDX 60 #define NESTED_COMMENT_FIXIDX 62
tSCC zNested_CommentName[] = tSCC zNested_CommentName[] =
"Nested_Comment"; "Nested_Comment";
/* /*
...@@ -2447,7 +2574,7 @@ const char* apzNested_CommentPatch[] = { "sed", ...@@ -2447,7 +2574,7 @@ const char* apzNested_CommentPatch[] = { "sed",
* *
* Description of News_Os_Recursion fix * Description of News_Os_Recursion fix
*/ */
#define NEWS_OS_RECURSION_FIXIDX 61 #define NEWS_OS_RECURSION_FIXIDX 63
tSCC zNews_Os_RecursionName[] = tSCC zNews_Os_RecursionName[] =
"News_Os_Recursion"; "News_Os_Recursion";
/* /*
...@@ -2485,7 +2612,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed", ...@@ -2485,7 +2612,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed",
* *
* Description of Next_Math_Prefix fix * Description of Next_Math_Prefix fix
*/ */
#define NEXT_MATH_PREFIX_FIXIDX 62 #define NEXT_MATH_PREFIX_FIXIDX 64
tSCC zNext_Math_PrefixName[] = tSCC zNext_Math_PrefixName[] =
"Next_Math_Prefix"; "Next_Math_Prefix";
/* /*
...@@ -2524,7 +2651,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed", ...@@ -2524,7 +2651,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed",
* *
* Description of Next_Template fix * Description of Next_Template fix
*/ */
#define NEXT_TEMPLATE_FIXIDX 63 #define NEXT_TEMPLATE_FIXIDX 65
tSCC zNext_TemplateName[] = tSCC zNext_TemplateName[] =
"Next_Template"; "Next_Template";
/* /*
...@@ -2560,7 +2687,7 @@ const char* apzNext_TemplatePatch[] = { "sed", ...@@ -2560,7 +2687,7 @@ const char* apzNext_TemplatePatch[] = { "sed",
* *
* Description of Next_Volitile fix * Description of Next_Volitile fix
*/ */
#define NEXT_VOLITILE_FIXIDX 64 #define NEXT_VOLITILE_FIXIDX 66
tSCC zNext_VolitileName[] = tSCC zNext_VolitileName[] =
"Next_Volitile"; "Next_Volitile";
/* /*
...@@ -2596,7 +2723,7 @@ const char* apzNext_VolitilePatch[] = { "sed", ...@@ -2596,7 +2723,7 @@ const char* apzNext_VolitilePatch[] = { "sed",
* *
* Description of Next_Wait_Union fix * Description of Next_Wait_Union fix
*/ */
#define NEXT_WAIT_UNION_FIXIDX 65 #define NEXT_WAIT_UNION_FIXIDX 67
tSCC zNext_Wait_UnionName[] = tSCC zNext_Wait_UnionName[] =
"Next_Wait_Union"; "Next_Wait_Union";
/* /*
...@@ -2631,7 +2758,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed", ...@@ -2631,7 +2758,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed",
* *
* Description of Nodeent_Syntax fix * Description of Nodeent_Syntax fix
*/ */
#define NODEENT_SYNTAX_FIXIDX 66 #define NODEENT_SYNTAX_FIXIDX 68
tSCC zNodeent_SyntaxName[] = tSCC zNodeent_SyntaxName[] =
"Nodeent_Syntax"; "Nodeent_Syntax";
/* /*
...@@ -2658,7 +2785,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed", ...@@ -2658,7 +2785,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed",
* *
* Description of Osf_Namespace_A fix * Description of Osf_Namespace_A fix
*/ */
#define OSF_NAMESPACE_A_FIXIDX 67 #define OSF_NAMESPACE_A_FIXIDX 69
tSCC zOsf_Namespace_AName[] = tSCC zOsf_Namespace_AName[] =
"Osf_Namespace_A"; "Osf_Namespace_A";
/* /*
...@@ -2704,7 +2831,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed", ...@@ -2704,7 +2831,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed",
* *
* Description of Osf_Namespace_B fix * Description of Osf_Namespace_B fix
*/ */
#define OSF_NAMESPACE_B_FIXIDX 68 #define OSF_NAMESPACE_B_FIXIDX 70
tSCC zOsf_Namespace_BName[] = tSCC zOsf_Namespace_BName[] =
"Osf_Namespace_B"; "Osf_Namespace_B";
/* /*
...@@ -2751,7 +2878,7 @@ typedef __regmatch_t\tregmatch_t;\n", ...@@ -2751,7 +2878,7 @@ typedef __regmatch_t\tregmatch_t;\n",
* *
* Description of Pthread_Page_Size fix * Description of Pthread_Page_Size fix
*/ */
#define PTHREAD_PAGE_SIZE_FIXIDX 69 #define PTHREAD_PAGE_SIZE_FIXIDX 71
tSCC zPthread_Page_SizeName[] = tSCC zPthread_Page_SizeName[] =
"Pthread_Page_Size"; "Pthread_Page_Size";
/* /*
...@@ -2786,7 +2913,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed", ...@@ -2786,7 +2913,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed",
* *
* Description of Read_Ret_Type fix * Description of Read_Ret_Type fix
*/ */
#define READ_RET_TYPE_FIXIDX 70 #define READ_RET_TYPE_FIXIDX 72
tSCC zRead_Ret_TypeName[] = tSCC zRead_Ret_TypeName[] =
"Read_Ret_Type"; "Read_Ret_Type";
/* /*
...@@ -2822,7 +2949,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed", ...@@ -2822,7 +2949,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed",
* *
* Description of Rs6000_Double fix * Description of Rs6000_Double fix
*/ */
#define RS6000_DOUBLE_FIXIDX 71 #define RS6000_DOUBLE_FIXIDX 73
tSCC zRs6000_DoubleName[] = tSCC zRs6000_DoubleName[] =
"Rs6000_Double"; "Rs6000_Double";
/* /*
...@@ -2860,7 +2987,7 @@ const char* apzRs6000_DoublePatch[] = { "sed", ...@@ -2860,7 +2987,7 @@ const char* apzRs6000_DoublePatch[] = { "sed",
* *
* Description of Rs6000_Fchmod fix * Description of Rs6000_Fchmod fix
*/ */
#define RS6000_FCHMOD_FIXIDX 72 #define RS6000_FCHMOD_FIXIDX 74
tSCC zRs6000_FchmodName[] = tSCC zRs6000_FchmodName[] =
"Rs6000_Fchmod"; "Rs6000_Fchmod";
/* /*
...@@ -2895,7 +3022,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed", ...@@ -2895,7 +3022,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed",
* *
* Description of Rs6000_Param fix * Description of Rs6000_Param fix
*/ */
#define RS6000_PARAM_FIXIDX 73 #define RS6000_PARAM_FIXIDX 75
tSCC zRs6000_ParamName[] = tSCC zRs6000_ParamName[] =
"Rs6000_Param"; "Rs6000_Param";
/* /*
...@@ -2907,9 +3034,17 @@ tSCC zRs6000_ParamList[] = ...@@ -2907,9 +3034,17 @@ tSCC zRs6000_ParamList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzRs6000_ParamMachs (const char**)NULL #define apzRs6000_ParamMachs (const char**)NULL
#define RS6000_PARAM_TEST_CT 0
#define RS6000_PARAM_RE_CT 0 /*
#define aRs6000_ParamTests (tTestDesc*)NULL * content selection pattern - do fix if pattern found
*/
tSCC zRs6000_ParamSelect0[] =
"const char new";
#define RS6000_PARAM_TEST_CT 1
#define RS6000_PARAM_RE_CT 1
tTestDesc aRs6000_ParamTests[] = {
{ TT_EGREP, zRs6000_ParamSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Rs6000_Param * Fix Command Arguments for Rs6000_Param
...@@ -2922,7 +3057,7 @@ const char* apzRs6000_ParamPatch[] = { "sed", ...@@ -2922,7 +3057,7 @@ const char* apzRs6000_ParamPatch[] = { "sed",
* *
* Description of Sony_Include fix * Description of Sony_Include fix
*/ */
#define SONY_INCLUDE_FIXIDX 74 #define SONY_INCLUDE_FIXIDX 76
tSCC zSony_IncludeName[] = tSCC zSony_IncludeName[] =
"Sony_Include"; "Sony_Include";
/* /*
...@@ -2957,7 +3092,7 @@ const char* apzSony_IncludePatch[] = { "sed", ...@@ -2957,7 +3092,7 @@ const char* apzSony_IncludePatch[] = { "sed",
* *
* Description of Statsswtch fix * Description of Statsswtch fix
*/ */
#define STATSSWTCH_FIXIDX 75 #define STATSSWTCH_FIXIDX 77
tSCC zStatsswtchName[] = tSCC zStatsswtchName[] =
"Statsswtch"; "Statsswtch";
/* /*
...@@ -2992,7 +3127,7 @@ const char* apzStatsswtchPatch[] = { "sed", ...@@ -2992,7 +3127,7 @@ const char* apzStatsswtchPatch[] = { "sed",
* *
* Description of Stdio_Va_List fix * Description of Stdio_Va_List fix
*/ */
#define STDIO_VA_LIST_FIXIDX 76 #define STDIO_VA_LIST_FIXIDX 78
tSCC zStdio_Va_ListName[] = tSCC zStdio_Va_ListName[] =
"Stdio_Va_List"; "Stdio_Va_List";
/* /*
...@@ -3004,9 +3139,17 @@ tSCC zStdio_Va_ListList[] = ...@@ -3004,9 +3139,17 @@ tSCC zStdio_Va_ListList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzStdio_Va_ListMachs (const char**)NULL #define apzStdio_Va_ListMachs (const char**)NULL
#define STDIO_VA_LIST_TEST_CT 0
#define STDIO_VA_LIST_RE_CT 0 /*
#define aStdio_Va_ListTests (tTestDesc*)NULL * content bypass pattern - skip fix if pattern found
*/
tSCC zStdio_Va_ListBypass0[] =
"__gnuc_va_list";
#define STDIO_VA_LIST_TEST_CT 1
#define STDIO_VA_LIST_RE_CT 1
tTestDesc aStdio_Va_ListTests[] = {
{ TT_NEGREP, zStdio_Va_ListBypass0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Stdio_Va_List * Fix Command Arguments for Stdio_Va_List
...@@ -3036,7 +3179,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c", ...@@ -3036,7 +3179,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 77 #define SUN_BOGUS_IFDEF_FIXIDX 79
tSCC zSun_Bogus_IfdefName[] = tSCC zSun_Bogus_IfdefName[] =
"Sun_Bogus_Ifdef"; "Sun_Bogus_Ifdef";
/* /*
...@@ -3071,7 +3214,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed", ...@@ -3071,7 +3214,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 78 #define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 80
tSCC zSun_Bogus_Ifdef_Sun4cName[] = tSCC zSun_Bogus_Ifdef_Sun4cName[] =
"Sun_Bogus_Ifdef_Sun4c"; "Sun_Bogus_Ifdef_Sun4c";
/* /*
...@@ -3106,7 +3249,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed", ...@@ -3106,7 +3249,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
* *
* Description of Sun_Catmacro fix * Description of Sun_Catmacro fix
*/ */
#define SUN_CATMACRO_FIXIDX 79 #define SUN_CATMACRO_FIXIDX 81
tSCC zSun_CatmacroName[] = tSCC zSun_CatmacroName[] =
"Sun_Catmacro"; "Sun_Catmacro";
/* /*
...@@ -3146,7 +3289,7 @@ const char* apzSun_CatmacroPatch[] = { "sed", ...@@ -3146,7 +3289,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
* *
* Description of Sun_Malloc fix * Description of Sun_Malloc fix
*/ */
#define SUN_MALLOC_FIXIDX 80 #define SUN_MALLOC_FIXIDX 82
tSCC zSun_MallocName[] = tSCC zSun_MallocName[] =
"Sun_Malloc"; "Sun_Malloc";
/* /*
...@@ -3176,7 +3319,7 @@ const char* apzSun_MallocPatch[] = { "sed", ...@@ -3176,7 +3319,7 @@ const char* apzSun_MallocPatch[] = { "sed",
* *
* Description of Sun_Memcpy fix * Description of Sun_Memcpy fix
*/ */
#define SUN_MEMCPY_FIXIDX 81 #define SUN_MEMCPY_FIXIDX 83
tSCC zSun_MemcpyName[] = tSCC zSun_MemcpyName[] =
"Sun_Memcpy"; "Sun_Memcpy";
/* /*
...@@ -3231,7 +3374,7 @@ extern int memcmp();\\\n\ ...@@ -3231,7 +3374,7 @@ extern int memcmp();\\\n\
* *
* Description of Sun_Rusers_Semi fix * Description of Sun_Rusers_Semi fix
*/ */
#define SUN_RUSERS_SEMI_FIXIDX 82 #define SUN_RUSERS_SEMI_FIXIDX 84
tSCC zSun_Rusers_SemiName[] = tSCC zSun_Rusers_SemiName[] =
"Sun_Rusers_Semi"; "Sun_Rusers_Semi";
/* /*
...@@ -3266,7 +3409,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed", ...@@ -3266,7 +3409,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
* *
* Description of Sun_Signal fix * Description of Sun_Signal fix
*/ */
#define SUN_SIGNAL_FIXIDX 83 #define SUN_SIGNAL_FIXIDX 85
tSCC zSun_SignalName[] = tSCC zSun_SignalName[] =
"Sun_Signal"; "Sun_Signal";
/* /*
...@@ -3306,7 +3449,7 @@ void\t(*signal(...))(...);\\\n\ ...@@ -3306,7 +3449,7 @@ void\t(*signal(...))(...);\\\n\
* *
* Description of Sun_Auth_Proto fix * Description of Sun_Auth_Proto fix
*/ */
#define SUN_AUTH_PROTO_FIXIDX 84 #define SUN_AUTH_PROTO_FIXIDX 86
tSCC zSun_Auth_ProtoName[] = tSCC zSun_Auth_ProtoName[] =
"Sun_Auth_Proto"; "Sun_Auth_Proto";
/* /*
...@@ -3346,7 +3489,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed", ...@@ -3346,7 +3489,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed",
* *
* Description of Sunos_Matherr_Decl fix * Description of Sunos_Matherr_Decl fix
*/ */
#define SUNOS_MATHERR_DECL_FIXIDX 85 #define SUNOS_MATHERR_DECL_FIXIDX 87
tSCC zSunos_Matherr_DeclName[] = tSCC zSunos_Matherr_DeclName[] =
"Sunos_Matherr_Decl"; "Sunos_Matherr_Decl";
/* /*
...@@ -3358,9 +3501,17 @@ tSCC zSunos_Matherr_DeclList[] = ...@@ -3358,9 +3501,17 @@ tSCC zSunos_Matherr_DeclList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzSunos_Matherr_DeclMachs (const char**)NULL #define apzSunos_Matherr_DeclMachs (const char**)NULL
#define SUNOS_MATHERR_DECL_TEST_CT 0
#define SUNOS_MATHERR_DECL_RE_CT 0 /*
#define aSunos_Matherr_DeclTests (tTestDesc*)NULL * content bypass pattern - skip fix if pattern found
*/
tSCC zSunos_Matherr_DeclBypass0[] =
"matherr.*struct exception";
#define SUNOS_MATHERR_DECL_TEST_CT 1
#define SUNOS_MATHERR_DECL_RE_CT 1
tTestDesc aSunos_Matherr_DeclTests[] = {
{ TT_NEGREP, zSunos_Matherr_DeclBypass0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Sunos_Matherr_Decl * Fix Command Arguments for Sunos_Matherr_Decl
...@@ -3375,7 +3526,7 @@ struct exception;\n", ...@@ -3375,7 +3526,7 @@ struct exception;\n",
* *
* Description of Sunos_Strlen fix * Description of Sunos_Strlen fix
*/ */
#define SUNOS_STRLEN_FIXIDX 86 #define SUNOS_STRLEN_FIXIDX 88
tSCC zSunos_StrlenName[] = tSCC zSunos_StrlenName[] =
"Sunos_Strlen"; "Sunos_Strlen";
/* /*
...@@ -3387,9 +3538,17 @@ tSCC zSunos_StrlenList[] = ...@@ -3387,9 +3538,17 @@ tSCC zSunos_StrlenList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzSunos_StrlenMachs (const char**)NULL #define apzSunos_StrlenMachs (const char**)NULL
#define SUNOS_STRLEN_TEST_CT 0
#define SUNOS_STRLEN_RE_CT 0 /*
#define aSunos_StrlenTests (tTestDesc*)NULL * content selection pattern - do fix if pattern found
*/
tSCC zSunos_StrlenSelect0[] =
"int[ \t]*strlen";
#define SUNOS_STRLEN_TEST_CT 1
#define SUNOS_STRLEN_RE_CT 1
tTestDesc aSunos_StrlenTests[] = {
{ TT_EGREP, zSunos_StrlenSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Sunos_Strlen * Fix Command Arguments for Sunos_Strlen
...@@ -3402,7 +3561,7 @@ const char* apzSunos_StrlenPatch[] = { "sed", ...@@ -3402,7 +3561,7 @@ const char* apzSunos_StrlenPatch[] = { "sed",
* *
* Description of Systypes fix * Description of Systypes fix
*/ */
#define SYSTYPES_FIXIDX 87 #define SYSTYPES_FIXIDX 89
tSCC zSystypesName[] = tSCC zSystypesName[] =
"Systypes"; "Systypes";
/* /*
...@@ -3461,7 +3620,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\ ...@@ -3461,7 +3620,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
* *
* Description of Systypes_For_Aix fix * Description of Systypes_For_Aix fix
*/ */
#define SYSTYPES_FOR_AIX_FIXIDX 88 #define SYSTYPES_FOR_AIX_FIXIDX 90
tSCC zSystypes_For_AixName[] = tSCC zSystypes_For_AixName[] =
"Systypes_For_Aix"; "Systypes_For_Aix";
/* /*
...@@ -3507,7 +3666,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed", ...@@ -3507,7 +3666,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed",
* *
* Description of Sysv68_String fix * Description of Sysv68_String fix
*/ */
#define SYSV68_STRING_FIXIDX 89 #define SYSV68_STRING_FIXIDX 91
tSCC zSysv68_StringName[] = tSCC zSysv68_StringName[] =
"Sysv68_String"; "Sysv68_String";
/* /*
...@@ -3544,7 +3703,7 @@ extern unsigned int\\\n\ ...@@ -3544,7 +3703,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 90 #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";
/* /*
...@@ -3582,7 +3741,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed", ...@@ -3582,7 +3741,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 91 #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";
/* /*
...@@ -3623,7 +3782,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed", ...@@ -3623,7 +3782,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
* *
* Description of Tinfo_Cplusplus fix * Description of Tinfo_Cplusplus fix
*/ */
#define TINFO_CPLUSPLUS_FIXIDX 92 #define TINFO_CPLUSPLUS_FIXIDX 94
tSCC zTinfo_CplusplusName[] = tSCC zTinfo_CplusplusName[] =
"Tinfo_Cplusplus"; "Tinfo_Cplusplus";
/* /*
...@@ -3635,9 +3794,17 @@ tSCC zTinfo_CplusplusList[] = ...@@ -3635,9 +3794,17 @@ tSCC zTinfo_CplusplusList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzTinfo_CplusplusMachs (const char**)NULL #define apzTinfo_CplusplusMachs (const char**)NULL
#define TINFO_CPLUSPLUS_TEST_CT 0
#define TINFO_CPLUSPLUS_RE_CT 0 /*
#define aTinfo_CplusplusTests (tTestDesc*)NULL * content selection pattern - do fix if pattern found
*/
tSCC zTinfo_CplusplusSelect0[] =
"[ \t]_cplusplus";
#define TINFO_CPLUSPLUS_TEST_CT 1
#define TINFO_CPLUSPLUS_RE_CT 1
tTestDesc aTinfo_CplusplusTests[] = {
{ TT_EGREP, zTinfo_CplusplusSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Tinfo_Cplusplus * Fix Command Arguments for Tinfo_Cplusplus
...@@ -3650,7 +3817,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed", ...@@ -3650,7 +3817,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
* *
* Description of Ultrix_Ansi_Compat fix * Description of Ultrix_Ansi_Compat fix
*/ */
#define ULTRIX_ANSI_COMPAT_FIXIDX 93 #define ULTRIX_ANSI_COMPAT_FIXIDX 95
tSCC zUltrix_Ansi_CompatName[] = tSCC zUltrix_Ansi_CompatName[] =
"Ultrix_Ansi_Compat"; "Ultrix_Ansi_Compat";
/* /*
...@@ -3687,7 +3854,7 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed", ...@@ -3687,7 +3854,7 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed",
* *
* Description of Ultrix_Fix_Fixproto fix * Description of Ultrix_Fix_Fixproto fix
*/ */
#define ULTRIX_FIX_FIXPROTO_FIXIDX 94 #define ULTRIX_FIX_FIXPROTO_FIXIDX 96
tSCC zUltrix_Fix_FixprotoName[] = tSCC zUltrix_Fix_FixprotoName[] =
"Ultrix_Fix_Fixproto"; "Ultrix_Fix_Fixproto";
/* /*
...@@ -3723,7 +3890,7 @@ struct utsname;\n", ...@@ -3723,7 +3890,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 97
tSCC zUltrix_Atof_ParamName[] = tSCC zUltrix_Atof_ParamName[] =
"Ultrix_Atof_Param"; "Ultrix_Atof_Param";
/* /*
...@@ -3735,26 +3902,30 @@ tSCC zUltrix_Atof_ParamList[] = ...@@ -3735,26 +3902,30 @@ tSCC zUltrix_Atof_ParamList[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzUltrix_Atof_ParamMachs (const char**)NULL #define apzUltrix_Atof_ParamMachs (const char**)NULL
#define ULTRIX_ATOF_PARAM_TEST_CT 0
#define ULTRIX_ATOF_PARAM_RE_CT 0 /*
#define aUltrix_Atof_ParamTests (tTestDesc*)NULL * content selection pattern - do fix if pattern found
*/
tSCC zUltrix_Atof_ParamSelect0[] =
"atof\\([ \t]*char";
#define ULTRIX_ATOF_PARAM_TEST_CT 1
#define ULTRIX_ATOF_PARAM_RE_CT 1
tTestDesc aUltrix_Atof_ParamTests[] = {
{ TT_EGREP, zUltrix_Atof_ParamSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Ultrix_Atof_Param * Fix Command Arguments for Ultrix_Atof_Param
*/ */
const char* apzUltrix_Atof_ParamPatch[] = { "sed", const char* apzUltrix_Atof_ParamPatch[] = { "sed",
"-e", "s@atof(\\([ \t]*char[ \t]*\\*[^)]*\\))@atof(const \\1)@", "-e", "s@atof(\\([ \t]*char[ \t]*\\*[^)]*\\))@atof(const \\1)@",
"-e", "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@",
"-e", "s@inline double abs(double [a-z][a-z]*) {.*}@@",
"-e", "s@inline int sqr(int [a-z][a-z]*) {.*}@@",
"-e", "s@inline double sqr(double [a-z][a-z]*) {.*}@@",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ultrix_Const fix * Description of Ultrix_Const fix
*/ */
#define ULTRIX_CONST_FIXIDX 96 #define ULTRIX_CONST_FIXIDX 98
tSCC zUltrix_ConstName[] = tSCC zUltrix_ConstName[] =
"Ultrix_Const"; "Ultrix_Const";
/* /*
...@@ -3789,7 +3960,7 @@ const char* apzUltrix_ConstPatch[] = { "sed", ...@@ -3789,7 +3960,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 99
tSCC zUltrix_IfdefName[] = tSCC zUltrix_IfdefName[] =
"Ultrix_Ifdef"; "Ultrix_Ifdef";
/* /*
...@@ -3824,7 +3995,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed", ...@@ -3824,7 +3995,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 100
tSCC zUltrix_Nested_CmntName[] = tSCC zUltrix_Nested_CmntName[] =
"Ultrix_Nested_Cmnt"; "Ultrix_Nested_Cmnt";
/* /*
...@@ -3851,7 +4022,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed", ...@@ -3851,7 +4022,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 101
tSCC zUltrix_StaticName[] = tSCC zUltrix_StaticName[] =
"Ultrix_Static"; "Ultrix_Static";
/* /*
...@@ -3888,7 +4059,7 @@ const char* apzUltrix_StaticPatch[] = { "sed", ...@@ -3888,7 +4059,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 102
tSCC zUndefine_NullName[] = tSCC zUndefine_NullName[] =
"Undefine_Null"; "Undefine_Null";
/* /*
...@@ -3930,7 +4101,7 @@ const char* apzUndefine_NullPatch[] = { "sed", ...@@ -3930,7 +4101,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 103
tSCC zUnixware7_Byteorder_FixName[] = tSCC zUnixware7_Byteorder_FixName[] =
"Unixware7_Byteorder_Fix"; "Unixware7_Byteorder_Fix";
/* /*
...@@ -3973,7 +4144,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed", ...@@ -3973,7 +4144,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 104
tSCC zVa_I960_MacroName[] = tSCC zVa_I960_MacroName[] =
"Va_I960_Macro"; "Va_I960_Macro";
/* /*
...@@ -4011,7 +4182,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed", ...@@ -4011,7 +4182,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 105
tSCC zVoid_NullName[] = tSCC zVoid_NullName[] =
"Void_Null"; "Void_Null";
/* /*
...@@ -4046,7 +4217,7 @@ const char* apzVoid_NullPatch[] = { "sed", ...@@ -4046,7 +4217,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 106
tSCC zVxworks_Gcc_ProblemName[] = tSCC zVxworks_Gcc_ProblemName[] =
"Vxworks_Gcc_Problem"; "Vxworks_Gcc_Problem";
/* /*
...@@ -4096,7 +4267,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", ...@@ -4096,7 +4267,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 107
tSCC zVxworks_Needs_VxtypesName[] = tSCC zVxworks_Needs_VxtypesName[] =
"Vxworks_Needs_Vxtypes"; "Vxworks_Needs_Vxtypes";
/* /*
...@@ -4131,7 +4302,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed", ...@@ -4131,7 +4302,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 108
tSCC zVxworks_Needs_VxworksName[] = tSCC zVxworks_Needs_VxworksName[] =
"Vxworks_Needs_Vxworks"; "Vxworks_Needs_Vxworks";
/* /*
...@@ -4180,7 +4351,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed", ...@@ -4180,7 +4351,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 109
tSCC zVxworks_TimeName[] = tSCC zVxworks_TimeName[] =
"Vxworks_Time"; "Vxworks_Time";
/* /*
...@@ -4231,7 +4402,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\ ...@@ -4231,7 +4402,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 110
tSCC zX11_ClassName[] = tSCC zX11_ClassName[] =
"X11_Class"; "X11_Class";
/* /*
...@@ -4271,7 +4442,7 @@ const char* apzX11_ClassPatch[] = { "sed", ...@@ -4271,7 +4442,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 111
tSCC zX11_Class_UsageName[] = tSCC zX11_Class_UsageName[] =
"X11_Class_Usage"; "X11_Class_Usage";
/* /*
...@@ -4306,7 +4477,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed", ...@@ -4306,7 +4477,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 112
tSCC zX11_NewName[] = tSCC zX11_NewName[] =
"X11_New"; "X11_New";
/* /*
...@@ -4347,7 +4518,7 @@ const char* apzX11_NewPatch[] = { "sed", ...@@ -4347,7 +4518,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 113
tSCC zX11_SprintfName[] = tSCC zX11_SprintfName[] =
"X11_Sprintf"; "X11_Sprintf";
/* /*
...@@ -4376,9 +4547,9 @@ extern char *\tsprintf();\\\n\ ...@@ -4376,9 +4547,9 @@ extern char *\tsprintf();\\\n\
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 76 #define REGEX_COUNT 89
#define MACH_LIST_SIZE_LIMIT 279 #define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 112 #define FIX_COUNT 114
tFixDesc fixDescList[ FIX_COUNT ] = { tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList, { zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
...@@ -4416,20 +4587,20 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4416,20 +4587,20 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Dgux_Int_VarargsTests, apzAab_Dgux_Int_VarargsPatch }, aAab_Dgux_Int_VarargsTests, apzAab_Dgux_Int_VarargsPatch },
{ zAab_Fd_Zero_Glibc_1_0Name, zAab_Fd_Zero_Glibc_1_0List, { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList,
apzAab_Fd_Zero_Glibc_1_0Machs, (regex_t*)NULL, apzAab_Fd_Zero_Asm_Posix_Types_HMachs, (regex_t*)NULL,
AAB_FD_ZERO_GLIBC_1_0_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Fd_Zero_Glibc_1_0Tests, apzAab_Fd_Zero_Glibc_1_0Patch }, aAab_Fd_Zero_Asm_Posix_Types_HTests, apzAab_Fd_Zero_Asm_Posix_Types_HPatch },
{ zAab_Fd_Zero_Glibc_1_XName, zAab_Fd_Zero_Glibc_1_XList, { zAab_Fd_Zero_Gnu_Types_HName, zAab_Fd_Zero_Gnu_Types_HList,
apzAab_Fd_Zero_Glibc_1_XMachs, (regex_t*)NULL, apzAab_Fd_Zero_Gnu_Types_HMachs, (regex_t*)NULL,
AAB_FD_ZERO_GLIBC_1_X_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, AAB_FD_ZERO_GNU_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Fd_Zero_Glibc_1_XTests, apzAab_Fd_Zero_Glibc_1_XPatch }, aAab_Fd_Zero_Gnu_Types_HTests, apzAab_Fd_Zero_Gnu_Types_HPatch },
{ zAab_Fd_Zero_Glibc_2_0Name, zAab_Fd_Zero_Glibc_2_0List, { zAab_Fd_Zero_Selectbits_HName, zAab_Fd_Zero_Selectbits_HList,
apzAab_Fd_Zero_Glibc_2_0Machs, (regex_t*)NULL, apzAab_Fd_Zero_Selectbits_HMachs, (regex_t*)NULL,
AAB_FD_ZERO_GLIBC_2_0_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, AAB_FD_ZERO_SELECTBITS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Fd_Zero_Glibc_2_0Tests, apzAab_Fd_Zero_Glibc_2_0Patch }, aAab_Fd_Zero_Selectbits_HTests, apzAab_Fd_Zero_Selectbits_HPatch },
{ zAab_Svr4_Replace_ByteorderName, zAab_Svr4_Replace_ByteorderList, { zAab_Svr4_Replace_ByteorderName, zAab_Svr4_Replace_ByteorderList,
apzAab_Svr4_Replace_ByteorderMachs, (regex_t*)NULL, apzAab_Svr4_Replace_ByteorderMachs, (regex_t*)NULL,
...@@ -4561,6 +4732,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4561,6 +4732,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY, HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY,
aHpux_SystimeTests, apzHpux_SystimePatch }, aHpux_SystimeTests, apzHpux_SystimePatch },
{ zHpux8_Bogus_InlinesName, zHpux8_Bogus_InlinesList,
apzHpux8_Bogus_InlinesMachs, (regex_t*)NULL,
HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY,
aHpux8_Bogus_InlinesTests, apzHpux8_Bogus_InlinesPatch },
{ zHpux11_Uint32_CName, zHpux11_Uint32_CList, { zHpux11_Uint32_CName, zHpux11_Uint32_CList,
apzHpux11_Uint32_CMachs, (regex_t*)NULL, apzHpux11_Uint32_CMachs, (regex_t*)NULL,
HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY, HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY,
...@@ -4676,10 +4852,15 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4676,10 +4852,15 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
MATH_EXCEPTION_TEST_CT, FD_MACH_ONLY, MATH_EXCEPTION_TEST_CT, FD_MACH_ONLY,
aMath_ExceptionTests, apzMath_ExceptionPatch }, aMath_ExceptionTests, apzMath_ExceptionPatch },
{ zMath_Gcc_IfndefsName, zMath_Gcc_IfndefsList, { zMath_Huge_Val_From_Dbl_MaxName, zMath_Huge_Val_From_Dbl_MaxList,
apzMath_Gcc_IfndefsMachs, (regex_t*)NULL, apzMath_Huge_Val_From_Dbl_MaxMachs, (regex_t*)NULL,
MATH_GCC_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT, MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT,
aMath_Gcc_IfndefsTests, apzMath_Gcc_IfndefsPatch }, aMath_Huge_Val_From_Dbl_MaxTests, apzMath_Huge_Val_From_Dbl_MaxPatch },
{ zMath_Huge_Val_IfndefName, zMath_Huge_Val_IfndefList,
apzMath_Huge_Val_IfndefMachs, (regex_t*)NULL,
MATH_HUGE_VAL_IFNDEF_TEST_CT, FD_MACH_ONLY,
aMath_Huge_Val_IfndefTests, apzMath_Huge_Val_IfndefPatch },
{ zNested_CommentName, zNested_CommentList, { zNested_CommentName, zNested_CommentList,
apzNested_CommentMachs, (regex_t*)NULL, apzNested_CommentMachs, (regex_t*)NULL,
......
...@@ -106,8 +106,10 @@ skip_quote( q, text ) ...@@ -106,8 +106,10 @@ skip_quote( q, text )
return text; return text;
} }
static apply_fix_p_t
TEST_FOR_FIX_PROC_HEAD( double_slash_test ) is_cxx_header (fname, text)
const char *fname;
const char *text;
{ {
/* First, check to see if the file is in a C++ directory */ /* First, check to see if the file is in a C++ directory */
if (strstr( fname, "CC/" ) != NULL) if (strstr( fname, "CC/" ) != NULL)
...@@ -116,9 +118,19 @@ TEST_FOR_FIX_PROC_HEAD( double_slash_test ) ...@@ -116,9 +118,19 @@ TEST_FOR_FIX_PROC_HEAD( double_slash_test )
return SKIP_FIX; return SKIP_FIX;
if (strstr( fname, "++" ) != NULL) if (strstr( fname, "++" ) != NULL)
return SKIP_FIX; return SKIP_FIX;
/* Or it might contain the phrase 'extern "C++"' */
if (strstr( text, "extern \"C++\"" ) != NULL) if (strstr( text, "extern \"C++\"" ) != NULL)
return SKIP_FIX; return SKIP_FIX;
return APPLY_FIX;
}
TEST_FOR_FIX_PROC_HEAD( double_slash_test )
{
if (is_cxx_header (fname, text) == SKIP_FIX)
return SKIP_FIX;
/* Now look for the comment markers in the text */ /* Now look for the comment markers in the text */
for (;;) for (;;)
{ {
...@@ -167,6 +179,7 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test ) ...@@ -167,6 +179,7 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
char ch; char ch;
const char* pz_next = (char*)NULL; const char* pz_next = (char*)NULL;
regmatch_t match[2]; regmatch_t match[2];
const char *all_text = text;
/* /*
This routine may be run many times within a single execution. This routine may be run many times within a single execution.
...@@ -266,10 +279,15 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test ) ...@@ -266,10 +279,15 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
pz_next += 2; pz_next += 2;
break; break;
} }
else if (*pz_next == '/'
/* && is_cxx_header( fname, all_text ) == SKIP_FIX)
FIXME: if this is a C++ file, then a double slash comment {
is allowed to follow the directive. */ pz_next = strchr( pz_next+1, '\n' );
if (pz_next == (char*)NULL)
return SKIP_FIX;
pz_next++;
break;
}
/* FALLTHROUGH */ /* FALLTHROUGH */
......
...@@ -63,9 +63,9 @@ fi ...@@ -63,9 +63,9 @@ fi
set -e set -e
case "$1" in case "$1" in
inclhack.def ) inclhack.sh )
echo AutoGen-ing inclhack.sh echo AutoGen-ing inclhack.sh
$AG inclhack.sh $AG inclhack.def
;; ;;
fixincl.x ) fixincl.x )
......
...@@ -59,8 +59,8 @@ _FOR fix "\n\n" =] ...@@ -59,8 +59,8 @@ _FOR fix "\n\n" =]
_IF bypass _exist =] _IF bypass _exist =]
if ( test [= if ( test [=
_FOR bypass=] -a \ _FOR bypass " -a \\\n "
-z [=bypass _shrstr "#`egrep %s ${file}`" =]-z [=bypass _shrstr "#`egrep %s ${file}`"
_printf _shstr =][= _printf _shstr =][=
/bypass=] /bypass=]
) > /dev/null 2>&1 ; then[= ) > /dev/null 2>&1 ; then[=
......
...@@ -155,12 +155,13 @@ typedef char * va_list; ...@@ -155,12 +155,13 @@ typedef char * va_list;
/* /*
* This fixes __FD_ZERO bug for glibc-1.0.x * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
*/ */
fix = { fix = {
hackname = AAB_fd_zero_glibc_1_0; hackname = AAB_fd_zero_asm_posix_types_h;
files = asm/posix_types.h; files = asm/posix_types.h;
mach = 'i[34567]86-*-linux-gnu*'; mach = 'i[34567]86-*-linux-gnu*';
bypass = '} while';
/* /*
* Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not * Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
...@@ -170,20 +171,21 @@ fix = { ...@@ -170,20 +171,21 @@ fix = {
*/ */
replace = replace =
'/* This file fixes __FD_ZERO bug for glibc-1.x. */ '/* This file fixes a bug in the __FD_ZERO macro
for older versions of the Linux kernel. */
\#ifndef _POSIX_TYPES_H_WRAPPER \#ifndef _POSIX_TYPES_H_WRAPPER
\#include <features.h> \#include <features.h>
\#include_next <asm/posix_types.h> \#include_next <asm/posix_types.h>
\#if defined(__FD_ZERO) && !defined(__GLIBC__) \#if defined(__FD_ZERO) && !defined(__GLIBC__)
\#undef __FD_ZERO \#undef __FD_ZERO
\#define __FD_ZERO(fdsetp) \ \#define __FD_ZERO(fdsetp) \\
do { \ do { \\
int __d0, __d1; \ int __d0, __d1; \\
__asm__ __volatile__("cld ; rep ; stosl" \ __asm__ __volatile__("cld ; rep ; stosl" \\
: "=&c" (__d0), "=&D" (__d1) \ : "=&c" (__d0), "=&D" (__d1) \\
: "a" (0), "0" (__FDSET_LONGS), \ : "a" (0), "0" (__FDSET_LONGS), \\
"1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \ "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \\
} while (0) } while (0)
\#endif \#endif
...@@ -197,7 +199,7 @@ fix = { ...@@ -197,7 +199,7 @@ fix = {
* This fixes __FD_ZERO bug for glibc-1.x * This fixes __FD_ZERO bug for glibc-1.x
*/ */
fix = { fix = {
hackname = AAB_fd_zero_glibc_1_x; hackname = AAB_fd_zero_gnu_types_h;
files = gnu/types.h; files = gnu/types.h;
mach = 'i[34567]86-*-linux-gnu*'; mach = 'i[34567]86-*-linux-gnu*';
...@@ -209,20 +211,20 @@ fix = { ...@@ -209,20 +211,20 @@ fix = {
*/ */
replace = replace =
'/* This file fixes __FD_ZERO bug for glibc-1.x. */ '/* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */
\#ifndef _TYPES_H_WRAPPER \#ifndef _TYPES_H_WRAPPER
\#include <features.h> \#include <features.h>
\#include_next <gnu/types.h> \#include_next <gnu/types.h>
\#if defined(__FD_ZERO) && !defined(__GLIBC__) \#if defined(__FD_ZERO) && !defined(__GLIBC__)
\#undef __FD_ZERO \#undef __FD_ZERO
\# define __FD_ZERO(fdsetp) \ \# define __FD_ZERO(fdsetp) \\
do { \ do { \\
int __d0, __d1; \ int __d0, __d1; \\
__asm__ __volatile__("cld ; rep ; stosl" \ __asm__ __volatile__("cld ; rep ; stosl" \\
: "=&c" (__d0), "=&D" (__d1) \ : "=&c" (__d0), "=&D" (__d1) \\
: "a" (0), "0" (__FDSET_LONGS), \ : "a" (0), "0" (__FDSET_LONGS), \\
"1" ((__fd_set *) (fdsetp)) :"memory"); \ "1" ((__fd_set *) (fdsetp)) :"memory"); \\
} while (0) } while (0)
\#endif \#endif
...@@ -236,7 +238,7 @@ fix = { ...@@ -236,7 +238,7 @@ fix = {
* This fixes __FD_ZERO bug for glibc-2.0.x * This fixes __FD_ZERO bug for glibc-2.0.x
*/ */
fix = { fix = {
hackname = AAB_fd_zero_glibc_2_0; hackname = AAB_fd_zero_selectbits_h;
files = selectbits.h; files = selectbits.h;
mach = 'i[34567]86-*-linux-gnu*'; mach = 'i[34567]86-*-linux-gnu*';
...@@ -248,24 +250,24 @@ fix = { ...@@ -248,24 +250,24 @@ fix = {
*/ */
replace = replace =
'/* This file fixes __FD_ZERO bug for glibc-2.0.x. */ '/* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */
\#ifndef _SELECTBITS_H_WRAPPER \#ifndef _SELECTBITS_H_WRAPPER
\#include <features.h> \#include <features.h>
\#include_next <selectbits.h> \#include_next <selectbits.h>
\#if defined(__FD_ZERO) && defined(__GLIBC__) \ \#if defined(__FD_ZERO) && defined(__GLIBC__) \\
&& defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \ && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\
&& __GLIBC_MINOR__ == 0 && __GLIBC_MINOR__ == 0
\#undef __FD_ZERO \#undef __FD_ZERO
\#define __FD_ZERO(fdsetp) \ \#define __FD_ZERO(fdsetp) \\
do { \ do { \\
int __d0, __d1; \ int __d0, __d1; \\
__asm__ __volatile__ ("cld; rep; stosl" \ __asm__ __volatile__ ("cld; rep; stosl" \\
: "=&c" (__d0), "=&D" (__d1) \ : "=&c" (__d0), "=&D" (__d1) \\
: "a" (0), "0" (sizeof (__fd_set) \ : "a" (0), "0" (sizeof (__fd_set) \\
/ sizeof (__fd_mask)), \ / sizeof (__fd_mask)), \\
"1" ((__fd_mask *) (fdsetp)) \ "1" ((__fd_mask *) (fdsetp)) \\
: "memory"); \ : "memory"); \\
} while (0) } while (0)
\#endif \#endif
...@@ -357,8 +359,8 @@ htons (unsigned int __arg) ...@@ -357,8 +359,8 @@ htons (unsigned int __arg)
return __result; return __result;
} }
\#elif ((defined (__i860__) && !defined (__i860_big_endian__)) \ \#elif ((defined (__i860__) && !defined (__i860_big_endian__)) \\
|| defined (__ns32k__) || defined (__vax__) \ || defined (__ns32k__) || defined (__vax__) \\
|| defined (__spur__) || defined (__arm__)) || defined (__spur__) || defined (__arm__))
\#ifndef __BYTE_ORDER__ \#ifndef __BYTE_ORDER__
...@@ -853,6 +855,20 @@ fix = { ...@@ -853,6 +855,20 @@ fix = {
sed = "s/^extern struct sigevent;/struct sigevent;/"; sed = "s/^extern struct sigevent;/struct sigevent;/";
}; };
/*
* get rid of bogus inline definitions in HP-UX 8.0
*/
fix = {
hackname = hpux8_bogus_inlines;
files = math.h;
select = inline;
sed = "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@";
sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
};
/* /*
* In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition * In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition
* of UINT32_C has undefined behavior according to ISO/ANSI: * of UINT32_C has undefined behavior according to ISO/ANSI:
...@@ -980,6 +996,7 @@ fix = { ...@@ -980,6 +996,7 @@ fix = {
fix = { fix = {
hackname = ip_missing_semi; hackname = ip_missing_semi;
files = netinet/ip.h; files = netinet/ip.h;
select = "}$";
sed = "/^struct/,/^};/s/}$/};/"; sed = "/^struct/,/^};/s/}$/};/";
}; };
...@@ -1326,6 +1343,7 @@ fix = { ...@@ -1326,6 +1343,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++";
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"
...@@ -1335,6 +1353,7 @@ fix = { ...@@ -1335,6 +1353,7 @@ fix = {
"#undef exception\\\n" "#undef exception\\\n"
"#endif\n"; "#endif\n";
#ifdef MATH_EXCEPTION_FIXED
sed = "/matherr/i\\\n" sed = "/matherr/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#define exception __math_exception\\\n" "#define exception __math_exception\\\n"
...@@ -1345,14 +1364,21 @@ fix = { ...@@ -1345,14 +1364,21 @@ fix = {
"#undef exception\\\n" "#undef exception\\\n"
"#endif\n"; "#endif\n";
#ifdef MATH_EXCEPTION_FIXED
I think this patch needs some more thinking. I think this patch needs some more thinking.
This is from SVR4.2 (With '#' replaced with '@'). This is from SVR4.2 (With '#' replaced with '@').
Perhaps we could do without the "/matherr/a" entries? Perhaps we could do without the "/matherr/a" entries?
Can we bypass the entire fix if someone was astute Can we bypass the entire fix if someone was astute
enough to have '#ifdef __cplusplus' anywhere in the file? enough to have '#ifdef __cplusplus' anywhere in the file?
We can definitely do without the "/matherr/a" entries. They are
there to cover the case where matherr is declared with no prototype
-- extern int matherr(); -- but we don't need a fix then since there
is no reference to struct exception.
Bypassing on "#ifdef __cplusplus" is too optimistic, but I've stuck
in a bypass for the comment in the glibc 2.1 header that indicates
awareness of the problem. Hmm. Could we use a shell test that did
cpp -D__cplusplus | grep "struct exception" ?
*** /usr/include/math.h Fri Apr 3 18:54:59 1998 *** /usr/include/math.h Fri Apr 3 18:54:59 1998
--- math.h Sun May 9 07:28:58 1999 --- math.h Sun May 9 07:28:58 1999
...@@ -1396,46 +1422,43 @@ enough to have '#ifdef __cplusplus' anywhere in the file? ...@@ -1396,46 +1422,43 @@ enough to have '#ifdef __cplusplus' anywhere in the file?
#endif #endif
}; };
/*
* In math.h, put #ifndefs around things that might be defined
* in a gcc specific math-*.h file.
*/
fix = { fix = {
hackname = math_gcc_ifndefs; hackname = math_huge_val_from_dbl_max;
files = math.h; files = math.h;
shell =
/* /*
* First see if we have a definition for DBL_MAX in float.h * IF HUGE_VAL is defined to be DBL_MAX *and* DBL_MAX is _not_ defined
* If we do, we will replace the one in math.h with that one. * in math.h, this fix applies.
*/
/*
* IF we have such a define *and* HUGE_VAL is defined to be DBL_MAX
* *and* DBL_MAX is _not_ defined in the current file (math.h),
* THEN replace the defined value of HUGE_VAL
* ELSE just copy stdin to stdout so the main filter can process it
*/ */
select = "define[ \t]*HUGE_VAL[ \t]*DBL_MAX";
bypass = "define[ \t]*DBL_MAX";
shell =
/* /*
* Put conditional guards around the HUGE_VAL definition. * See if we have a definition for DBL_MAX in float.h.
* If we do, we will replace the one in math.h with that one.
*/ */
"\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h " "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h "
"2>/dev/null`\n\n" "2>/dev/null`\n\n"
"\tif ( test -n \"${dbl_max_def}\" \\\n" "\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n"
"\t\t-a -n \"`egrep '#define[ \t]*HUGE_VAL[ \t]+DBL_MAX' $file`\" \\\n" "\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/"
"\t\t-a -z \"`egrep '#define[ \t]+DBL_MAX[ \t]+' $file`\"\n" "s/DBL_MAX/'\"$dbl_max_def/\"\n"
"\t ) > /dev/null 2>&1\n" "\telse cat\n"
"\tthen sed -e '/define[ \t]HUGE_VAL[ \t]DBL_MAX/s/DBL_MAX/$dbl_max_def/'" "\tfi";
"\n\telse cat ; fi |\n"
"\tsed -e '/define[ \t]HUGE_VAL[ \t]/i\\\n#ifndef HUGE_VAL\n' "
"-e '/define[ \t]HUGE_VAL[ \t]/a\\\n#endif\n'";
}; };
/*
* In any case, put #ifndef .. #endif around #define HUGE_VAL in math.h.
*/
fix = {
hackname = math_huge_val_ifndef;
files = math/math.h;
select = "define[ \t]*HUGE_VAL";
sed = "/define[ \t]HUGE_VAL[ \t]/i\\\n#ifndef HUGE_VAL\n";
sed = "/define[ \t]HUGE_VAL[ \t]/a\\\n#endif\n";
};
/* /*
* nested comment * nested comment
...@@ -1626,6 +1649,7 @@ fix = { ...@@ -1626,6 +1649,7 @@ fix = {
hackname = rs6000_param; hackname = rs6000_param;
files = "stdio.h"; files = "stdio.h";
files = "unistd.h"; files = "unistd.h";
select = 'const char new';
sed = 's@rename(const char \*old, const char \*new)@' sed = 's@rename(const char \*old, const char \*new)@'
'rename(const char *_old, const char *_new)@'; 'rename(const char *_old, const char *_new)@';
...@@ -1708,6 +1732,7 @@ fix = { ...@@ -1708,6 +1732,7 @@ fix = {
fix = { fix = {
hackname = stdio_va_list; hackname = stdio_va_list;
files = stdio.h; files = stdio.h;
bypass = "__gnuc_va_list";
/* /*
* Use __gnuc_va_list in arg types in place of va_list. * Use __gnuc_va_list in arg types in place of va_list.
...@@ -1907,6 +1932,8 @@ fix = { ...@@ -1907,6 +1932,8 @@ fix = {
fix = { fix = {
hackname = sunos_matherr_decl; hackname = sunos_matherr_decl;
files = math.h; files = math.h;
/* If matherr has a prototype already, the header needs no fix. */
bypass = 'matherr.*struct exception';
/* /*
* Once a declaration for 'struct exception' is found, * Once a declaration for 'struct exception' is found,
* stop trying to insert a forward reference for it. * stop trying to insert a forward reference for it.
...@@ -1922,6 +1949,7 @@ fix = { ...@@ -1922,6 +1949,7 @@ fix = {
fix = { fix = {
hackname = sunos_strlen; hackname = sunos_strlen;
files = strings.h; files = strings.h;
select = "int[ \t]*strlen";
sed = "s/int[ \t]*strlen();/__SIZE_TYPE__ strlen();/"; sed = "s/int[ \t]*strlen();/__SIZE_TYPE__ strlen();/";
}; };
...@@ -2314,9 +2342,9 @@ fix = { ...@@ -2314,9 +2342,9 @@ fix = {
/* /*
* Fix return type of exit and abort in <stdlib.h> on SunOS 4.1. * Fix this file to avoid interfering with stddef.h,
* Also wrap protection around size_t for m88k-sysv3 systems. * but don't mistakenly match ssize_t present in AIX for the ps/2,
* We use a funny name to ensure it follows 'systypes' fix. * or typedefs which use (but do not set) size_t.
*/ */
fix = { fix = {
hackname = systypes_for_aix; hackname = systypes_for_aix;
...@@ -2334,8 +2362,9 @@ fix = { ...@@ -2334,8 +2362,9 @@ fix = {
/* /*
* if the #if says _cplusplus, not the double underscore __cplusplus * Fix return type of exit and abort in <stdlib.h> on SunOS 4.1.
* that it should be * Also wrap protection around size_t for m88k-sysv3 systems.
* We use a funny name to ensure it follows 'systypes' fix.
*/ */
fix = { fix = {
hackname = sysv68_string; hackname = sysv68_string;
...@@ -2410,13 +2439,13 @@ fix = { ...@@ -2410,13 +2439,13 @@ fix = {
/* /*
* Fix this file to avoid interfering with stddef.h, * if the #if says _cplusplus, not the double underscore __cplusplus
* but don't mistakenly match ssize_t present in AIX for the ps/2, * that it should be
* or typedefs which use (but do not set) size_t.
*/ */
fix = { fix = {
hackname = tinfo_cplusplus; hackname = tinfo_cplusplus;
files = tinfo.h; files = tinfo.h;
select = "[ \t]_cplusplus";
sed = "s/[ \t]_cplusplus/ __cplusplus/"; sed = "s/[ \t]_cplusplus/ __cplusplus/";
}; };
...@@ -2448,17 +2477,13 @@ fix = { ...@@ -2448,17 +2477,13 @@ fix = {
/* /*
* parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R. * parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R.
* also get rid of bogus inline definitions in HP-UX 8.0
*/ */
fix = { fix = {
hackname = ultrix_atof_param; hackname = ultrix_atof_param;
files = math.h; files = math.h;
select = "atof\\([ \t]*char";
sed = "s@atof(\\([ \t]*char[ \t]*\\*[^)]*\\))@atof(const \\1)@"; sed = "s@atof(\\([ \t]*char[ \t]*\\*[^)]*\\))@atof(const \\1)@";
sed = "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@";
sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
}; };
......
...@@ -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 114 fixup scripts.
# #
# See README-fixinc for more information. # See README-fixinc for more information.
# #
...@@ -519,20 +519,30 @@ _EOF_ ...@@ -519,20 +519,30 @@ _EOF_
# #
# Fix 8: Aab_Fd_Zero_Glibc_1_0 # Fix 8: Aab_Fd_Zero_Asm_Posix_Types_H
# #
case "${file}" in ./asm/posix_types.h ) case "${file}" in ./asm/posix_types.h )
case "$target_canonical" in i[34567]86-*-linux-gnu* ) case "$target_canonical" in i[34567]86-*-linux-gnu* )
echo "aab_fd_zero_glibc_1_0 replacing file ${file}" >&2 if ( test -z "`egrep '} while' ${file}`"
) > /dev/null 2>&1 ; then
echo "aab_fd_zero_asm_posix_types_h replacing file ${file}" >&2
cat > ${DESTFILE} << '_EOF_' cat > ${DESTFILE} << '_EOF_'
/* This file fixes __FD_ZERO bug for glibc-1.x. */ /* This file fixes a bug in the __FD_ZERO macro
for older versions of the Linux kernel. */
#ifndef _POSIX_TYPES_H_WRAPPER #ifndef _POSIX_TYPES_H_WRAPPER
#include <features.h> #include <features.h>
#include_next <asm/posix_types.h> #include_next <asm/posix_types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__) #if defined(__FD_ZERO) && !defined(__GLIBC__)
#undef __FD_ZERO #undef __FD_ZERO
#define __FD_ZERO(fdsetp) do { int __d0, __d1; __asm__ __volatile__("cld ; rep ; stosl" : "=&c" (__d0), "=&D" (__d1) : "a" (0), "0" (__FDSET_LONGS), "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); } while (0) #define __FD_ZERO(fdsetp) \
do { \
int __d0, __d1; \
__asm__ __volatile__("cld ; rep ; stosl" \
: "=&c" (__d0), "=&D" (__d1) \
: "a" (0), "0" (__FDSET_LONGS), \
"1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
} while (0)
#endif #endif
#define _POSIX_TYPES_H_WRAPPER #define _POSIX_TYPES_H_WRAPPER
...@@ -541,6 +551,7 @@ _EOF_ ...@@ -541,6 +551,7 @@ _EOF_
_EOF_ _EOF_
continue continue
fi # end of bypass 'if'
;; # case end for machine type test ;; # case end for machine type test
esac esac
;; # case end for file name test ;; # case end for file name test
...@@ -548,20 +559,27 @@ _EOF_ ...@@ -548,20 +559,27 @@ _EOF_
# #
# Fix 9: Aab_Fd_Zero_Glibc_1_X # Fix 9: Aab_Fd_Zero_Gnu_Types_H
# #
case "${file}" in ./gnu/types.h ) case "${file}" in ./gnu/types.h )
case "$target_canonical" in i[34567]86-*-linux-gnu* ) case "$target_canonical" in i[34567]86-*-linux-gnu* )
echo "aab_fd_zero_glibc_1_x replacing file ${file}" >&2 echo "aab_fd_zero_gnu_types_h replacing file ${file}" >&2
cat > ${DESTFILE} << '_EOF_' cat > ${DESTFILE} << '_EOF_'
/* This file fixes __FD_ZERO bug for glibc-1.x. */ /* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */
#ifndef _TYPES_H_WRAPPER #ifndef _TYPES_H_WRAPPER
#include <features.h> #include <features.h>
#include_next <gnu/types.h> #include_next <gnu/types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__) #if defined(__FD_ZERO) && !defined(__GLIBC__)
#undef __FD_ZERO #undef __FD_ZERO
# define __FD_ZERO(fdsetp) do { int __d0, __d1; __asm__ __volatile__("cld ; rep ; stosl" : "=&c" (__d0), "=&D" (__d1) : "a" (0), "0" (__FDSET_LONGS), "1" ((__fd_set *) (fdsetp)) :"memory"); } while (0) # define __FD_ZERO(fdsetp) \
do { \
int __d0, __d1; \
__asm__ __volatile__("cld ; rep ; stosl" \
: "=&c" (__d0), "=&D" (__d1) \
: "a" (0), "0" (__FDSET_LONGS), \
"1" ((__fd_set *) (fdsetp)) :"memory"); \
} while (0)
#endif #endif
#define _TYPES_H_WRAPPER #define _TYPES_H_WRAPPER
...@@ -577,20 +595,31 @@ _EOF_ ...@@ -577,20 +595,31 @@ _EOF_
# #
# Fix 10: Aab_Fd_Zero_Glibc_2_0 # Fix 10: Aab_Fd_Zero_Selectbits_H
# #
case "${file}" in ./selectbits.h ) case "${file}" in ./selectbits.h )
case "$target_canonical" in i[34567]86-*-linux-gnu* ) case "$target_canonical" in i[34567]86-*-linux-gnu* )
echo "aab_fd_zero_glibc_2_0 replacing file ${file}" >&2 echo "aab_fd_zero_selectbits_h replacing file ${file}" >&2
cat > ${DESTFILE} << '_EOF_' cat > ${DESTFILE} << '_EOF_'
/* This file fixes __FD_ZERO bug for glibc-2.0.x. */ /* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */
#ifndef _SELECTBITS_H_WRAPPER #ifndef _SELECTBITS_H_WRAPPER
#include <features.h> #include <features.h>
#include_next <selectbits.h> #include_next <selectbits.h>
#if defined(__FD_ZERO) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0 #if defined(__FD_ZERO) && defined(__GLIBC__) \
&& defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \
&& __GLIBC_MINOR__ == 0
#undef __FD_ZERO #undef __FD_ZERO
#define __FD_ZERO(fdsetp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=&c" (__d0), "=&D" (__d1) : "a" (0), "0" (sizeof (__fd_set) / sizeof (__fd_mask)), "1" ((__fd_mask *) (fdsetp)) : "memory"); } while (0) #define __FD_ZERO(fdsetp) \
do { \
int __d0, __d1; \
__asm__ __volatile__ ("cld; rep; stosl" \
: "=&c" (__d0), "=&D" (__d1) \
: "a" (0), "0" (sizeof (__fd_set) \
/ sizeof (__fd_mask)), \
"1" ((__fd_mask *) (fdsetp)) \
: "memory"); \
} while (0)
#endif #endif
#define _SELECTBITS_H_WRAPPER #define _SELECTBITS_H_WRAPPER
...@@ -683,7 +712,9 @@ htons (unsigned int __arg) ...@@ -683,7 +712,9 @@ htons (unsigned int __arg)
return __result; return __result;
} }
#elif ((defined (__i860__) && !defined (__i860_big_endian__)) || defined (__ns32k__) || defined (__vax__) || defined (__spur__) || defined (__arm__)) #elif ((defined (__i860__) && !defined (__i860_big_endian__)) \
|| defined (__ns32k__) || defined (__vax__) \
|| defined (__spur__) || defined (__arm__))
#ifndef __BYTE_ORDER__ #ifndef __BYTE_ORDER__
#define __BYTE_ORDER__ __LITTLE_ENDIAN__ #define __BYTE_ORDER__ __LITTLE_ENDIAN__
...@@ -1069,8 +1100,7 @@ struct rusage; ...@@ -1069,8 +1100,7 @@ struct rusage;
case "${file}" in ./assert.h ) case "${file}" in ./assert.h )
if ( test -n "`egrep 'stderr' ${file}`" if ( test -n "`egrep 'stderr' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
if ( test -a \ if ( test -z "`egrep 'include.*stdio.h' ${file}`"
-z "`egrep 'include.*stdio.h' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
broken_assert_stdio" broken_assert_stdio"
...@@ -1096,8 +1126,7 @@ struct rusage; ...@@ -1096,8 +1126,7 @@ struct rusage;
case "${file}" in ./assert.h ) case "${file}" in ./assert.h )
if ( test -n "`egrep 'exit *\\(|abort *\\(' ${file}`" if ( test -n "`egrep 'exit *\\(|abort *\\(' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
if ( test -a \ if ( test -z "`egrep 'include.*stdlib.h' ${file}`"
-z "`egrep 'include.*stdlib.h' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
broken_assert_stdlib" broken_assert_stdlib"
...@@ -1291,8 +1320,7 @@ extern "C"\ ...@@ -1291,8 +1320,7 @@ extern "C"\
# #
case "${file}" in ./sys/mman.h | \ case "${file}" in ./sys/mman.h | \
./rpc/types.h ) ./rpc/types.h )
if ( test -a \ if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' ${file}`"
-z "`egrep '\"C\"|__BEGIN_DECLS' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
cxx_unready" cxx_unready"
...@@ -1364,7 +1392,31 @@ extern "C" {\ ...@@ -1364,7 +1392,31 @@ extern "C" {\
# #
# Fix 37: Hpux11_Uint32_C # Fix 37: Hpux8_Bogus_Inlines
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'inline' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
hpux8_bogus_inlines"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
sed -e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \
-e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \
-e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \
-e 's@inline double sqr(double [a-z][a-z]*) {.*}@@' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if'
;; # case end for file name test
esac
#
# Fix 38: Hpux11_Uint32_C
# #
case "${file}" in ./inttypes.h ) case "${file}" in ./inttypes.h )
if ( test -n "`egrep '^#define UINT32_C\\(__c\\)[ ]*__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)' ${file}`" if ( test -n "`egrep '^#define UINT32_C\\(__c\\)[ ]*__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)' ${file}`"
...@@ -1385,7 +1437,7 @@ extern "C" {\ ...@@ -1385,7 +1437,7 @@ extern "C" {\
# #
# Fix 38: Interactv_Add1 # Fix 39: Interactv_Add1
# #
case "${file}" in ./stdio.h | \ case "${file}" in ./stdio.h | \
./math.h | \ ./math.h | \
...@@ -1412,7 +1464,7 @@ extern "C" {\ ...@@ -1412,7 +1464,7 @@ extern "C" {\
# #
# Fix 39: Interactv_Add2 # Fix 40: Interactv_Add2
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \ if ( test '(' -d /etc/conf/kconfig.d ')' -a \
...@@ -1434,7 +1486,7 @@ extern "C" {\ ...@@ -1434,7 +1486,7 @@ extern "C" {\
# #
# Fix 40: Interactv_Add3 # Fix 41: Interactv_Add3
# #
case "${file}" in ./sys/limits.h ) case "${file}" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \ if ( test '(' -d /etc/conf/kconfig.d ')' -a \
...@@ -1457,7 +1509,7 @@ extern "C" {\ ...@@ -1457,7 +1509,7 @@ extern "C" {\
# #
# Fix 41: Io_Def_Quotes # Fix 42: Io_Def_Quotes
# #
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`" if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
...@@ -1478,7 +1530,7 @@ extern "C" {\ ...@@ -1478,7 +1530,7 @@ extern "C" {\
# #
# Fix 42: Ioctl_Fix_Ctrl # Fix 43: Ioctl_Fix_Ctrl
# #
if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`" if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
...@@ -1501,9 +1553,11 @@ extern "C" {\ ...@@ -1501,9 +1553,11 @@ extern "C" {\
# #
# Fix 43: Ip_Missing_Semi # Fix 44: Ip_Missing_Semi
# #
case "${file}" in ./netinet/ip.h ) case "${file}" in ./netinet/ip.h )
if ( test -n "`egrep '}$' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
ip_missing_semi" ip_missing_semi"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -1514,12 +1568,13 @@ extern "C" {\ ...@@ -1514,12 +1568,13 @@ extern "C" {\
< $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 select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 44: Irix_Multiline_Cmnt # Fix 45: Irix_Multiline_Cmnt
# #
case "${file}" in ./sys/types.h ) case "${file}" in ./sys/types.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -1538,7 +1593,7 @@ extern "C" {\ ...@@ -1538,7 +1593,7 @@ extern "C" {\
# #
# Fix 45: Irix_Sockaddr # Fix 46: Irix_Sockaddr
# #
case "${file}" in ./rpc/auth.h ) case "${file}" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`" if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
...@@ -1561,7 +1616,7 @@ struct sockaddr; ...@@ -1561,7 +1616,7 @@ struct sockaddr;
# #
# Fix 46: Irix_Struct__File # Fix 47: Irix_Struct__File
# #
case "${file}" in ./rpc/xdr.h ) case "${file}" in ./rpc/xdr.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -1581,7 +1636,7 @@ struct __file_s; ...@@ -1581,7 +1636,7 @@ struct __file_s;
# #
# Fix 47: Irix_Asm_Apostrophe # Fix 48: Irix_Asm_Apostrophe
# #
case "${file}" in ./sys/asm.h ) case "${file}" in ./sys/asm.h )
if ( test -n "`egrep '^[ ]*#.*[Ww]e'\\''re' ${file}`" if ( test -n "`egrep '^[ ]*#.*[Ww]e'\\''re' ${file}`"
...@@ -1602,7 +1657,7 @@ struct __file_s; ...@@ -1602,7 +1657,7 @@ struct __file_s;
# #
# Fix 48: Isc_Fmod # Fix 49: Isc_Fmod
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' ${file}`" if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
...@@ -1623,7 +1678,7 @@ struct __file_s; ...@@ -1623,7 +1678,7 @@ struct __file_s;
# #
# Fix 49: Motorola_Nested # Fix 50: Motorola_Nested
# #
case "${file}" in ./limits.h | \ case "${file}" in ./limits.h | \
./sys/limits.h ) ./sys/limits.h )
...@@ -1646,7 +1701,7 @@ struct __file_s; ...@@ -1646,7 +1701,7 @@ struct __file_s;
# #
# Fix 50: Isc_Sys_Limits # Fix 51: Isc_Sys_Limits
# #
case "${file}" in ./sys/limits.h ) case "${file}" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' ${file}`" if ( test -n "`egrep 'CHILD_MAX' ${file}`"
...@@ -1668,7 +1723,7 @@ struct __file_s; ...@@ -1668,7 +1723,7 @@ struct __file_s;
# #
# Fix 51: Kandr_Concat # Fix 52: Kandr_Concat
# #
case "${file}" in ./sparc/asm_linkage.h | \ case "${file}" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \ ./sun3/asm_linkage.h | \
...@@ -1706,12 +1761,11 @@ struct __file_s; ...@@ -1706,12 +1761,11 @@ struct __file_s;
# #
# Fix 52: Limits_Ifndefs # Fix 53: Limits_Ifndefs
# #
case "${file}" in ./limits.h | \ case "${file}" in ./limits.h | \
./sys/limits.h ) ./sys/limits.h )
if ( test -a \ if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' ${file}`"
-z "`egrep 'ifndef[ ]+FLT_MIN' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
limits_ifndefs" limits_ifndefs"
...@@ -1765,7 +1819,7 @@ struct __file_s; ...@@ -1765,7 +1819,7 @@ struct __file_s;
# #
# Fix 53: Lynx_Void_Int # Fix 54: Lynx_Void_Int
# #
case "${file}" in ./curses.h ) case "${file}" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`" if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`"
...@@ -1786,7 +1840,7 @@ struct __file_s; ...@@ -1786,7 +1840,7 @@ struct __file_s;
# #
# Fix 54: Lynxos_Fcntl_Proto # Fix 55: Lynxos_Fcntl_Proto
# #
case "${file}" in ./fcntl.h ) case "${file}" in ./fcntl.h )
if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`" if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
...@@ -1807,7 +1861,7 @@ struct __file_s; ...@@ -1807,7 +1861,7 @@ struct __file_s;
# #
# Fix 55: M88k_Bad_Hypot_Opt # Fix 56: M88k_Bad_Hypot_Opt
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* ) case "$target_canonical" in m88k-motorola-sysv3* )
...@@ -1842,7 +1896,7 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1842,7 +1896,7 @@ static __inline__ double fake_hypot (x, y)\
# #
# Fix 56: M88k_Bad_S_If # Fix 57: M88k_Bad_S_If
# #
case "${file}" in ./sys/stat.h ) case "${file}" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* ) case "$target_canonical" in m88k-*-sysv3* )
...@@ -1867,12 +1921,11 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1867,12 +1921,11 @@ static __inline__ double fake_hypot (x, y)\
# #
# Fix 57: M88k_Multi_Incl # Fix 58: M88k_Multi_Incl
# #
case "${file}" in ./time.h ) case "${file}" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* ) case "$target_canonical" in m88k-tektronix-sysv3* )
if ( test -a \ if ( test -z "`egrep '#ifndef' ${file}`"
-z "`egrep '#ifndef' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
m88k_multi_incl" m88k_multi_incl"
...@@ -1901,7 +1954,7 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1901,7 +1954,7 @@ static __inline__ double fake_hypot (x, y)\
# #
# Fix 58: Machine_Name # Fix 59: Machine_Name
# #
if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' ${file}`" if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
...@@ -1953,11 +2006,13 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -1953,11 +2006,13 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 59: Math_Exception # Fix 60: Math_Exception
# #
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}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
math_exception" math_exception"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -1974,46 +2029,34 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -1974,46 +2029,34 @@ s/\\+++fixinc_eol+++/\\/g
#undef exception\ #undef exception\
#endif #endif
' \ ' \
-e '/matherr/i\
#ifdef __cplusplus\
#define exception __math_exception\
#endif
' \
-e '/matherr/a\
#ifdef __cplusplus\
#undef exception\
#endif
' \
< $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' fi # end of select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 60: Math_Gcc_Ifndefs # Fix 61: Math_Huge_Val_From_Dbl_Max
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test -n "`egrep 'define[ ]*HUGE_VAL[ ]*DBL_MAX' ${file}`"
) > /dev/null 2>&1 ; then
if ( test -z "`egrep 'define[ ]*DBL_MAX' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
math_gcc_ifndefs" math_huge_val_from_dbl_max"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
then infile=${file} then infile=${file}
else infile=${DESTFILE} ; fi else infile=${DESTFILE} ; fi
( dbl_max_def=`egrep 'define[ ]+DBL_MAX[ ]+.*' float.h 2>/dev/null` ( dbl_max_def=`egrep 'define[ ]+DBL_MAX[ ]+.*' float.h 2>/dev/null`
if ( test -n "${dbl_max_def}" \ if ( test -n "${dbl_max_def}" ) > /dev/null 2>&1
-a -n "`egrep '#define[ ]*HUGE_VAL[ ]+DBL_MAX' $file`" \ then sed -e '/define[ ]*HUGE_VAL[ ]*DBL_MAX/s/DBL_MAX/'"$dbl_max_def/"
-a -z "`egrep '#define[ ]+DBL_MAX[ ]+' $file`" else cat
) > /dev/null 2>&1 fi ) < $infile > ${DESTDIR}/fixinc.tmp
then sed -e '/define[ ]HUGE_VAL[ ]DBL_MAX/s/DBL_MAX/$dbl_max_def/'
else cat ; fi |
sed -e '/define[ ]HUGE_VAL[ ]/i\
#ifndef HUGE_VAL
' -e '/define[ ]HUGE_VAL[ ]/a\
#endif
' ) < $infile > ${DESTDIR}/fixinc.tmp
# Shell scripts have the potential of removing the output # Shell scripts have the potential of removing the output
# We interpret that to mean the file is not to be altered # We interpret that to mean the file is not to be altered
...@@ -2022,12 +2065,40 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2022,12 +2065,40 @@ s/\\+++fixinc_eol+++/\\/g
then continue ; fi then continue ; fi
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
esac
#
# Fix 62: Math_Huge_Val_Ifndef
#
case "${file}" in ./math/math.h )
if ( test -n "`egrep 'define[ ]*HUGE_VAL' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
math_huge_val_ifndef"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
sed -e '/define[ ]HUGE_VAL[ ]/i\
#ifndef HUGE_VAL
' \
-e '/define[ ]HUGE_VAL[ ]/a\
#endif
' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 61: Nested_Comment # Fix 63: Nested_Comment
# #
case "${file}" in ./rpc/rpc.h ) case "${file}" in ./rpc/rpc.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2045,7 +2116,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2045,7 +2116,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 62: News_Os_Recursion # Fix 64: News_Os_Recursion
# #
case "${file}" in ./stdlib.h ) case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' ${file}`" if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
...@@ -2071,7 +2142,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2071,7 +2142,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 63: Next_Math_Prefix # Fix 65: Next_Math_Prefix
# #
case "${file}" in ./ansi/math.h ) case "${file}" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`" if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
...@@ -2096,7 +2167,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2096,7 +2167,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 64: Next_Template # Fix 66: Next_Template
# #
case "${file}" in ./bsd/libc.h ) case "${file}" in ./bsd/libc.h )
if ( test -n "`egrep 'template' ${file}`" if ( test -n "`egrep 'template' ${file}`"
...@@ -2118,7 +2189,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2118,7 +2189,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 65: Next_Volitile # Fix 67: Next_Volitile
# #
case "${file}" in ./ansi/stdlib.h ) case "${file}" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' ${file}`" if ( test -n "`egrep 'volatile' ${file}`"
...@@ -2140,7 +2211,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2140,7 +2211,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 66: Next_Wait_Union # Fix 68: Next_Wait_Union
# #
case "${file}" in ./sys/wait.h ) case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' ${file}`" if ( test -n "`egrep 'wait\\(union wait' ${file}`"
...@@ -2161,7 +2232,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2161,7 +2232,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 67: Nodeent_Syntax # Fix 69: Nodeent_Syntax
# #
case "${file}" in ./netdnet/dnetdb.h ) case "${file}" in ./netdnet/dnetdb.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2179,7 +2250,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2179,7 +2250,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 68: Osf_Namespace_A # Fix 70: Osf_Namespace_A
# #
case "${file}" in ./reg_types.h | \ case "${file}" in ./reg_types.h | \
./sys/lc_core.h ) ./sys/lc_core.h )
...@@ -2206,7 +2277,7 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -2206,7 +2277,7 @@ s/\\+++fixinc_eol+++/\\/g
# #
# Fix 69: Osf_Namespace_B # Fix 71: Osf_Namespace_B
# #
case "${file}" in ./regex.h ) case "${file}" in ./regex.h )
if ( test '(' -r reg_types.h ')' -a \ if ( test '(' -r reg_types.h ')' -a \
...@@ -2234,7 +2305,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2234,7 +2305,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 70: Pthread_Page_Size # Fix 72: Pthread_Page_Size
# #
case "${file}" in ./pthread.h ) case "${file}" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' ${file}`" if ( test -n "`egrep '^int __page_size' ${file}`"
...@@ -2255,7 +2326,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2255,7 +2326,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 71: Read_Ret_Type # Fix 73: Read_Ret_Type
# #
case "${file}" in ./stdio.h ) case "${file}" in ./stdio.h )
if ( test -n "`egrep 'extern int .*, fread\\(\\), fwrite\\(\\)' ${file}`" if ( test -n "`egrep 'extern int .*, fread\\(\\), fwrite\\(\\)' ${file}`"
...@@ -2277,7 +2348,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2277,7 +2348,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 72: Rs6000_Double # Fix 74: Rs6000_Double
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`" if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
...@@ -2303,7 +2374,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2303,7 +2374,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 73: Rs6000_Fchmod # Fix 75: Rs6000_Fchmod
# #
case "${file}" in ./sys/stat.h ) case "${file}" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' ${file}`" if ( test -n "`egrep 'fchmod\\(char' ${file}`"
...@@ -2324,10 +2395,12 @@ typedef __regmatch_t regmatch_t; ...@@ -2324,10 +2395,12 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 74: Rs6000_Param # Fix 76: Rs6000_Param
# #
case "${file}" in ./stdio.h | \ case "${file}" in ./stdio.h | \
./unistd.h ) ./unistd.h )
if ( test -n "`egrep 'const char new' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
rs6000_param" rs6000_param"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -2338,12 +2411,13 @@ typedef __regmatch_t regmatch_t; ...@@ -2338,12 +2411,13 @@ typedef __regmatch_t regmatch_t;
< $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 select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 75: Sony_Include # Fix 77: Sony_Include
# #
case "${file}" in ./machine/machparam.h ) case "${file}" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`" if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`"
...@@ -2364,7 +2438,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2364,7 +2438,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 76: Statsswtch # Fix 78: Statsswtch
# #
case "${file}" in ./rpcsvc/rstat.h ) case "${file}" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' ${file}`" if ( test -n "`egrep 'boottime$' ${file}`"
...@@ -2385,9 +2459,11 @@ typedef __regmatch_t regmatch_t; ...@@ -2385,9 +2459,11 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 77: Stdio_Va_List # Fix 79: Stdio_Va_List
# #
case "${file}" in ./stdio.h ) case "${file}" in ./stdio.h )
if ( test -z "`egrep '__gnuc_va_list' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
stdio_va_list" stdio_va_list"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -2419,12 +2495,13 @@ typedef __regmatch_t regmatch_t; ...@@ -2419,12 +2495,13 @@ typedef __regmatch_t regmatch_t;
then continue ; fi then continue ; fi
rm -f ${DESTFILE} rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
fi # end of bypass 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 78: Sun_Bogus_Ifdef # Fix 80: Sun_Bogus_Ifdef
# #
case "${file}" in ./hsfs/hsfs_spec.h | \ case "${file}" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h ) ./hsfs/iso_spec.h )
...@@ -2446,7 +2523,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2446,7 +2523,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 79: Sun_Bogus_Ifdef_Sun4c # Fix 81: Sun_Bogus_Ifdef_Sun4c
# #
case "${file}" in ./hsfs/hsnode.h ) case "${file}" in ./hsfs/hsnode.h )
if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`" if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`"
...@@ -2467,7 +2544,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2467,7 +2544,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 80: Sun_Catmacro # Fix 82: Sun_Catmacro
# #
case "${file}" in ./pixrect/memvar.h ) case "${file}" in ./pixrect/memvar.h )
if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`" if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`"
...@@ -2495,7 +2572,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2495,7 +2572,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 81: Sun_Malloc # Fix 83: Sun_Malloc
# #
case "${file}" in ./malloc.h ) case "${file}" in ./malloc.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2516,7 +2593,7 @@ typedef __regmatch_t regmatch_t; ...@@ -2516,7 +2593,7 @@ typedef __regmatch_t regmatch_t;
# #
# Fix 82: Sun_Memcpy # Fix 84: Sun_Memcpy
# #
case "${file}" in ./memory.h ) case "${file}" in ./memory.h )
if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' ${file}`" if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' ${file}`"
...@@ -2558,7 +2635,7 @@ extern int memcmp();\ ...@@ -2558,7 +2635,7 @@ extern int memcmp();\
# #
# Fix 83: Sun_Rusers_Semi # Fix 85: Sun_Rusers_Semi
# #
case "${file}" in ./rpcsvc/rusers.h ) case "${file}" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' ${file}`" if ( test -n "`egrep '_cnt$' ${file}`"
...@@ -2579,7 +2656,7 @@ extern int memcmp();\ ...@@ -2579,7 +2656,7 @@ extern int memcmp();\
# #
# Fix 84: Sun_Signal # Fix 86: Sun_Signal
# #
case "${file}" in ./sys/signal.h | \ case "${file}" in ./sys/signal.h | \
./signal.h ) ./signal.h )
...@@ -2608,7 +2685,7 @@ void (*signal(...))(...);\ ...@@ -2608,7 +2685,7 @@ void (*signal(...))(...);\
# #
# Fix 85: Sun_Auth_Proto # Fix 87: Sun_Auth_Proto
# #
case "${file}" in ./rpc/auth.h | \ case "${file}" in ./rpc/auth.h | \
./rpc/clnt.h | \ ./rpc/clnt.h | \
...@@ -2637,9 +2714,11 @@ void (*signal(...))(...);\ ...@@ -2637,9 +2714,11 @@ void (*signal(...))(...);\
# #
# Fix 86: Sunos_Matherr_Decl # Fix 88: Sunos_Matherr_Decl
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test -z "`egrep 'matherr.*struct exception' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
sunos_matherr_decl" sunos_matherr_decl"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -2653,14 +2732,17 @@ struct exception; ...@@ -2653,14 +2732,17 @@ struct exception;
< $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'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 87: Sunos_Strlen # Fix 89: Sunos_Strlen
# #
case "${file}" in ./strings.h ) case "${file}" in ./strings.h )
if ( test -n "`egrep 'int[ ]*strlen' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
sunos_strlen" sunos_strlen"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -2671,12 +2753,13 @@ struct exception; ...@@ -2671,12 +2753,13 @@ struct exception;
< $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 select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 88: Systypes # Fix 90: Systypes
# #
case "${file}" in ./sys/types.h | \ case "${file}" in ./sys/types.h | \
./stdlib.h | \ ./stdlib.h | \
...@@ -2730,13 +2813,12 @@ typedef __SIZE_TYPE__ size_t;\ ...@@ -2730,13 +2813,12 @@ typedef __SIZE_TYPE__ size_t;\
# #
# Fix 89: Systypes_For_Aix # Fix 91: Systypes_For_Aix
# #
case "${file}" in ./sys/types.h ) case "${file}" in ./sys/types.h )
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`" if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
if ( test -a \ if ( test -z "`egrep '_GCC_SIZE_T' ${file}`"
-z "`egrep '_GCC_SIZE_T' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
systypes_for_aix" systypes_for_aix"
...@@ -2761,7 +2843,7 @@ typedef __SIZE_TYPE__ size_t;\ ...@@ -2761,7 +2843,7 @@ typedef __SIZE_TYPE__ size_t;\
# #
# Fix 90: Sysv68_String # Fix 92: Sysv68_String
# #
case "${file}" in ./string.h ) case "${file}" in ./string.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2789,7 +2871,7 @@ extern unsigned int\ ...@@ -2789,7 +2871,7 @@ extern unsigned int\
# #
# Fix 91: Sysz_Stdlib_For_Sun # Fix 93: Sysz_Stdlib_For_Sun
# #
case "${file}" in ./stdlib.h ) case "${file}" in ./stdlib.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2820,7 +2902,7 @@ extern unsigned int\ ...@@ -2820,7 +2902,7 @@ extern unsigned int\
# #
# Fix 92: Sysz_Stdtypes_For_Sun # Fix 94: Sysz_Stdtypes_For_Sun
# #
case "${file}" in ./sys/stdtypes.h ) case "${file}" in ./sys/stdtypes.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2858,9 +2940,11 @@ extern unsigned int\ ...@@ -2858,9 +2940,11 @@ extern unsigned int\
# #
# Fix 93: Tinfo_Cplusplus # Fix 95: Tinfo_Cplusplus
# #
case "${file}" in ./tinfo.h ) case "${file}" in ./tinfo.h )
if ( test -n "`egrep '[ ]_cplusplus' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
tinfo_cplusplus" tinfo_cplusplus"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -2871,12 +2955,13 @@ extern unsigned int\ ...@@ -2871,12 +2955,13 @@ extern unsigned int\
< $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 select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 94: Ultrix_Ansi_Compat # Fix 96: Ultrix_Ansi_Compat
# #
case "${file}" in ./ansi_compat.h ) case "${file}" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' ${file}`" if ( test -n "`egrep 'ULTRIX' ${file}`"
...@@ -2900,7 +2985,7 @@ extern unsigned int\ ...@@ -2900,7 +2985,7 @@ extern unsigned int\
# #
# Fix 95: Ultrix_Fix_Fixproto # Fix 97: Ultrix_Fix_Fixproto
# #
case "${file}" in ./sys/utsname.h ) case "${file}" in ./sys/utsname.h )
if ( test -n "`egrep 'ULTRIX' ${file}`" if ( test -n "`egrep 'ULTRIX' ${file}`"
...@@ -2923,9 +3008,11 @@ struct utsname; ...@@ -2923,9 +3008,11 @@ struct utsname;
# #
# Fix 96: Ultrix_Atof_Param # Fix 98: Ultrix_Atof_Param
# #
case "${file}" in ./math.h ) case "${file}" in ./math.h )
if ( test -n "`egrep 'atof\\([ ]*char' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
ultrix_atof_param" ultrix_atof_param"
if [ ! -r ${DESTFILE} ] if [ ! -r ${DESTFILE} ]
...@@ -2933,19 +3020,16 @@ struct utsname; ...@@ -2933,19 +3020,16 @@ struct utsname;
else infile=${DESTFILE} ; fi else infile=${DESTFILE} ; fi
sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \ sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \
-e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \
-e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \
-e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \
-e 's@inline double sqr(double [a-z][a-z]*) {.*}@@' \
< $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 select 'if'
;; # case end for file name test ;; # case end for file name test
esac esac
# #
# Fix 97: Ultrix_Const # Fix 99: Ultrix_Const
# #
case "${file}" in ./stdio.h ) case "${file}" in ./stdio.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -2971,7 +3055,7 @@ struct utsname; ...@@ -2971,7 +3055,7 @@ struct utsname;
# #
# Fix 98: Ultrix_Ifdef # Fix 100: Ultrix_Ifdef
# #
case "${file}" in ./sys/file.h ) case "${file}" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' ${file}`" if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
...@@ -2992,7 +3076,7 @@ struct utsname; ...@@ -2992,7 +3076,7 @@ struct utsname;
# #
# Fix 99: Ultrix_Nested_Cmnt # Fix 101: Ultrix_Nested_Cmnt
# #
case "${file}" in ./rpc/svc.h ) case "${file}" in ./rpc/svc.h )
fixlist="${fixlist} fixlist="${fixlist}
...@@ -3010,7 +3094,7 @@ struct utsname; ...@@ -3010,7 +3094,7 @@ struct utsname;
# #
# Fix 100: Ultrix_Static # Fix 102: Ultrix_Static
# #
case "${file}" in ./machine/cpu.h ) case "${file}" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`" if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
...@@ -3033,12 +3117,11 @@ struct utsname; ...@@ -3033,12 +3117,11 @@ struct utsname;
# #
# Fix 101: Undefine_Null # Fix 103: Undefine_Null
# #
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`" if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
if ( test -a \ if ( test -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`"
-z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
undefine_null" undefine_null"
...@@ -3057,7 +3140,7 @@ struct utsname; ...@@ -3057,7 +3140,7 @@ struct utsname;
# #
# Fix 102: Unixware7_Byteorder_Fix # Fix 104: Unixware7_Byteorder_Fix
# #
case "${file}" in ./arpa/inet.h ) case "${file}" in ./arpa/inet.h )
case "$target_canonical" in *-*-sysv4* | \ case "$target_canonical" in *-*-sysv4* | \
...@@ -3087,7 +3170,7 @@ struct utsname; ...@@ -3087,7 +3170,7 @@ struct utsname;
# #
# Fix 103: Va_I960_Macro # Fix 105: Va_I960_Macro
# #
case "${file}" in ./arch/i960/archI960.h ) case "${file}" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`" if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`"
...@@ -3111,7 +3194,7 @@ struct utsname; ...@@ -3111,7 +3194,7 @@ struct utsname;
# #
# Fix 104: Void_Null # Fix 106: Void_Null
# #
case "${file}" in ./curses.h | \ case "${file}" in ./curses.h | \
./dbm.h | \ ./dbm.h | \
...@@ -3142,7 +3225,7 @@ struct utsname; ...@@ -3142,7 +3225,7 @@ struct utsname;
# #
# Fix 105: Vxworks_Gcc_Problem # Fix 107: Vxworks_Gcc_Problem
# #
case "${file}" in ./types/vxTypesBase.h ) case "${file}" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`" if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`"
...@@ -3184,7 +3267,7 @@ struct utsname; ...@@ -3184,7 +3267,7 @@ struct utsname;
# #
# Fix 106: Vxworks_Needs_Vxtypes # Fix 108: Vxworks_Needs_Vxtypes
# #
case "${file}" in ./time.h ) case "${file}" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`" if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`"
...@@ -3205,7 +3288,7 @@ struct utsname; ...@@ -3205,7 +3288,7 @@ struct utsname;
# #
# Fix 107: Vxworks_Needs_Vxworks # Fix 109: Vxworks_Needs_Vxworks
# #
case "${file}" in ./sys/stat.h ) case "${file}" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`" if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`"
...@@ -3233,7 +3316,7 @@ struct utsname; ...@@ -3233,7 +3316,7 @@ struct utsname;
# #
# Fix 108: Vxworks_Time # Fix 110: Vxworks_Time
# #
case "${file}" in ./time.h ) case "${file}" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`" if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`"
...@@ -3267,11 +3350,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -3267,11 +3350,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
# #
# Fix 109: X11_Class # Fix 111: X11_Class
# #
case "${file}" in ./X11/ShellP.h ) case "${file}" in ./X11/ShellP.h )
if ( test -a \ if ( test -z "`egrep '__cplusplus' ${file}`"
-z "`egrep '__cplusplus' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
x11_class" x11_class"
...@@ -3296,11 +3378,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -3296,11 +3378,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
# #
# Fix 110: X11_Class_Usage # Fix 112: X11_Class_Usage
# #
case "${file}" in ./Xm/BaseClassI.h ) case "${file}" in ./Xm/BaseClassI.h )
if ( test -a \ if ( test -z "`egrep '__cplusplus' ${file}`"
-z "`egrep '__cplusplus' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
x11_class_usage" x11_class_usage"
...@@ -3318,11 +3399,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -3318,11 +3399,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
# #
# Fix 111: X11_New # Fix 113: X11_New
# #
case "${file}" in ./Xm/Traversal.h ) case "${file}" in ./Xm/Traversal.h )
if ( test -a \ if ( test -z "`egrep '__cplusplus' ${file}`"
-z "`egrep '__cplusplus' ${file}`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
x11_new" x11_new"
...@@ -3348,7 +3428,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -3348,7 +3428,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
# #
# Fix 112: X11_Sprintf # Fix 114: X11_Sprintf
# #
case "${file}" in ./X11*/Xmu.h ) case "${file}" in ./X11*/Xmu.h )
fixlist="${fixlist} fixlist="${fixlist}
......
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