* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
- * This file contains 112 fixup descriptions.
+ * This file contains 114 fixup descriptions.
*
* See README-fixinc for more information.
*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * 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
-tSCC zAab_Fd_Zero_Glibc_1_0Name[] =
- "Aab_Fd_Zero_Glibc_1_0";
+#define AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX 7
+tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] =
+ "Aab_Fd_Zero_Asm_Posix_Types_H";
/*
* File name selection pattern
*/
-tSCC zAab_Fd_Zero_Glibc_1_0List[] =
+tSCC zAab_Fd_Zero_Asm_Posix_Types_HList[] =
"|asm/posix_types.h|";
/*
* 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*",
(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[] = {
-"/* This file fixes __FD_ZERO bug for glibc-1.x. */\n\
+tSCC zAab_Fd_Zero_Asm_Posix_Types_HBypass0[] =
+ "} 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\
#include <features.h>\n\
#include_next <asm/posix_types.h>\n\
\n\
#if defined(__FD_ZERO) && !defined(__GLIBC__)\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\
\n\
#define _POSIX_TYPES_H_WRAPPER\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * 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
-tSCC zAab_Fd_Zero_Glibc_1_XName[] =
- "Aab_Fd_Zero_Glibc_1_X";
+#define AAB_FD_ZERO_GNU_TYPES_H_FIXIDX 8
+tSCC zAab_Fd_Zero_Gnu_Types_HName[] =
+ "Aab_Fd_Zero_Gnu_Types_H";
/*
* File name selection pattern
*/
-tSCC zAab_Fd_Zero_Glibc_1_XList[] =
+tSCC zAab_Fd_Zero_Gnu_Types_HList[] =
"|gnu/types.h|";
/*
* Machine/OS name selection pattern
*/
-tSCC* apzAab_Fd_Zero_Glibc_1_XMachs[] = {
+tSCC* apzAab_Fd_Zero_Gnu_Types_HMachs[] = {
"i[34567]86-*-linux-gnu*",
(const char*)NULL };
-#define AAB_FD_ZERO_GLIBC_1_X_TEST_CT 0
-#define AAB_FD_ZERO_GLIBC_1_X_RE_CT 0
-#define aAab_Fd_Zero_Glibc_1_XTests (tTestDesc*)NULL
+#define AAB_FD_ZERO_GNU_TYPES_H_TEST_CT 0
+#define AAB_FD_ZERO_GNU_TYPES_H_RE_CT 0
+#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[] = {
-"/* This file fixes __FD_ZERO bug for glibc-1.x. */\n\
+const char* apzAab_Fd_Zero_Gnu_Types_HPatch[] = {
+"/* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */\n\
#ifndef _TYPES_H_WRAPPER\n\
#include <features.h>\n\
#include_next <gnu/types.h>\n\
\n\
#if defined(__FD_ZERO) && !defined(__GLIBC__)\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\
\n\
#define _TYPES_H_WRAPPER\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * 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
-tSCC zAab_Fd_Zero_Glibc_2_0Name[] =
- "Aab_Fd_Zero_Glibc_2_0";
+#define AAB_FD_ZERO_SELECTBITS_H_FIXIDX 9
+tSCC zAab_Fd_Zero_Selectbits_HName[] =
+ "Aab_Fd_Zero_Selectbits_H";
/*
* File name selection pattern
*/
-tSCC zAab_Fd_Zero_Glibc_2_0List[] =
+tSCC zAab_Fd_Zero_Selectbits_HList[] =
"|selectbits.h|";
/*
* Machine/OS name selection pattern
*/
-tSCC* apzAab_Fd_Zero_Glibc_2_0Machs[] = {
+tSCC* apzAab_Fd_Zero_Selectbits_HMachs[] = {
"i[34567]86-*-linux-gnu*",
(const char*)NULL };
-#define AAB_FD_ZERO_GLIBC_2_0_TEST_CT 0
-#define AAB_FD_ZERO_GLIBC_2_0_RE_CT 0
-#define aAab_Fd_Zero_Glibc_2_0Tests (tTestDesc*)NULL
+#define AAB_FD_ZERO_SELECTBITS_H_TEST_CT 0
+#define AAB_FD_ZERO_SELECTBITS_H_RE_CT 0
+#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[] = {
-"/* This file fixes __FD_ZERO bug for glibc-2.0.x. */\n\
+const char* apzAab_Fd_Zero_Selectbits_HPatch[] = {
+"/* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */\n\
#ifndef _SELECTBITS_H_WRAPPER\n\
#include <features.h>\n\
#include_next <selectbits.h>\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\
-#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\
\n\
#define _SELECTBITS_H_WRAPPER\n\
return __result;\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\
#ifndef __BYTE_ORDER__\n\
#define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\
"-e", "s/^extern struct sigevent;/struct sigevent;/",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * 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
*/
-#define HPUX11_UINT32_C_FIXIDX 36
+#define HPUX11_UINT32_C_FIXIDX 37
tSCC zHpux11_Uint32_CName[] =
"Hpux11_Uint32_C";
/*
*
* Description of Interactv_Add1 fix
*/
-#define INTERACTV_ADD1_FIXIDX 37
+#define INTERACTV_ADD1_FIXIDX 38
tSCC zInteractv_Add1Name[] =
"Interactv_Add1";
/*
*
* Description of Interactv_Add2 fix
*/
-#define INTERACTV_ADD2_FIXIDX 38
+#define INTERACTV_ADD2_FIXIDX 39
tSCC zInteractv_Add2Name[] =
"Interactv_Add2";
/*
*
* Description of Interactv_Add3 fix
*/
-#define INTERACTV_ADD3_FIXIDX 39
+#define INTERACTV_ADD3_FIXIDX 40
tSCC zInteractv_Add3Name[] =
"Interactv_Add3";
/*
*
* Description of Io_Def_Quotes fix
*/
-#define IO_DEF_QUOTES_FIXIDX 40
+#define IO_DEF_QUOTES_FIXIDX 41
tSCC zIo_Def_QuotesName[] =
"Io_Def_Quotes";
/*
*
* Description of Ioctl_Fix_Ctrl fix
*/
-#define IOCTL_FIX_CTRL_FIXIDX 41
+#define IOCTL_FIX_CTRL_FIXIDX 42
tSCC zIoctl_Fix_CtrlName[] =
"Ioctl_Fix_Ctrl";
/*
*
* Description of Ip_Missing_Semi fix
*/
-#define IP_MISSING_SEMI_FIXIDX 42
+#define IP_MISSING_SEMI_FIXIDX 43
tSCC zIp_Missing_SemiName[] =
"Ip_Missing_Semi";
/*
* Machine/OS name selection pattern
*/
#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
*
* Description of Irix_Multiline_Cmnt fix
*/
-#define IRIX_MULTILINE_CMNT_FIXIDX 43
+#define IRIX_MULTILINE_CMNT_FIXIDX 44
tSCC zIrix_Multiline_CmntName[] =
"Irix_Multiline_Cmnt";
/*
*
* Description of Irix_Sockaddr fix
*/
-#define IRIX_SOCKADDR_FIXIDX 44
+#define IRIX_SOCKADDR_FIXIDX 45
tSCC zIrix_SockaddrName[] =
"Irix_Sockaddr";
/*
*
* Description of Irix_Struct__File fix
*/
-#define IRIX_STRUCT__FILE_FIXIDX 45
+#define IRIX_STRUCT__FILE_FIXIDX 46
tSCC zIrix_Struct__FileName[] =
"Irix_Struct__File";
/*
*
* Description of Irix_Asm_Apostrophe fix
*/
-#define IRIX_ASM_APOSTROPHE_FIXIDX 46
+#define IRIX_ASM_APOSTROPHE_FIXIDX 47
tSCC zIrix_Asm_ApostropheName[] =
"Irix_Asm_Apostrophe";
/*
*
* Description of Isc_Fmod fix
*/
-#define ISC_FMOD_FIXIDX 47
+#define ISC_FMOD_FIXIDX 48
tSCC zIsc_FmodName[] =
"Isc_Fmod";
/*
*
* Description of Motorola_Nested fix
*/
-#define MOTOROLA_NESTED_FIXIDX 48
+#define MOTOROLA_NESTED_FIXIDX 49
tSCC zMotorola_NestedName[] =
"Motorola_Nested";
/*
*
* Description of Isc_Sys_Limits fix
*/
-#define ISC_SYS_LIMITS_FIXIDX 49
+#define ISC_SYS_LIMITS_FIXIDX 50
tSCC zIsc_Sys_LimitsName[] =
"Isc_Sys_Limits";
/*
*
* Description of Kandr_Concat fix
*/
-#define KANDR_CONCAT_FIXIDX 50
+#define KANDR_CONCAT_FIXIDX 51
tSCC zKandr_ConcatName[] =
"Kandr_Concat";
/*
*
* Description of Limits_Ifndefs fix
*/
-#define LIMITS_IFNDEFS_FIXIDX 51
+#define LIMITS_IFNDEFS_FIXIDX 52
tSCC zLimits_IfndefsName[] =
"Limits_Ifndefs";
/*
*
* Description of Lynx_Void_Int fix
*/
-#define LYNX_VOID_INT_FIXIDX 52
+#define LYNX_VOID_INT_FIXIDX 53
tSCC zLynx_Void_IntName[] =
"Lynx_Void_Int";
/*
*
* Description of Lynxos_Fcntl_Proto fix
*/
-#define LYNXOS_FCNTL_PROTO_FIXIDX 53
+#define LYNXOS_FCNTL_PROTO_FIXIDX 54
tSCC zLynxos_Fcntl_ProtoName[] =
"Lynxos_Fcntl_Proto";
/*
*
* 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[] =
"M88k_Bad_Hypot_Opt";
/*
*
* 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[] =
"M88k_Bad_S_If";
/*
*
* Description of M88k_Multi_Incl fix
*/
-#define M88K_MULTI_INCL_FIXIDX 56
+#define M88K_MULTI_INCL_FIXIDX 57
tSCC zM88k_Multi_InclName[] =
"M88k_Multi_Incl";
/*
*
* Description of Machine_Name fix
*/
-#define MACHINE_NAME_FIXIDX 57
+#define MACHINE_NAME_FIXIDX 58
tSCC zMachine_NameName[] =
"Machine_Name";
/*
*
* Description of Math_Exception fix
*/
-#define MATH_EXCEPTION_FIXIDX 58
+#define MATH_EXCEPTION_FIXIDX 59
tSCC zMath_ExceptionName[] =
"Math_Exception";
/*
tSCC zMath_ExceptionSelect0[] =
"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[] = {
+ { TT_NEGREP, zMath_ExceptionBypass0, (regex_t*)NULL },
{ TT_EGREP, zMath_ExceptionSelect0, (regex_t*)NULL }, };
/*
"-e", "/struct exception/a\\\n\
#ifdef __cplusplus\\\n\
#undef exception\\\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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Math_Gcc_Ifndefs fix
+ * Description of Math_Huge_Val_From_Dbl_Max fix
*/
-#define MATH_GCC_IFNDEFS_FIXIDX 59
-tSCC zMath_Gcc_IfndefsName[] =
- "Math_Gcc_Ifndefs";
+#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 60
+tSCC zMath_Huge_Val_From_Dbl_MaxName[] =
+ "Math_Huge_Val_From_Dbl_Max";
/*
* File name selection pattern
*/
-tSCC zMath_Gcc_IfndefsList[] =
+tSCC zMath_Huge_Val_From_Dbl_MaxList[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
-#define apzMath_Gcc_IfndefsMachs (const char**)NULL
-#define MATH_GCC_IFNDEFS_TEST_CT 0
-#define MATH_GCC_IFNDEFS_RE_CT 0
-#define aMath_Gcc_IfndefsTests (tTestDesc*)NULL
+#define apzMath_Huge_Val_From_Dbl_MaxMachs (const char**)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\
\n\
-\tif ( test -n \"${dbl_max_def}\" \\\n\
-\t\t-a -n \"`egrep '#define[ \t]*HUGE_VAL[ \t]+DBL_MAX' $file`\" \\\n\
-\t\t-a -z \"`egrep '#define[ \t]+DBL_MAX[ \t]+' $file`\"\n\
-\t ) > /dev/null 2>&1\n\
-\tthen sed -e '/define[ \t]HUGE_VAL[ \t]DBL_MAX/s/DBL_MAX/$dbl_max_def/'\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\
-'",
+\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n\
+\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/s/DBL_MAX/'\"$dbl_max_def/\"\n\
+\telse cat\n\
+\tfi",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Math_Huge_Val_Ifndef fix
+ */
+#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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Nested_Comment fix
*/
-#define NESTED_COMMENT_FIXIDX 60
+#define NESTED_COMMENT_FIXIDX 62
tSCC zNested_CommentName[] =
"Nested_Comment";
/*
*
* Description of News_Os_Recursion fix
*/
-#define NEWS_OS_RECURSION_FIXIDX 61
+#define NEWS_OS_RECURSION_FIXIDX 63
tSCC zNews_Os_RecursionName[] =
"News_Os_Recursion";
/*
*
* Description of Next_Math_Prefix fix
*/
-#define NEXT_MATH_PREFIX_FIXIDX 62
+#define NEXT_MATH_PREFIX_FIXIDX 64
tSCC zNext_Math_PrefixName[] =
"Next_Math_Prefix";
/*
*
* Description of Next_Template fix
*/
-#define NEXT_TEMPLATE_FIXIDX 63
+#define NEXT_TEMPLATE_FIXIDX 65
tSCC zNext_TemplateName[] =
"Next_Template";
/*
*
* Description of Next_Volitile fix
*/
-#define NEXT_VOLITILE_FIXIDX 64
+#define NEXT_VOLITILE_FIXIDX 66
tSCC zNext_VolitileName[] =
"Next_Volitile";
/*
*
* Description of Next_Wait_Union fix
*/
-#define NEXT_WAIT_UNION_FIXIDX 65
+#define NEXT_WAIT_UNION_FIXIDX 67
tSCC zNext_Wait_UnionName[] =
"Next_Wait_Union";
/*
*
* Description of Nodeent_Syntax fix
*/
-#define NODEENT_SYNTAX_FIXIDX 66
+#define NODEENT_SYNTAX_FIXIDX 68
tSCC zNodeent_SyntaxName[] =
"Nodeent_Syntax";
/*
*
* Description of Osf_Namespace_A fix
*/
-#define OSF_NAMESPACE_A_FIXIDX 67
+#define OSF_NAMESPACE_A_FIXIDX 69
tSCC zOsf_Namespace_AName[] =
"Osf_Namespace_A";
/*
*
* Description of Osf_Namespace_B fix
*/
-#define OSF_NAMESPACE_B_FIXIDX 68
+#define OSF_NAMESPACE_B_FIXIDX 70
tSCC zOsf_Namespace_BName[] =
"Osf_Namespace_B";
/*
*
* Description of Pthread_Page_Size fix
*/
-#define PTHREAD_PAGE_SIZE_FIXIDX 69
+#define PTHREAD_PAGE_SIZE_FIXIDX 71
tSCC zPthread_Page_SizeName[] =
"Pthread_Page_Size";
/*
*
* Description of Read_Ret_Type fix
*/
-#define READ_RET_TYPE_FIXIDX 70
+#define READ_RET_TYPE_FIXIDX 72
tSCC zRead_Ret_TypeName[] =
"Read_Ret_Type";
/*
*
* Description of Rs6000_Double fix
*/
-#define RS6000_DOUBLE_FIXIDX 71
+#define RS6000_DOUBLE_FIXIDX 73
tSCC zRs6000_DoubleName[] =
"Rs6000_Double";
/*
*
* Description of Rs6000_Fchmod fix
*/
-#define RS6000_FCHMOD_FIXIDX 72
+#define RS6000_FCHMOD_FIXIDX 74
tSCC zRs6000_FchmodName[] =
"Rs6000_Fchmod";
/*
*
* Description of Rs6000_Param fix
*/
-#define RS6000_PARAM_FIXIDX 73
+#define RS6000_PARAM_FIXIDX 75
tSCC zRs6000_ParamName[] =
"Rs6000_Param";
/*
* Machine/OS name selection pattern
*/
#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
*
* Description of Sony_Include fix
*/
-#define SONY_INCLUDE_FIXIDX 74
+#define SONY_INCLUDE_FIXIDX 76
tSCC zSony_IncludeName[] =
"Sony_Include";
/*
*
* Description of Statsswtch fix
*/
-#define STATSSWTCH_FIXIDX 75
+#define STATSSWTCH_FIXIDX 77
tSCC zStatsswtchName[] =
"Statsswtch";
/*
*
* Description of Stdio_Va_List fix
*/
-#define STDIO_VA_LIST_FIXIDX 76
+#define STDIO_VA_LIST_FIXIDX 78
tSCC zStdio_Va_ListName[] =
"Stdio_Va_List";
/*
* Machine/OS name selection pattern
*/
#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
*
* Description of Sun_Bogus_Ifdef fix
*/
-#define SUN_BOGUS_IFDEF_FIXIDX 77
+#define SUN_BOGUS_IFDEF_FIXIDX 79
tSCC zSun_Bogus_IfdefName[] =
"Sun_Bogus_Ifdef";
/*
*
* 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[] =
"Sun_Bogus_Ifdef_Sun4c";
/*
*
* Description of Sun_Catmacro fix
*/
-#define SUN_CATMACRO_FIXIDX 79
+#define SUN_CATMACRO_FIXIDX 81
tSCC zSun_CatmacroName[] =
"Sun_Catmacro";
/*
*
* Description of Sun_Malloc fix
*/
-#define SUN_MALLOC_FIXIDX 80
+#define SUN_MALLOC_FIXIDX 82
tSCC zSun_MallocName[] =
"Sun_Malloc";
/*
*
* Description of Sun_Memcpy fix
*/
-#define SUN_MEMCPY_FIXIDX 81
+#define SUN_MEMCPY_FIXIDX 83
tSCC zSun_MemcpyName[] =
"Sun_Memcpy";
/*
*
* Description of Sun_Rusers_Semi fix
*/
-#define SUN_RUSERS_SEMI_FIXIDX 82
+#define SUN_RUSERS_SEMI_FIXIDX 84
tSCC zSun_Rusers_SemiName[] =
"Sun_Rusers_Semi";
/*
*
* Description of Sun_Signal fix
*/
-#define SUN_SIGNAL_FIXIDX 83
+#define SUN_SIGNAL_FIXIDX 85
tSCC zSun_SignalName[] =
"Sun_Signal";
/*
*
* Description of Sun_Auth_Proto fix
*/
-#define SUN_AUTH_PROTO_FIXIDX 84
+#define SUN_AUTH_PROTO_FIXIDX 86
tSCC zSun_Auth_ProtoName[] =
"Sun_Auth_Proto";
/*
*
* Description of Sunos_Matherr_Decl fix
*/
-#define SUNOS_MATHERR_DECL_FIXIDX 85
+#define SUNOS_MATHERR_DECL_FIXIDX 87
tSCC zSunos_Matherr_DeclName[] =
"Sunos_Matherr_Decl";
/*
* Machine/OS name selection pattern
*/
#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
*
* Description of Sunos_Strlen fix
*/
-#define SUNOS_STRLEN_FIXIDX 86
+#define SUNOS_STRLEN_FIXIDX 88
tSCC zSunos_StrlenName[] =
"Sunos_Strlen";
/*
* Machine/OS name selection pattern
*/
#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
*
* Description of Systypes fix
*/
-#define SYSTYPES_FIXIDX 87
+#define SYSTYPES_FIXIDX 89
tSCC zSystypesName[] =
"Systypes";
/*
*
* Description of Systypes_For_Aix fix
*/
-#define SYSTYPES_FOR_AIX_FIXIDX 88
+#define SYSTYPES_FOR_AIX_FIXIDX 90
tSCC zSystypes_For_AixName[] =
"Systypes_For_Aix";
/*
*
* Description of Sysv68_String fix
*/
-#define SYSV68_STRING_FIXIDX 89
+#define SYSV68_STRING_FIXIDX 91
tSCC zSysv68_StringName[] =
"Sysv68_String";
/*
*
* 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[] =
"Sysz_Stdlib_For_Sun";
/*
*
* 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[] =
"Sysz_Stdtypes_For_Sun";
/*
*
* Description of Tinfo_Cplusplus fix
*/
-#define TINFO_CPLUSPLUS_FIXIDX 92
+#define TINFO_CPLUSPLUS_FIXIDX 94
tSCC zTinfo_CplusplusName[] =
"Tinfo_Cplusplus";
/*
* Machine/OS name selection pattern
*/
#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
*
* Description of Ultrix_Ansi_Compat fix
*/
-#define ULTRIX_ANSI_COMPAT_FIXIDX 93
+#define ULTRIX_ANSI_COMPAT_FIXIDX 95
tSCC zUltrix_Ansi_CompatName[] =
"Ultrix_Ansi_Compat";
/*
*
* Description of Ultrix_Fix_Fixproto fix
*/
-#define ULTRIX_FIX_FIXPROTO_FIXIDX 94
+#define ULTRIX_FIX_FIXPROTO_FIXIDX 96
tSCC zUltrix_Fix_FixprotoName[] =
"Ultrix_Fix_Fixproto";
/*
*
* Description of Ultrix_Atof_Param fix
*/
-#define ULTRIX_ATOF_PARAM_FIXIDX 95
+#define ULTRIX_ATOF_PARAM_FIXIDX 97
tSCC zUltrix_Atof_ParamName[] =
"Ultrix_Atof_Param";
/*
* Machine/OS name selection pattern
*/
#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
*/
const char* apzUltrix_Atof_ParamPatch[] = { "sed",
"-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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Ultrix_Const fix
*/
-#define ULTRIX_CONST_FIXIDX 96
+#define ULTRIX_CONST_FIXIDX 98
tSCC zUltrix_ConstName[] =
"Ultrix_Const";
/*
*
* Description of Ultrix_Ifdef fix
*/
-#define ULTRIX_IFDEF_FIXIDX 97
+#define ULTRIX_IFDEF_FIXIDX 99
tSCC zUltrix_IfdefName[] =
"Ultrix_Ifdef";
/*
*
* Description of Ultrix_Nested_Cmnt fix
*/
-#define ULTRIX_NESTED_CMNT_FIXIDX 98
+#define ULTRIX_NESTED_CMNT_FIXIDX 100
tSCC zUltrix_Nested_CmntName[] =
"Ultrix_Nested_Cmnt";
/*
*
* Description of Ultrix_Static fix
*/
-#define ULTRIX_STATIC_FIXIDX 99
+#define ULTRIX_STATIC_FIXIDX 101
tSCC zUltrix_StaticName[] =
"Ultrix_Static";
/*
*
* Description of Undefine_Null fix
*/
-#define UNDEFINE_NULL_FIXIDX 100
+#define UNDEFINE_NULL_FIXIDX 102
tSCC zUndefine_NullName[] =
"Undefine_Null";
/*
*
* Description of Unixware7_Byteorder_Fix fix
*/
-#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 101
+#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 103
tSCC zUnixware7_Byteorder_FixName[] =
"Unixware7_Byteorder_Fix";
/*
*
* Description of Va_I960_Macro fix
*/
-#define VA_I960_MACRO_FIXIDX 102
+#define VA_I960_MACRO_FIXIDX 104
tSCC zVa_I960_MacroName[] =
"Va_I960_Macro";
/*
*
* Description of Void_Null fix
*/
-#define VOID_NULL_FIXIDX 103
+#define VOID_NULL_FIXIDX 105
tSCC zVoid_NullName[] =
"Void_Null";
/*
*
* Description of Vxworks_Gcc_Problem fix
*/
-#define VXWORKS_GCC_PROBLEM_FIXIDX 104
+#define VXWORKS_GCC_PROBLEM_FIXIDX 106
tSCC zVxworks_Gcc_ProblemName[] =
"Vxworks_Gcc_Problem";
/*
*
* Description of Vxworks_Needs_Vxtypes fix
*/
-#define VXWORKS_NEEDS_VXTYPES_FIXIDX 105
+#define VXWORKS_NEEDS_VXTYPES_FIXIDX 107
tSCC zVxworks_Needs_VxtypesName[] =
"Vxworks_Needs_Vxtypes";
/*
*
* Description of Vxworks_Needs_Vxworks fix
*/
-#define VXWORKS_NEEDS_VXWORKS_FIXIDX 106
+#define VXWORKS_NEEDS_VXWORKS_FIXIDX 108
tSCC zVxworks_Needs_VxworksName[] =
"Vxworks_Needs_Vxworks";
/*
*
* Description of Vxworks_Time fix
*/
-#define VXWORKS_TIME_FIXIDX 107
+#define VXWORKS_TIME_FIXIDX 109
tSCC zVxworks_TimeName[] =
"Vxworks_Time";
/*
*
* Description of X11_Class fix
*/
-#define X11_CLASS_FIXIDX 108
+#define X11_CLASS_FIXIDX 110
tSCC zX11_ClassName[] =
"X11_Class";
/*
*
* Description of X11_Class_Usage fix
*/
-#define X11_CLASS_USAGE_FIXIDX 109
+#define X11_CLASS_USAGE_FIXIDX 111
tSCC zX11_Class_UsageName[] =
"X11_Class_Usage";
/*
*
* Description of X11_New fix
*/
-#define X11_NEW_FIXIDX 110
+#define X11_NEW_FIXIDX 112
tSCC zX11_NewName[] =
"X11_New";
/*
*
* Description of X11_Sprintf fix
*/
-#define X11_SPRINTF_FIXIDX 111
+#define X11_SPRINTF_FIXIDX 113
tSCC zX11_SprintfName[] =
"X11_Sprintf";
/*
*
* List of all fixes
*/
-#define REGEX_COUNT 76
+#define REGEX_COUNT 89
#define MACH_LIST_SIZE_LIMIT 279
-#define FIX_COUNT 112
+#define FIX_COUNT 114
tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Dgux_Int_VarargsTests, apzAab_Dgux_Int_VarargsPatch },
- { zAab_Fd_Zero_Glibc_1_0Name, zAab_Fd_Zero_Glibc_1_0List,
- apzAab_Fd_Zero_Glibc_1_0Machs, (regex_t*)NULL,
- AAB_FD_ZERO_GLIBC_1_0_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
- aAab_Fd_Zero_Glibc_1_0Tests, apzAab_Fd_Zero_Glibc_1_0Patch },
+ { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList,
+ apzAab_Fd_Zero_Asm_Posix_Types_HMachs, (regex_t*)NULL,
+ AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+ 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,
- apzAab_Fd_Zero_Glibc_1_XMachs, (regex_t*)NULL,
- AAB_FD_ZERO_GLIBC_1_X_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
- aAab_Fd_Zero_Glibc_1_XTests, apzAab_Fd_Zero_Glibc_1_XPatch },
+ { zAab_Fd_Zero_Gnu_Types_HName, zAab_Fd_Zero_Gnu_Types_HList,
+ apzAab_Fd_Zero_Gnu_Types_HMachs, (regex_t*)NULL,
+ AAB_FD_ZERO_GNU_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+ aAab_Fd_Zero_Gnu_Types_HTests, apzAab_Fd_Zero_Gnu_Types_HPatch },
- { zAab_Fd_Zero_Glibc_2_0Name, zAab_Fd_Zero_Glibc_2_0List,
- apzAab_Fd_Zero_Glibc_2_0Machs, (regex_t*)NULL,
- AAB_FD_ZERO_GLIBC_2_0_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
- aAab_Fd_Zero_Glibc_2_0Tests, apzAab_Fd_Zero_Glibc_2_0Patch },
+ { zAab_Fd_Zero_Selectbits_HName, zAab_Fd_Zero_Selectbits_HList,
+ apzAab_Fd_Zero_Selectbits_HMachs, (regex_t*)NULL,
+ AAB_FD_ZERO_SELECTBITS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
+ aAab_Fd_Zero_Selectbits_HTests, apzAab_Fd_Zero_Selectbits_HPatch },
{ zAab_Svr4_Replace_ByteorderName, zAab_Svr4_Replace_ByteorderList,
apzAab_Svr4_Replace_ByteorderMachs, (regex_t*)NULL,
HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY,
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,
apzHpux11_Uint32_CMachs, (regex_t*)NULL,
HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY,
MATH_EXCEPTION_TEST_CT, FD_MACH_ONLY,
aMath_ExceptionTests, apzMath_ExceptionPatch },
- { zMath_Gcc_IfndefsName, zMath_Gcc_IfndefsList,
- apzMath_Gcc_IfndefsMachs, (regex_t*)NULL,
- MATH_GCC_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT,
- aMath_Gcc_IfndefsTests, apzMath_Gcc_IfndefsPatch },
+ { zMath_Huge_Val_From_Dbl_MaxName, zMath_Huge_Val_From_Dbl_MaxList,
+ apzMath_Huge_Val_From_Dbl_MaxMachs, (regex_t*)NULL,
+ MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT,
+ 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,
apzNested_CommentMachs, (regex_t*)NULL,
/*
- * 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 = {
- hackname = AAB_fd_zero_glibc_1_0;
+ hackname = AAB_fd_zero_asm_posix_types_h;
files = asm/posix_types.h;
mach = 'i[34567]86-*-linux-gnu*';
+ bypass = '} while';
/*
* Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
*/
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
\#include <features.h>
\#include_next <asm/posix_types.h>
\#if defined(__FD_ZERO) && !defined(__GLIBC__)
\#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"); \
+\#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
* This fixes __FD_ZERO bug for glibc-1.x
*/
fix = {
- hackname = AAB_fd_zero_glibc_1_x;
+ hackname = AAB_fd_zero_gnu_types_h;
files = gnu/types.h;
mach = 'i[34567]86-*-linux-gnu*';
*/
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
\#include <features.h>
\#include_next <gnu/types.h>
\#if defined(__FD_ZERO) && !defined(__GLIBC__)
\#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"); \
+\# 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
* This fixes __FD_ZERO bug for glibc-2.0.x
*/
fix = {
- hackname = AAB_fd_zero_glibc_2_0;
+ hackname = AAB_fd_zero_selectbits_h;
files = selectbits.h;
mach = 'i[34567]86-*-linux-gnu*';
*/
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
\#include <features.h>
\#include_next <selectbits.h>
-\#if defined(__FD_ZERO) && defined(__GLIBC__) \
- && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \
+\#if defined(__FD_ZERO) && defined(__GLIBC__) \\
+ && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\
&& __GLIBC_MINOR__ == 0
\#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"); \
+\#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
return __result;
}
-\#elif ((defined (__i860__) && !defined (__i860_big_endian__)) \
- || defined (__ns32k__) || defined (__vax__) \
+\#elif ((defined (__i860__) && !defined (__i860_big_endian__)) \\
+ || defined (__ns32k__) || defined (__vax__) \\
|| defined (__spur__) || defined (__arm__))
\#ifndef __BYTE_ORDER__
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
* of UINT32_C has undefined behavior according to ISO/ANSI:
fix = {
hackname = ip_missing_semi;
files = netinet/ip.h;
+ select = "}$";
sed = "/^struct/,/^};/s/}$/};/";
};
hackname = math_exception;
files = math.h;
select = "struct exception";
+ bypass = "We have a problem when using C++";
sed = "/struct exception/i\\\n"
"#ifdef __cplusplus\\\n"
"#define exception __math_exception\\\n"
"#undef exception\\\n"
"#endif\n";
+#ifdef MATH_EXCEPTION_FIXED
sed = "/matherr/i\\\n"
"#ifdef __cplusplus\\\n"
"#define exception __math_exception\\\n"
"#undef exception\\\n"
"#endif\n";
-#ifdef MATH_EXCEPTION_FIXED
-
I think this patch needs some more thinking.
This is from SVR4.2 (With '#' replaced with '@').
Perhaps we could do without the "/matherr/a" entries?
Can we bypass the entire fix if someone was astute
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
--- math.h Sun May 9 07:28:58 1999
#endif
};
-
-/*
- * In math.h, put #ifndefs around things that might be defined
- * in a gcc specific math-*.h file.
- */
fix = {
- hackname = math_gcc_ifndefs;
+ hackname = math_huge_val_from_dbl_max;
files = math.h;
-
- shell =
/*
- * First 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.
- */
-
- /*
- * 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
+ * IF HUGE_VAL is defined to be DBL_MAX *and* DBL_MAX is _not_ defined
+ * in math.h, this fix applies.
*/
+ 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 "
"2>/dev/null`\n\n"
- "\tif ( test -n \"${dbl_max_def}\" \\\n"
- "\t\t-a -n \"`egrep '#define[ \t]*HUGE_VAL[ \t]+DBL_MAX' $file`\" \\\n"
- "\t\t-a -z \"`egrep '#define[ \t]+DBL_MAX[ \t]+' $file`\"\n"
- "\t ) > /dev/null 2>&1\n"
- "\tthen sed -e '/define[ \t]HUGE_VAL[ \t]DBL_MAX/s/DBL_MAX/$dbl_max_def/'"
- "\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'";
+ "\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n"
+ "\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/"
+ "s/DBL_MAX/'\"$dbl_max_def/\"\n"
+ "\telse cat\n"
+ "\tfi";
};
+/*
+ * 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
hackname = rs6000_param;
files = "stdio.h";
files = "unistd.h";
+ select = 'const char new';
sed = 's@rename(const char \*old, const char \*new)@'
'rename(const char *_old, const char *_new)@';
fix = {
hackname = stdio_va_list;
files = stdio.h;
+ bypass = "__gnuc_va_list";
/*
* Use __gnuc_va_list in arg types in place of va_list.
fix = {
hackname = sunos_matherr_decl;
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,
* stop trying to insert a forward reference for it.
fix = {
hackname = sunos_strlen;
files = strings.h;
+ select = "int[ \t]*strlen";
sed = "s/int[ \t]*strlen();/__SIZE_TYPE__ strlen();/";
};
/*
- * Fix return type of exit and abort in <stdlib.h> on SunOS 4.1.
- * Also wrap protection around size_t for m88k-sysv3 systems.
- * We use a funny name to ensure it follows 'systypes' fix.
+ * Fix this file to avoid interfering with stddef.h,
+ * but don't mistakenly match ssize_t present in AIX for the ps/2,
+ * or typedefs which use (but do not set) size_t.
*/
fix = {
hackname = systypes_for_aix;
/*
- * if the #if says _cplusplus, not the double underscore __cplusplus
- * that it should be
+ * Fix return type of exit and abort in <stdlib.h> on SunOS 4.1.
+ * Also wrap protection around size_t for m88k-sysv3 systems.
+ * We use a funny name to ensure it follows 'systypes' fix.
*/
fix = {
hackname = sysv68_string;
/*
- * Fix this file to avoid interfering with stddef.h,
- * but don't mistakenly match ssize_t present in AIX for the ps/2,
- * or typedefs which use (but do not set) size_t.
+ * if the #if says _cplusplus, not the double underscore __cplusplus
+ * that it should be
*/
fix = {
hackname = tinfo_cplusplus;
files = tinfo.h;
+ select = "[ \t]_cplusplus";
sed = "s/[ \t]_cplusplus/ __cplusplus/";
};
/*
* 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 = {
hackname = ultrix_atof_param;
files = math.h;
+ select = "atof\\([ \t]*char";
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]*) {.*}@@";
};
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
-# This script contains 112 fixup scripts.
+# This script contains 114 fixup scripts.
#
# See README-fixinc for more information.
#
#
- # 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 "$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_'
-/* 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
#include <features.h>
#include_next <asm/posix_types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__)
#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
#define _POSIX_TYPES_H_WRAPPER
_EOF_
continue
+ fi # end of bypass 'if'
;; # case end for machine type test
esac
;; # case end for file name test
#
- # Fix 9: Aab_Fd_Zero_Glibc_1_X
+ # Fix 9: Aab_Fd_Zero_Gnu_Types_H
#
case "${file}" in ./gnu/types.h )
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_'
-/* 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
#include <features.h>
#include_next <gnu/types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__)
#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
#define _TYPES_H_WRAPPER
#
- # Fix 10: Aab_Fd_Zero_Glibc_2_0
+ # Fix 10: Aab_Fd_Zero_Selectbits_H
#
case "${file}" in ./selectbits.h )
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_'
-/* 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
#include <features.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
-#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
#define _SELECTBITS_H_WRAPPER
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__
#define __BYTE_ORDER__ __LITTLE_ENDIAN__
case "${file}" in ./assert.h )
if ( test -n "`egrep 'stderr' ${file}`"
) > /dev/null 2>&1 ; then
- if ( test -a \
- -z "`egrep 'include.*stdio.h' ${file}`"
+ if ( test -z "`egrep 'include.*stdio.h' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
broken_assert_stdio"
case "${file}" in ./assert.h )
if ( test -n "`egrep 'exit *\\(|abort *\\(' ${file}`"
) > /dev/null 2>&1 ; then
- if ( test -a \
- -z "`egrep 'include.*stdlib.h' ${file}`"
+ if ( test -z "`egrep 'include.*stdlib.h' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
broken_assert_stdlib"
#
case "${file}" in ./sys/mman.h | \
./rpc/types.h )
- if ( test -a \
- -z "`egrep '\"C\"|__BEGIN_DECLS' ${file}`"
+ if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
cxx_unready"
#
- # 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 )
if ( test -n "`egrep '^#define UINT32_C\\(__c\\)[ ]*__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)' ${file}`"
#
- # Fix 38: Interactv_Add1
+ # Fix 39: Interactv_Add1
#
case "${file}" in ./stdio.h | \
./math.h | \
#
- # Fix 39: Interactv_Add2
+ # Fix 40: Interactv_Add2
#
case "${file}" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
#
- # Fix 40: Interactv_Add3
+ # Fix 41: Interactv_Add3
#
case "${file}" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
#
- # Fix 41: Io_Def_Quotes
+ # Fix 42: Io_Def_Quotes
#
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then
#
- # Fix 42: Ioctl_Fix_Ctrl
+ # Fix 43: Ioctl_Fix_Ctrl
#
if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`"
) > /dev/null 2>&1 ; then
#
- # Fix 43: Ip_Missing_Semi
+ # Fix 44: Ip_Missing_Semi
#
case "${file}" in ./netinet/ip.h )
+ if ( test -n "`egrep '}$' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
ip_missing_semi"
if [ ! -r ${DESTFILE} ]
< $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 44: Irix_Multiline_Cmnt
+ # Fix 45: Irix_Multiline_Cmnt
#
case "${file}" in ./sys/types.h )
fixlist="${fixlist}
#
- # Fix 45: Irix_Sockaddr
+ # Fix 46: Irix_Sockaddr
#
case "${file}" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
#
- # Fix 46: Irix_Struct__File
+ # Fix 47: Irix_Struct__File
#
case "${file}" in ./rpc/xdr.h )
fixlist="${fixlist}
#
- # Fix 47: Irix_Asm_Apostrophe
+ # Fix 48: Irix_Asm_Apostrophe
#
case "${file}" in ./sys/asm.h )
if ( test -n "`egrep '^[ ]*#.*[Ww]e'\\''re' ${file}`"
#
- # Fix 48: Isc_Fmod
+ # Fix 49: Isc_Fmod
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
#
- # Fix 49: Motorola_Nested
+ # Fix 50: Motorola_Nested
#
case "${file}" in ./limits.h | \
./sys/limits.h )
#
- # Fix 50: Isc_Sys_Limits
+ # Fix 51: Isc_Sys_Limits
#
case "${file}" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' ${file}`"
#
- # Fix 51: Kandr_Concat
+ # Fix 52: Kandr_Concat
#
case "${file}" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \
#
- # Fix 52: Limits_Ifndefs
+ # Fix 53: Limits_Ifndefs
#
case "${file}" in ./limits.h | \
./sys/limits.h )
- if ( test -a \
- -z "`egrep 'ifndef[ ]+FLT_MIN' ${file}`"
+ if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
limits_ifndefs"
#
- # Fix 53: Lynx_Void_Int
+ # Fix 54: Lynx_Void_Int
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`"
#
- # Fix 54: Lynxos_Fcntl_Proto
+ # Fix 55: Lynxos_Fcntl_Proto
#
case "${file}" in ./fcntl.h )
if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
#
- # Fix 55: M88k_Bad_Hypot_Opt
+ # Fix 56: M88k_Bad_Hypot_Opt
#
case "${file}" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
#
- # Fix 56: M88k_Bad_S_If
+ # Fix 57: M88k_Bad_S_If
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* )
#
- # Fix 57: M88k_Multi_Incl
+ # Fix 58: M88k_Multi_Incl
#
case "${file}" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* )
- if ( test -a \
- -z "`egrep '#ifndef' ${file}`"
+ if ( test -z "`egrep '#ifndef' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
m88k_multi_incl"
#
- # 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}`"
) > /dev/null 2>&1 ; then
#
- # Fix 59: Math_Exception
+ # Fix 60: Math_Exception
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'struct exception' ${file}`"
) > /dev/null 2>&1 ; then
+ if ( test -z "`egrep 'We have a problem when using C++' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
math_exception"
if [ ! -r ${DESTFILE} ]
#ifdef __cplusplus\
#undef exception\
#endif
-' \
- -e '/matherr/i\
-#ifdef __cplusplus\
-#define exception __math_exception\
-#endif
-' \
- -e '/matherr/a\
-#ifdef __cplusplus\
-#undef exception\
-#endif
' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${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 60: Math_Gcc_Ifndefs
+ # Fix 61: Math_Huge_Val_From_Dbl_Max
#
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}
- math_gcc_ifndefs"
+ math_huge_val_from_dbl_max"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
( dbl_max_def=`egrep 'define[ ]+DBL_MAX[ ]+.*' float.h 2>/dev/null`
- if ( test -n "${dbl_max_def}" \
- -a -n "`egrep '#define[ ]*HUGE_VAL[ ]+DBL_MAX' $file`" \
- -a -z "`egrep '#define[ ]+DBL_MAX[ ]+' $file`"
- ) > /dev/null 2>&1
- 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
+ if ( test -n "${dbl_max_def}" ) > /dev/null 2>&1
+ then sed -e '/define[ ]*HUGE_VAL[ ]*DBL_MAX/s/DBL_MAX/'"$dbl_max_def/"
+ else cat
+ fi ) < $infile > ${DESTDIR}/fixinc.tmp
# Shell scripts have the potential of removing the output
# We interpret that to mean the file is not to be altered
then continue ; fi
rm -f ${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
esac
#
- # Fix 61: Nested_Comment
+ # Fix 63: Nested_Comment
#
case "${file}" in ./rpc/rpc.h )
fixlist="${fixlist}
#
- # Fix 62: News_Os_Recursion
+ # Fix 64: News_Os_Recursion
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
#
- # Fix 63: Next_Math_Prefix
+ # Fix 65: Next_Math_Prefix
#
case "${file}" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
#
- # Fix 64: Next_Template
+ # Fix 66: Next_Template
#
case "${file}" in ./bsd/libc.h )
if ( test -n "`egrep 'template' ${file}`"
#
- # Fix 65: Next_Volitile
+ # Fix 67: Next_Volitile
#
case "${file}" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' ${file}`"
#
- # Fix 66: Next_Wait_Union
+ # Fix 68: Next_Wait_Union
#
case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' ${file}`"
#
- # Fix 67: Nodeent_Syntax
+ # Fix 69: Nodeent_Syntax
#
case "${file}" in ./netdnet/dnetdb.h )
fixlist="${fixlist}
#
- # Fix 68: Osf_Namespace_A
+ # Fix 70: Osf_Namespace_A
#
case "${file}" in ./reg_types.h | \
./sys/lc_core.h )
#
- # Fix 69: Osf_Namespace_B
+ # Fix 71: Osf_Namespace_B
#
case "${file}" in ./regex.h )
if ( test '(' -r reg_types.h ')' -a \
#
- # Fix 70: Pthread_Page_Size
+ # Fix 72: Pthread_Page_Size
#
case "${file}" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' ${file}`"
#
- # Fix 71: Read_Ret_Type
+ # Fix 73: Read_Ret_Type
#
case "${file}" in ./stdio.h )
if ( test -n "`egrep 'extern int .*, fread\\(\\), fwrite\\(\\)' ${file}`"
#
- # Fix 72: Rs6000_Double
+ # Fix 74: Rs6000_Double
#
case "${file}" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
#
- # Fix 73: Rs6000_Fchmod
+ # Fix 75: Rs6000_Fchmod
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' ${file}`"
#
- # Fix 74: Rs6000_Param
+ # Fix 76: Rs6000_Param
#
case "${file}" in ./stdio.h | \
./unistd.h )
+ if ( test -n "`egrep 'const char new' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
rs6000_param"
if [ ! -r ${DESTFILE} ]
< $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 75: Sony_Include
+ # Fix 77: Sony_Include
#
case "${file}" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`"
#
- # Fix 76: Statsswtch
+ # Fix 78: Statsswtch
#
case "${file}" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' ${file}`"
#
- # Fix 77: Stdio_Va_List
+ # Fix 79: Stdio_Va_List
#
case "${file}" in ./stdio.h )
+ if ( test -z "`egrep '__gnuc_va_list' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
stdio_va_list"
if [ ! -r ${DESTFILE} ]
then continue ; fi
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
+ fi # end of bypass 'if'
;; # case end for file name test
esac
#
- # Fix 78: Sun_Bogus_Ifdef
+ # Fix 80: Sun_Bogus_Ifdef
#
case "${file}" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h )
#
- # Fix 79: Sun_Bogus_Ifdef_Sun4c
+ # Fix 81: Sun_Bogus_Ifdef_Sun4c
#
case "${file}" in ./hsfs/hsnode.h )
if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`"
#
- # Fix 80: Sun_Catmacro
+ # Fix 82: Sun_Catmacro
#
case "${file}" in ./pixrect/memvar.h )
if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`"
#
- # Fix 81: Sun_Malloc
+ # Fix 83: Sun_Malloc
#
case "${file}" in ./malloc.h )
fixlist="${fixlist}
#
- # Fix 82: Sun_Memcpy
+ # Fix 84: Sun_Memcpy
#
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}`"
#
- # Fix 83: Sun_Rusers_Semi
+ # Fix 85: Sun_Rusers_Semi
#
case "${file}" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' ${file}`"
#
- # Fix 84: Sun_Signal
+ # Fix 86: Sun_Signal
#
case "${file}" in ./sys/signal.h | \
./signal.h )
#
- # Fix 85: Sun_Auth_Proto
+ # Fix 87: Sun_Auth_Proto
#
case "${file}" in ./rpc/auth.h | \
./rpc/clnt.h | \
#
- # Fix 86: Sunos_Matherr_Decl
+ # Fix 88: Sunos_Matherr_Decl
#
case "${file}" in ./math.h )
+ if ( test -z "`egrep 'matherr.*struct exception' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
sunos_matherr_decl"
if [ ! -r ${DESTFILE} ]
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
+ fi # end of bypass 'if'
;; # case end for file name test
esac
#
- # Fix 87: Sunos_Strlen
+ # Fix 89: Sunos_Strlen
#
case "${file}" in ./strings.h )
+ if ( test -n "`egrep 'int[ ]*strlen' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
sunos_strlen"
if [ ! -r ${DESTFILE} ]
< $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 88: Systypes
+ # Fix 90: Systypes
#
case "${file}" in ./sys/types.h | \
./stdlib.h | \
#
- # Fix 89: Systypes_For_Aix
+ # Fix 91: Systypes_For_Aix
#
case "${file}" in ./sys/types.h )
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`"
) > /dev/null 2>&1 ; then
- if ( test -a \
- -z "`egrep '_GCC_SIZE_T' ${file}`"
+ if ( test -z "`egrep '_GCC_SIZE_T' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
systypes_for_aix"
#
- # Fix 90: Sysv68_String
+ # Fix 92: Sysv68_String
#
case "${file}" in ./string.h )
fixlist="${fixlist}
#
- # Fix 91: Sysz_Stdlib_For_Sun
+ # Fix 93: Sysz_Stdlib_For_Sun
#
case "${file}" in ./stdlib.h )
fixlist="${fixlist}
#
- # Fix 92: Sysz_Stdtypes_For_Sun
+ # Fix 94: Sysz_Stdtypes_For_Sun
#
case "${file}" in ./sys/stdtypes.h )
fixlist="${fixlist}
#
- # Fix 93: Tinfo_Cplusplus
+ # Fix 95: Tinfo_Cplusplus
#
case "${file}" in ./tinfo.h )
+ if ( test -n "`egrep '[ ]_cplusplus' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
tinfo_cplusplus"
if [ ! -r ${DESTFILE} ]
< $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 94: Ultrix_Ansi_Compat
+ # Fix 96: Ultrix_Ansi_Compat
#
case "${file}" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
#
- # Fix 95: Ultrix_Fix_Fixproto
+ # Fix 97: Ultrix_Fix_Fixproto
#
case "${file}" in ./sys/utsname.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
#
- # Fix 96: Ultrix_Atof_Param
+ # Fix 98: Ultrix_Atof_Param
#
case "${file}" in ./math.h )
+ if ( test -n "`egrep 'atof\\([ ]*char' ${file}`"
+ ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
ultrix_atof_param"
if [ ! -r ${DESTFILE} ]
else infile=${DESTFILE} ; fi
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
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
+ fi # end of select 'if'
;; # case end for file name test
esac
#
- # Fix 97: Ultrix_Const
+ # Fix 99: Ultrix_Const
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
#
- # Fix 98: Ultrix_Ifdef
+ # Fix 100: Ultrix_Ifdef
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
#
- # Fix 99: Ultrix_Nested_Cmnt
+ # Fix 101: Ultrix_Nested_Cmnt
#
case "${file}" in ./rpc/svc.h )
fixlist="${fixlist}
#
- # Fix 100: Ultrix_Static
+ # Fix 102: Ultrix_Static
#
case "${file}" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
#
- # Fix 101: Undefine_Null
+ # Fix 103: Undefine_Null
#
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`"
) > /dev/null 2>&1 ; then
- if ( test -a \
- -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`"
+ if ( test -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
undefine_null"
#
- # Fix 102: Unixware7_Byteorder_Fix
+ # Fix 104: Unixware7_Byteorder_Fix
#
case "${file}" in ./arpa/inet.h )
case "$target_canonical" in *-*-sysv4* | \
#
- # Fix 103: Va_I960_Macro
+ # Fix 105: Va_I960_Macro
#
case "${file}" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`"
#
- # Fix 104: Void_Null
+ # Fix 106: Void_Null
#
case "${file}" in ./curses.h | \
./dbm.h | \
#
- # Fix 105: Vxworks_Gcc_Problem
+ # Fix 107: Vxworks_Gcc_Problem
#
case "${file}" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`"
#
- # Fix 106: Vxworks_Needs_Vxtypes
+ # Fix 108: Vxworks_Needs_Vxtypes
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`"
#
- # Fix 107: Vxworks_Needs_Vxworks
+ # Fix 109: Vxworks_Needs_Vxworks
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`"
#
- # Fix 108: Vxworks_Time
+ # Fix 110: Vxworks_Time
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`"
#
- # Fix 109: X11_Class
+ # Fix 111: X11_Class
#
case "${file}" in ./X11/ShellP.h )
- if ( test -a \
- -z "`egrep '__cplusplus' ${file}`"
+ if ( test -z "`egrep '__cplusplus' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
x11_class"
#
- # Fix 110: X11_Class_Usage
+ # Fix 112: X11_Class_Usage
#
case "${file}" in ./Xm/BaseClassI.h )
- if ( test -a \
- -z "`egrep '__cplusplus' ${file}`"
+ if ( test -z "`egrep '__cplusplus' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
x11_class_usage"
#
- # Fix 111: X11_New
+ # Fix 113: X11_New
#
case "${file}" in ./Xm/Traversal.h )
- if ( test -a \
- -z "`egrep '__cplusplus' ${file}`"
+ if ( test -z "`egrep '__cplusplus' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
x11_new"
#
- # Fix 112: X11_Sprintf
+ # Fix 114: X11_Sprintf
#
case "${file}" in ./X11*/Xmu.h )
fixlist="${fixlist}