OSDN Git Service

1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Dec 1999 21:49:30 +0000 (21:49 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Dec 1999 21:49:30 +0000 (21:49 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30999 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixfixes.c
gcc/fixinc/fixincl.c
gcc/fixinc/fixincl.sh
gcc/fixinc/fixincl.x
gcc/fixinc/fixtests.c
gcc/fixinc/genfixes
gcc/fixinc/hackshell.tpl
gcc/fixinc/inclhack.def
gcc/fixinc/inclhack.sh

index ed4ca73..923a839 100644 (file)
@@ -1,5 +1,40 @@
 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
        concatenation in system headers.  Affects C parser only.
        * c-parse.y, c-parse.c, c-parse.h: Rebuild.
index 737bc5b..e1e394d 100644 (file)
@@ -312,10 +312,6 @@ FIX_PROC_HEAD( else_endif_label_fix )
                   break;
                 }
 
-              /*
-                FIXME:  if this is a C++ file, then a double slash comment
-                is allowed to follow the directive.  */
-
               /* FALLTHROUGH */
 
             default:
index bf7d839..289e4ab 100644 (file)
@@ -114,6 +114,7 @@ typedef enum {
 } te_verbose;
 
 te_verbose  verbose_level = VERB_PROGRESS;
+int have_tty = 0;
 
 #define VLEVEL(l)  (verbose_level >= l)
 #define NOT_SILENT VLEVEL(VERB_FIXES)
@@ -192,6 +193,8 @@ main (argc, argv)
 
   initialize ();
 
+  have_tty = isatty (fileno (stderr));
+
   /* Before anything else, ensure we can allocate our file name buffer. */
   file_name_buf = load_file_data (stdin);
 
@@ -1336,7 +1339,7 @@ process ()
 #ifdef DO_STATS
   process_ct++;
 #endif
-  if (VLEVEL( VERB_PROGRESS ))
+  if (VLEVEL( VERB_PROGRESS ) && have_tty)
     fprintf (stderr, "%6d %-50s   \r", data_map_size, pz_curr_file );
 
   process_chain_head = NOPROCESS;
index ed4649b..e8ab8cb 100755 (executable)
@@ -6,7 +6,7 @@
 # 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.
 #
index a3e2d81..a23ad59 100644 (file)
@@ -5,7 +5,7 @@
  * 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.
  *
@@ -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
-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\
@@ -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
-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\
@@ -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
-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\
@@ -528,7 +562,9 @@ htons (unsigned int __arg)\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\
@@ -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
  */
-#define HPUX11_UINT32_C_FIXIDX           36
+#define HPUX11_UINT32_C_FIXIDX           37
 tSCC zHpux11_Uint32_CName[] =
      "Hpux11_Uint32_C";
 /*
@@ -1529,7 +1603,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed",
  *
  *  Description of Interactv_Add1 fix
  */
-#define INTERACTV_ADD1_FIXIDX            37
+#define INTERACTV_ADD1_FIXIDX            38
 tSCC zInteractv_Add1Name[] =
      "Interactv_Add1";
 /*
@@ -1567,7 +1641,7 @@ const char* apzInteractv_Add1Patch[] = { "sed",
  *
  *  Description of Interactv_Add2 fix
  */
-#define INTERACTV_ADD2_FIXIDX            38
+#define INTERACTV_ADD2_FIXIDX            39
 tSCC zInteractv_Add2Name[] =
      "Interactv_Add2";
 /*
@@ -1605,7 +1679,7 @@ const char* apzInteractv_Add2Patch[] = { "sed",
  *
  *  Description of Interactv_Add3 fix
  */
-#define INTERACTV_ADD3_FIXIDX            39
+#define INTERACTV_ADD3_FIXIDX            40
 tSCC zInteractv_Add3Name[] =
      "Interactv_Add3";
 /*
@@ -1644,7 +1718,7 @@ const char* apzInteractv_Add3Patch[] = { "sed",
  *
  *  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";
 /*
@@ -1681,7 +1755,7 @@ const char* apzIo_Def_QuotesPatch[] = { "sed",
  *
  *  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";
 /*
@@ -1720,7 +1794,7 @@ const char* apzIoctl_Fix_CtrlPatch[] = { "sed",
  *
  *  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";
 /*
@@ -1732,9 +1806,17 @@ tSCC zIp_Missing_SemiList[] =
  *  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
@@ -1747,7 +1829,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed",
  *
  *  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";
 /*
@@ -1775,7 +1857,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed",
  *
  *  Description of Irix_Sockaddr fix
  */
-#define IRIX_SOCKADDR_FIXIDX             44
+#define IRIX_SOCKADDR_FIXIDX             45
 tSCC zIrix_SockaddrName[] =
      "Irix_Sockaddr";
 /*
@@ -1811,7 +1893,7 @@ struct sockaddr;\n",
  *
  *  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";
 /*
@@ -1839,7 +1921,7 @@ struct __file_s;\n",
  *
  *  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";
 /*
@@ -1874,7 +1956,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed",
  *
  *  Description of Isc_Fmod fix
  */
-#define ISC_FMOD_FIXIDX                  47
+#define ISC_FMOD_FIXIDX                  48
 tSCC zIsc_FmodName[] =
      "Isc_Fmod";
 /*
@@ -1909,7 +1991,7 @@ const char* apzIsc_FmodPatch[] = { "sed",
  *
  *  Description of Motorola_Nested fix
  */
-#define MOTOROLA_NESTED_FIXIDX           48
+#define MOTOROLA_NESTED_FIXIDX           49
 tSCC zMotorola_NestedName[] =
      "Motorola_Nested";
 /*
@@ -1939,7 +2021,7 @@ const char* apzMotorola_NestedPatch[] = { "sed",
  *
  *  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";
 /*
@@ -1975,7 +2057,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed",
  *
  *  Description of Kandr_Concat fix
  */
-#define KANDR_CONCAT_FIXIDX              50
+#define KANDR_CONCAT_FIXIDX              51
 tSCC zKandr_ConcatName[] =
      "Kandr_Concat";
 /*
@@ -2010,7 +2092,7 @@ const char* apzKandr_ConcatPatch[] = { "sed",
  *
  *  Description of Limits_Ifndefs fix
  */
-#define LIMITS_IFNDEFS_FIXIDX            51
+#define LIMITS_IFNDEFS_FIXIDX            52
 tSCC zLimits_IfndefsName[] =
      "Limits_Ifndefs";
 /*
@@ -2069,7 +2151,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2104,7 +2186,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2139,7 +2221,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2181,7 +2263,7 @@ static __inline__ double fake_hypot (x, y)\\\n\
  *
  *  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";
 /*
@@ -2219,7 +2301,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2261,7 +2343,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
  *
  *  Description of Machine_Name fix
  */
-#define MACHINE_NAME_FIXIDX              57
+#define MACHINE_NAME_FIXIDX              58
 tSCC zMachine_NameName[] =
      "Machine_Name";
 /*
@@ -2331,7 +2413,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\
  *
  *  Description of Math_Exception fix
  */
-#define MATH_EXCEPTION_FIXIDX            58
+#define MATH_EXCEPTION_FIXIDX            59
 tSCC zMath_ExceptionName[] =
      "Math_Exception";
 /*
@@ -2350,9 +2432,16 @@ tSCC zMath_ExceptionList[] =
 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 }, };
 
 /*
@@ -2367,60 +2456,98 @@ const char* apzMath_ExceptionPatch[] = { "sed",
 #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";
 /*
@@ -2447,7 +2574,7 @@ const char* apzNested_CommentPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2485,7 +2612,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2524,7 +2651,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed",
  *
  *  Description of Next_Template fix
  */
-#define NEXT_TEMPLATE_FIXIDX             63
+#define NEXT_TEMPLATE_FIXIDX             65
 tSCC zNext_TemplateName[] =
      "Next_Template";
 /*
@@ -2560,7 +2687,7 @@ const char* apzNext_TemplatePatch[] = { "sed",
  *
  *  Description of Next_Volitile fix
  */
-#define NEXT_VOLITILE_FIXIDX             64
+#define NEXT_VOLITILE_FIXIDX             66
 tSCC zNext_VolitileName[] =
      "Next_Volitile";
 /*
@@ -2596,7 +2723,7 @@ const char* apzNext_VolitilePatch[] = { "sed",
  *
  *  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";
 /*
@@ -2631,7 +2758,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed",
  *
  *  Description of Nodeent_Syntax fix
  */
-#define NODEENT_SYNTAX_FIXIDX            66
+#define NODEENT_SYNTAX_FIXIDX            68
 tSCC zNodeent_SyntaxName[] =
      "Nodeent_Syntax";
 /*
@@ -2658,7 +2785,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed",
  *
  *  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";
 /*
@@ -2704,7 +2831,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed",
  *
  *  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";
 /*
@@ -2751,7 +2878,7 @@ typedef __regmatch_t\tregmatch_t;\n",
  *
  *  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";
 /*
@@ -2786,7 +2913,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed",
  *
  *  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";
 /*
@@ -2822,7 +2949,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed",
  *
  *  Description of Rs6000_Double fix
  */
-#define RS6000_DOUBLE_FIXIDX             71
+#define RS6000_DOUBLE_FIXIDX             73
 tSCC zRs6000_DoubleName[] =
      "Rs6000_Double";
 /*
@@ -2860,7 +2987,7 @@ const char* apzRs6000_DoublePatch[] = { "sed",
  *
  *  Description of Rs6000_Fchmod fix
  */
-#define RS6000_FCHMOD_FIXIDX             72
+#define RS6000_FCHMOD_FIXIDX             74
 tSCC zRs6000_FchmodName[] =
      "Rs6000_Fchmod";
 /*
@@ -2895,7 +3022,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed",
  *
  *  Description of Rs6000_Param fix
  */
-#define RS6000_PARAM_FIXIDX              73
+#define RS6000_PARAM_FIXIDX              75
 tSCC zRs6000_ParamName[] =
      "Rs6000_Param";
 /*
@@ -2907,9 +3034,17 @@ tSCC zRs6000_ParamList[] =
  *  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
@@ -2922,7 +3057,7 @@ const char* apzRs6000_ParamPatch[] = { "sed",
  *
  *  Description of Sony_Include fix
  */
-#define SONY_INCLUDE_FIXIDX              74
+#define SONY_INCLUDE_FIXIDX              76
 tSCC zSony_IncludeName[] =
      "Sony_Include";
 /*
@@ -2957,7 +3092,7 @@ const char* apzSony_IncludePatch[] = { "sed",
  *
  *  Description of Statsswtch fix
  */
-#define STATSSWTCH_FIXIDX                75
+#define STATSSWTCH_FIXIDX                77
 tSCC zStatsswtchName[] =
      "Statsswtch";
 /*
@@ -2992,7 +3127,7 @@ const char* apzStatsswtchPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3004,9 +3139,17 @@ tSCC zStdio_Va_ListList[] =
  *  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
@@ -3036,7 +3179,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c",
  *
  *  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";
 /*
@@ -3071,7 +3214,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3106,7 +3249,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
  *
  *  Description of Sun_Catmacro fix
  */
-#define SUN_CATMACRO_FIXIDX              79
+#define SUN_CATMACRO_FIXIDX              81
 tSCC zSun_CatmacroName[] =
      "Sun_Catmacro";
 /*
@@ -3146,7 +3289,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
  *
  *  Description of Sun_Malloc fix
  */
-#define SUN_MALLOC_FIXIDX                80
+#define SUN_MALLOC_FIXIDX                82
 tSCC zSun_MallocName[] =
      "Sun_Malloc";
 /*
@@ -3176,7 +3319,7 @@ const char* apzSun_MallocPatch[] = { "sed",
  *
  *  Description of Sun_Memcpy fix
  */
-#define SUN_MEMCPY_FIXIDX                81
+#define SUN_MEMCPY_FIXIDX                83
 tSCC zSun_MemcpyName[] =
      "Sun_Memcpy";
 /*
@@ -3231,7 +3374,7 @@ extern int memcmp();\\\n\
  *
  *  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";
 /*
@@ -3266,7 +3409,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
  *
  *  Description of Sun_Signal fix
  */
-#define SUN_SIGNAL_FIXIDX                83
+#define SUN_SIGNAL_FIXIDX                85
 tSCC zSun_SignalName[] =
      "Sun_Signal";
 /*
@@ -3306,7 +3449,7 @@ void\t(*signal(...))(...);\\\n\
  *
  *  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";
 /*
@@ -3346,7 +3489,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3358,9 +3501,17 @@ tSCC zSunos_Matherr_DeclList[] =
  *  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
@@ -3375,7 +3526,7 @@ struct exception;\n",
  *
  *  Description of Sunos_Strlen fix
  */
-#define SUNOS_STRLEN_FIXIDX              86
+#define SUNOS_STRLEN_FIXIDX              88
 tSCC zSunos_StrlenName[] =
      "Sunos_Strlen";
 /*
@@ -3387,9 +3538,17 @@ tSCC zSunos_StrlenList[] =
  *  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
@@ -3402,7 +3561,7 @@ const char* apzSunos_StrlenPatch[] = { "sed",
  *
  *  Description of Systypes fix
  */
-#define SYSTYPES_FIXIDX                  87
+#define SYSTYPES_FIXIDX                  89
 tSCC zSystypesName[] =
      "Systypes";
 /*
@@ -3461,7 +3620,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
  *
  *  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";
 /*
@@ -3507,7 +3666,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed",
  *
  *  Description of Sysv68_String fix
  */
-#define SYSV68_STRING_FIXIDX             89
+#define SYSV68_STRING_FIXIDX             91
 tSCC zSysv68_StringName[] =
      "Sysv68_String";
 /*
@@ -3544,7 +3703,7 @@ extern unsigned int\\\n\
  *
  *  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";
 /*
@@ -3582,7 +3741,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3623,7 +3782,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
  *
  *  Description of Tinfo_Cplusplus fix
  */
-#define TINFO_CPLUSPLUS_FIXIDX           92
+#define TINFO_CPLUSPLUS_FIXIDX           94
 tSCC zTinfo_CplusplusName[] =
      "Tinfo_Cplusplus";
 /*
@@ -3635,9 +3794,17 @@ tSCC zTinfo_CplusplusList[] =
  *  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
@@ -3650,7 +3817,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3687,7 +3854,7 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3723,7 +3890,7 @@ struct utsname;\n",
  *
  *  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";
 /*
@@ -3735,26 +3902,30 @@ tSCC zUltrix_Atof_ParamList[] =
  *  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";
 /*
@@ -3789,7 +3960,7 @@ const char* apzUltrix_ConstPatch[] = { "sed",
  *
  *  Description of Ultrix_Ifdef fix
  */
-#define ULTRIX_IFDEF_FIXIDX              97
+#define ULTRIX_IFDEF_FIXIDX              99
 tSCC zUltrix_IfdefName[] =
      "Ultrix_Ifdef";
 /*
@@ -3824,7 +3995,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3851,7 +4022,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed",
  *
  *  Description of Ultrix_Static fix
  */
-#define ULTRIX_STATIC_FIXIDX             99
+#define ULTRIX_STATIC_FIXIDX             101
 tSCC zUltrix_StaticName[] =
      "Ultrix_Static";
 /*
@@ -3888,7 +4059,7 @@ const char* apzUltrix_StaticPatch[] = { "sed",
  *
  *  Description of Undefine_Null fix
  */
-#define UNDEFINE_NULL_FIXIDX             100
+#define UNDEFINE_NULL_FIXIDX             102
 tSCC zUndefine_NullName[] =
      "Undefine_Null";
 /*
@@ -3930,7 +4101,7 @@ const char* apzUndefine_NullPatch[] = { "sed",
  *
  *  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";
 /*
@@ -3973,7 +4144,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed",
  *
  *  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";
 /*
@@ -4011,7 +4182,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed",
  *
  *  Description of Void_Null fix
  */
-#define VOID_NULL_FIXIDX                 103
+#define VOID_NULL_FIXIDX                 105
 tSCC zVoid_NullName[] =
      "Void_Null";
 /*
@@ -4046,7 +4217,7 @@ const char* apzVoid_NullPatch[] = { "sed",
  *
  *  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";
 /*
@@ -4096,7 +4267,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
  *
  *  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";
 /*
@@ -4131,7 +4302,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed",
  *
  *  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";
 /*
@@ -4180,7 +4351,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
  *
  *  Description of Vxworks_Time fix
  */
-#define VXWORKS_TIME_FIXIDX              107
+#define VXWORKS_TIME_FIXIDX              109
 tSCC zVxworks_TimeName[] =
      "Vxworks_Time";
 /*
@@ -4231,7 +4402,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\
  *
  *  Description of X11_Class fix
  */
-#define X11_CLASS_FIXIDX                 108
+#define X11_CLASS_FIXIDX                 110
 tSCC zX11_ClassName[] =
      "X11_Class";
 /*
@@ -4271,7 +4442,7 @@ const char* apzX11_ClassPatch[] = { "sed",
  *
  *  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";
 /*
@@ -4306,7 +4477,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed",
  *
  *  Description of X11_New fix
  */
-#define X11_NEW_FIXIDX                   110
+#define X11_NEW_FIXIDX                   112
 tSCC zX11_NewName[] =
      "X11_New";
 /*
@@ -4347,7 +4518,7 @@ const char* apzX11_NewPatch[] = { "sed",
  *
  *  Description of X11_Sprintf fix
  */
-#define X11_SPRINTF_FIXIDX               111
+#define X11_SPRINTF_FIXIDX               113
 tSCC zX11_SprintfName[] =
      "X11_Sprintf";
 /*
@@ -4376,9 +4547,9 @@ extern char *\tsprintf();\\\n\
  *
  *  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,
@@ -4416,20 +4587,20 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      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,
@@ -4561,6 +4732,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      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,
@@ -4676,10 +4852,15 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      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,
index 4ee9e86..1c21c04 100644 (file)
@@ -106,8 +106,10 @@ skip_quote( q, text )
   return text;
 }
 
-
-TEST_FOR_FIX_PROC_HEAD( double_slash_test )
+static apply_fix_p_t
+is_cxx_header (fname, text)
+     const char *fname;
+     const char *text;
 {
   /*  First, check to see if the file is in a C++ directory */
   if (strstr( fname, "CC/" ) != NULL)
@@ -116,9 +118,19 @@ TEST_FOR_FIX_PROC_HEAD( double_slash_test )
     return SKIP_FIX;
   if (strstr( fname, "++" ) != NULL)
     return SKIP_FIX;
+  /* Or it might contain the phrase 'extern "C++"' */
   if (strstr( text, "extern \"C++\"" ) != NULL)
     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 */
   for (;;)
     {
@@ -167,6 +179,7 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
   char ch;
   const char* pz_next = (char*)NULL;
   regmatch_t match[2];
+  const char *all_text = text;
 
   /*
      This routine may be run many times within a single execution.
@@ -266,10 +279,15 @@ TEST_FOR_FIX_PROC_HEAD( else_endif_label_test )
                   pz_next += 2;
                   break;
                 }
-
-              /*
-                FIXME:  if this is a C++ file, then a double slash comment
-                is allowed to follow the directive.  */
+             else if (*pz_next == '/'
+                      && is_cxx_header( fname, all_text ) == SKIP_FIX)
+               {
+                 pz_next = strchr( pz_next+1, '\n' );
+                 if (pz_next == (char*)NULL)
+                   return SKIP_FIX;
+                 pz_next++;
+                 break;
+               }
 
               /* FALLTHROUGH */
 
index 305231f..dbee891 100755 (executable)
@@ -63,9 +63,9 @@ fi
 set -e
 
 case "$1" in
-inclhack.def )
+inclhack.sh )
   echo AutoGen-ing inclhack.sh
-  $AG inclhack.sh
+  $AG inclhack.def
   ;;
 
 fixincl.x )
index 83fb27c..5910b35 100644 (file)
@@ -59,8 +59,8 @@ _FOR fix "\n\n" =]
 
     _IF bypass _exist =]
     if ( test [=
-            _FOR bypass=] -a \
-              -z [=bypass _shrstr "#`egrep %s ${file}`"
+            _FOR bypass " -a \\\n              "
+              =]-z [=bypass _shrstr "#`egrep %s ${file}`"
                             _printf _shstr =][=
             /bypass=]
        ) > /dev/null 2>&1 ; then[=
index d1633cf..cc8248a 100644 (file)
@@ -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 = {
-    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
@@ -170,20 +171,21 @@ fix = {
      */
     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
 
@@ -197,7 +199,7 @@ fix = {
  *  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*';
 
@@ -209,20 +211,20 @@ fix = {
      */
     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
 
@@ -236,7 +238,7 @@ fix = {
  *  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*';
 
@@ -248,24 +250,24 @@ fix = {
      */
     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
 
@@ -357,8 +359,8 @@ htons (unsigned int __arg)
   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__
@@ -853,6 +855,20 @@ fix = {
     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:
@@ -980,6 +996,7 @@ fix = {
 fix = {
     hackname = ip_missing_semi;
     files    = netinet/ip.h;
+    select   = "}$";
     sed      = "/^struct/,/^};/s/}$/};/";
 };
 
@@ -1326,6 +1343,7 @@ fix = {
     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"
@@ -1335,6 +1353,7 @@ fix = {
                "#undef exception\\\n"
                "#endif\n";
 
+#ifdef MATH_EXCEPTION_FIXED
     sed      = "/matherr/i\\\n"
                "#ifdef __cplusplus\\\n"
                "#define exception __math_exception\\\n"
@@ -1345,14 +1364,21 @@ fix = {
                "#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
@@ -1396,46 +1422,43 @@ enough to have '#ifdef __cplusplus' anywhere in the file?
 #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
@@ -1626,6 +1649,7 @@ fix = {
     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)@';
@@ -1708,6 +1732,7 @@ fix = {
 fix = {
     hackname = stdio_va_list;
     files    = stdio.h;
+    bypass   = "__gnuc_va_list";
 
     /*
      * Use __gnuc_va_list in arg types in place of va_list.
@@ -1907,6 +1932,8 @@ fix = {
 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.
@@ -1922,6 +1949,7 @@ fix = {
 fix = {
     hackname = sunos_strlen;
     files    = strings.h;
+    select   = "int[ \t]*strlen";
     sed = "s/int[ \t]*strlen();/__SIZE_TYPE__ strlen();/";
 };
 
@@ -2314,9 +2342,9 @@ fix = {
 
 
 /*
- *  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;
@@ -2334,8 +2362,9 @@ fix = {
 
 
 /*
- *  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;
@@ -2410,13 +2439,13 @@ 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.
+ *  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/";
 };
 
@@ -2448,17 +2477,13 @@ fix = {
 
 /*
  *  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]*) {.*}@@";
 };
 
 
index 2210b4a..dac216d 100755 (executable)
@@ -6,7 +6,7 @@
 # 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.
 #
@@ -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 "$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
@@ -541,6 +551,7 @@ _EOF_
 _EOF_
     continue
 
+    fi # end of bypass 'if'
     ;; # case end for machine type test
     esac
     ;; # case end for file name test
@@ -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 "$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
@@ -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 "$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
@@ -683,7 +712,9 @@ htons (unsigned int __arg)
   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__
@@ -1069,8 +1100,7 @@ struct rusage;
     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"
@@ -1096,8 +1126,7 @@ struct rusage;
     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"
@@ -1291,8 +1320,7 @@ extern "C"\
     #
     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"
@@ -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 )
     if ( test -n "`egrep '^#define UINT32_C\\(__c\\)[  ]*__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)' ${file}`"
@@ -1385,7 +1437,7 @@ extern "C" {\
 
 
     #
-    # Fix  38:  Interactv_Add1
+    # Fix  39:  Interactv_Add1
     #
     case "${file}" in ./stdio.h | \
        ./math.h | \
@@ -1412,7 +1464,7 @@ extern "C" {\
 
 
     #
-    # Fix  39:  Interactv_Add2
+    # Fix  40:  Interactv_Add2
     #
     case "${file}" in ./math.h )
     if ( test '('  -d /etc/conf/kconfig.d ')' -a \
@@ -1434,7 +1486,7 @@ extern "C" {\
 
 
     #
-    # Fix  40:  Interactv_Add3
+    # Fix  41:  Interactv_Add3
     #
     case "${file}" in ./sys/limits.h )
     if ( test '('  -d /etc/conf/kconfig.d ')' -a \
@@ -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}`"
        ) > /dev/null 2>&1 ; then
@@ -1478,7 +1530,7 @@ extern "C" {\
 
 
     #
-    # Fix  42:  Ioctl_Fix_Ctrl
+    # Fix  43:  Ioctl_Fix_Ctrl
     #
     if ( test -n "`egrep 'CTRL[        ]*\\(' ${file}`"
        ) > /dev/null 2>&1 ; then
@@ -1501,9 +1553,11 @@ extern "C" {\
 
 
     #
-    # 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} ]
@@ -1514,12 +1568,13 @@ extern "C" {\
           < $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}
@@ -1538,7 +1593,7 @@ extern "C" {\
 
 
     #
-    # Fix  45:  Irix_Sockaddr
+    # Fix  46:  Irix_Sockaddr
     #
     case "${file}" in ./rpc/auth.h )
     if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
@@ -1561,7 +1616,7 @@ struct sockaddr;
 
 
     #
-    # Fix  46:  Irix_Struct__File
+    # Fix  47:  Irix_Struct__File
     #
     case "${file}" in ./rpc/xdr.h )
     fixlist="${fixlist}
@@ -1581,7 +1636,7 @@ struct __file_s;
 
 
     #
-    # Fix  47:  Irix_Asm_Apostrophe
+    # Fix  48:  Irix_Asm_Apostrophe
     #
     case "${file}" in ./sys/asm.h )
     if ( test -n "`egrep '^[   ]*#.*[Ww]e'\\''re' ${file}`"
@@ -1602,7 +1657,7 @@ struct __file_s;
 
 
     #
-    # Fix  48:  Isc_Fmod
+    # Fix  49:  Isc_Fmod
     #
     case "${file}" in ./math.h )
     if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
@@ -1623,7 +1678,7 @@ struct __file_s;
 
 
     #
-    # Fix  49:  Motorola_Nested
+    # Fix  50:  Motorola_Nested
     #
     case "${file}" in ./limits.h | \
        ./sys/limits.h )
@@ -1646,7 +1701,7 @@ struct __file_s;
 
 
     #
-    # Fix  50:  Isc_Sys_Limits
+    # Fix  51:  Isc_Sys_Limits
     #
     case "${file}" in ./sys/limits.h )
     if ( test -n "`egrep 'CHILD_MAX' ${file}`"
@@ -1668,7 +1723,7 @@ struct __file_s;
 
 
     #
-    # Fix  51:  Kandr_Concat
+    # Fix  52:  Kandr_Concat
     #
     case "${file}" in ./sparc/asm_linkage.h | \
        ./sun3/asm_linkage.h | \
@@ -1706,12 +1761,11 @@ struct __file_s;
 
 
     #
-    # 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"
@@ -1765,7 +1819,7 @@ struct __file_s;
 
 
     #
-    # Fix  53:  Lynx_Void_Int
+    # Fix  54:  Lynx_Void_Int
     #
     case "${file}" in ./curses.h )
     if ( test -n "`egrep '#[   ]*define[       ]+void[         ]+int' ${file}`"
@@ -1786,7 +1840,7 @@ struct __file_s;
 
 
     #
-    # Fix  54:  Lynxos_Fcntl_Proto
+    # Fix  55:  Lynxos_Fcntl_Proto
     #
     case "${file}" in ./fcntl.h )
     if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
@@ -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 "$target_canonical" in m88k-motorola-sysv3* )
@@ -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 "$target_canonical" in m88k-*-sysv3* )
@@ -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 "$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"
@@ -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}`"
        ) > /dev/null 2>&1 ; then
@@ -1953,11 +2006,13 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # 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} ]
@@ -1974,46 +2029,34 @@ s/\\+++fixinc_eol+++/\\/g
 #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
@@ -2022,12 +2065,40 @@ s/\\+++fixinc_eol+++/\\/g
     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}
@@ -2045,7 +2116,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  62:  News_Os_Recursion
+    # Fix  64:  News_Os_Recursion
     #
     case "${file}" in ./stdlib.h )
     if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
@@ -2071,7 +2142,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  63:  Next_Math_Prefix
+    # Fix  65:  Next_Math_Prefix
     #
     case "${file}" in ./ansi/math.h )
     if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
@@ -2096,7 +2167,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  64:  Next_Template
+    # Fix  66:  Next_Template
     #
     case "${file}" in ./bsd/libc.h )
     if ( test -n "`egrep 'template' ${file}`"
@@ -2118,7 +2189,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  65:  Next_Volitile
+    # Fix  67:  Next_Volitile
     #
     case "${file}" in ./ansi/stdlib.h )
     if ( test -n "`egrep 'volatile' ${file}`"
@@ -2140,7 +2211,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  66:  Next_Wait_Union
+    # Fix  68:  Next_Wait_Union
     #
     case "${file}" in ./sys/wait.h )
     if ( test -n "`egrep 'wait\\(union wait' ${file}`"
@@ -2161,7 +2232,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  67:  Nodeent_Syntax
+    # Fix  69:  Nodeent_Syntax
     #
     case "${file}" in ./netdnet/dnetdb.h )
     fixlist="${fixlist}
@@ -2179,7 +2250,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  68:  Osf_Namespace_A
+    # Fix  70:  Osf_Namespace_A
     #
     case "${file}" in ./reg_types.h | \
        ./sys/lc_core.h )
@@ -2206,7 +2277,7 @@ s/\\+++fixinc_eol+++/\\/g
 
 
     #
-    # Fix  69:  Osf_Namespace_B
+    # Fix  71:  Osf_Namespace_B
     #
     case "${file}" in ./regex.h )
     if ( test '('  -r reg_types.h ')' -a \
@@ -2234,7 +2305,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  70:  Pthread_Page_Size
+    # Fix  72:  Pthread_Page_Size
     #
     case "${file}" in ./pthread.h )
     if ( test -n "`egrep '^int __page_size' ${file}`"
@@ -2255,7 +2326,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  71:  Read_Ret_Type
+    # Fix  73:  Read_Ret_Type
     #
     case "${file}" in ./stdio.h )
     if ( test -n "`egrep 'extern int   .*, fread\\(\\), fwrite\\(\\)' ${file}`"
@@ -2277,7 +2348,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  72:  Rs6000_Double
+    # Fix  74:  Rs6000_Double
     #
     case "${file}" in ./math.h )
     if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
@@ -2303,7 +2374,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  73:  Rs6000_Fchmod
+    # Fix  75:  Rs6000_Fchmod
     #
     case "${file}" in ./sys/stat.h )
     if ( test -n "`egrep 'fchmod\\(char' ${file}`"
@@ -2324,10 +2395,12 @@ typedef __regmatch_t    regmatch_t;
 
 
     #
-    # 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} ]
@@ -2338,12 +2411,13 @@ typedef __regmatch_t    regmatch_t;
           < $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}`"
@@ -2364,7 +2438,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  76:  Statsswtch
+    # Fix  78:  Statsswtch
     #
     case "${file}" in ./rpcsvc/rstat.h )
     if ( test -n "`egrep 'boottime$' ${file}`"
@@ -2385,9 +2459,11 @@ typedef __regmatch_t     regmatch_t;
 
 
     #
-    # 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} ]
@@ -2419,12 +2495,13 @@ typedef __regmatch_t    regmatch_t;
     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 )
@@ -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 )
     if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`"
@@ -2467,7 +2544,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  80:  Sun_Catmacro
+    # Fix  82:  Sun_Catmacro
     #
     case "${file}" in ./pixrect/memvar.h )
     if ( test -n "`egrep '^#define[    ]+CAT\\(a,b\\)' ${file}`"
@@ -2495,7 +2572,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # Fix  81:  Sun_Malloc
+    # Fix  83:  Sun_Malloc
     #
     case "${file}" in ./malloc.h )
     fixlist="${fixlist}
@@ -2516,7 +2593,7 @@ typedef __regmatch_t      regmatch_t;
 
 
     #
-    # 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}`"
@@ -2558,7 +2635,7 @@ extern int memcmp();\
 
 
     #
-    # Fix  83:  Sun_Rusers_Semi
+    # Fix  85:  Sun_Rusers_Semi
     #
     case "${file}" in ./rpcsvc/rusers.h )
     if ( test -n "`egrep '_cnt$' ${file}`"
@@ -2579,7 +2656,7 @@ extern int memcmp();\
 
 
     #
-    # Fix  84:  Sun_Signal
+    # Fix  86:  Sun_Signal
     #
     case "${file}" in ./sys/signal.h | \
        ./signal.h )
@@ -2608,7 +2685,7 @@ void      (*signal(...))(...);\
 
 
     #
-    # Fix  85:  Sun_Auth_Proto
+    # Fix  87:  Sun_Auth_Proto
     #
     case "${file}" in ./rpc/auth.h | \
        ./rpc/clnt.h | \
@@ -2637,9 +2714,11 @@ void     (*signal(...))(...);\
 
 
     #
-    # 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} ]
@@ -2653,14 +2732,17 @@ struct exception;
           < $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} ]
@@ -2671,12 +2753,13 @@ struct exception;
           < $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 | \
@@ -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 )
     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"
@@ -2761,7 +2843,7 @@ typedef __SIZE_TYPE__ size_t;\
 
 
     #
-    # Fix  90:  Sysv68_String
+    # Fix  92:  Sysv68_String
     #
     case "${file}" in ./string.h )
     fixlist="${fixlist}
@@ -2789,7 +2871,7 @@ extern unsigned int\
 
 
     #
-    # Fix  91:  Sysz_Stdlib_For_Sun
+    # Fix  93:  Sysz_Stdlib_For_Sun
     #
     case "${file}" in ./stdlib.h )
     fixlist="${fixlist}
@@ -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 )
     fixlist="${fixlist}
@@ -2858,9 +2940,11 @@ extern unsigned int\
 
 
     #
-    # 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} ]
@@ -2871,12 +2955,13 @@ extern unsigned int\
           < $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}`"
@@ -2900,7 +2985,7 @@ extern unsigned int\
 
 
     #
-    # Fix  95:  Ultrix_Fix_Fixproto
+    # Fix  97:  Ultrix_Fix_Fixproto
     #
     case "${file}" in ./sys/utsname.h )
     if ( test -n "`egrep 'ULTRIX' ${file}`"
@@ -2923,9 +3008,11 @@ struct utsname;
 
 
     #
-    # 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} ]
@@ -2933,19 +3020,16 @@ struct utsname;
     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}
@@ -2971,7 +3055,7 @@ struct utsname;
 
 
     #
-    # Fix  98:  Ultrix_Ifdef
+    # Fix 100:  Ultrix_Ifdef
     #
     case "${file}" in ./sys/file.h )
     if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
@@ -2992,7 +3076,7 @@ struct utsname;
 
 
     #
-    # Fix  99:  Ultrix_Nested_Cmnt
+    # Fix 101:  Ultrix_Nested_Cmnt
     #
     case "${file}" in ./rpc/svc.h )
     fixlist="${fixlist}
@@ -3010,7 +3094,7 @@ struct utsname;
 
 
     #
-    # Fix 100:  Ultrix_Static
+    # Fix 102:  Ultrix_Static
     #
     case "${file}" in ./machine/cpu.h )
     if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
@@ -3033,12 +3117,11 @@ struct utsname;
 
 
     #
-    # 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"
@@ -3057,7 +3140,7 @@ struct utsname;
 
 
     #
-    # Fix 102:  Unixware7_Byteorder_Fix
+    # Fix 104:  Unixware7_Byteorder_Fix
     #
     case "${file}" in ./arpa/inet.h )
     case "$target_canonical" in *-*-sysv4* | \
@@ -3087,7 +3170,7 @@ struct utsname;
 
 
     #
-    # 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}`"
@@ -3111,7 +3194,7 @@ struct utsname;
 
 
     #
-    # Fix 104:  Void_Null
+    # Fix 106:  Void_Null
     #
     case "${file}" in ./curses.h | \
        ./dbm.h | \
@@ -3142,7 +3225,7 @@ struct utsname;
 
 
     #
-    # 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}`"
@@ -3184,7 +3267,7 @@ struct utsname;
 
 
     #
-    # 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}`"
@@ -3205,7 +3288,7 @@ struct utsname;
 
 
     #
-    # Fix 107:  Vxworks_Needs_Vxworks
+    # Fix 109:  Vxworks_Needs_Vxworks
     #
     case "${file}" in ./sys/stat.h )
     if ( test -n "`egrep '#[   ]define[        ][      ]*__INCstath' ${file}`"
@@ -3233,7 +3316,7 @@ struct utsname;
 
 
     #
-    # Fix 108:  Vxworks_Time
+    # Fix 110:  Vxworks_Time
     #
     case "${file}" in ./time.h )
     if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`"
@@ -3267,11 +3350,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
 
 
     #
-    # 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"
@@ -3296,11 +3378,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
 
 
     #
-    # 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"
@@ -3318,11 +3399,10 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
 
 
     #
-    # 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"
@@ -3348,7 +3428,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
 
 
     #
-    # Fix 112:  X11_Sprintf
+    # Fix 114:  X11_Sprintf
     #
     case "${file}" in ./X11*/Xmu.h )
     fixlist="${fixlist}