Commit 79589c4d by Bruce Korb

added several "test_text" attributes; changed several fixes to use `c_fix = format'

and  re-alphabetized the fixes

From-SVN: r33930
parent 789f3ce3
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
*** inc/curses.h *** inc/curses.h
--- res/curses.h --- res/curses.h
*************** ***************
*** 1,11 **** *** 1,16 ****
#ifndef AVOID_BOOL_CHECK #ifndef AVOID_BOOL_CHECK
...@@ -140,7 +140,12 @@ ...@@ -140,7 +140,12 @@
#ifndef BAD_STRUCT_TERM_CHECK #ifndef BAD_STRUCT_TERM_CHECK
! typedef struct term; ! typedef struct term;
#endif /* BAD_STRUCT_TERM_CHECK */ #endif /* BAD_STRUCT_TERM_CHECK */
--- 1,15 ----
#ifndef LYNX_VOID_INT_CHECK
! # define void int /* curses foiled again */
#endif /* LYNX_VOID_INT_CHECK */
--- 1,20 ----
#ifndef AVOID_BOOL_CHECK #ifndef AVOID_BOOL_CHECK
...@@ -156,6 +161,41 @@ ...@@ -156,6 +161,41 @@
#ifndef BAD_STRUCT_TERM_CHECK #ifndef BAD_STRUCT_TERM_CHECK
! struct term; ! struct term;
#endif /* BAD_STRUCT_TERM_CHECK */ #endif /* BAD_STRUCT_TERM_CHECK */
#ifndef LYNX_VOID_INT_CHECK
! /* curses foiled again */
#endif /* LYNX_VOID_INT_CHECK */
*** inc/fcntl.h
--- res/fcntl.h
***************
*** 1,5 ****
#ifndef LYNXOS_FCNTL_PROTO_CHECK
! extern int fcntl(int, int, int);
#endif /* LYNXOS_FCNTL_PROTO_CHECK */
--- 1,5 ----
#ifndef LYNXOS_FCNTL_PROTO_CHECK
! extern int fcntl(int, int, ...);
#endif /* LYNXOS_FCNTL_PROTO_CHECK */
*** inc/inttypes.h
--- res/inttypes.h
***************
*** 2,6 ****
#ifndef HPUX11_UINT32_C_CHECK
#define CONCAT_U__(__c) __CONCAT__(__c,u)
! #define UINT32_C(__c) __CONCAT__(__CONCAT_U__(__c),l)
#endif /* HPUX11_UINT32_C_CHECK */
--- 2,6 ----
#ifndef HPUX11_UINT32_C_CHECK
#define CONCAT_U__(__c) __CONCAT__(__c,u)
! #define UINT32_C(__c) __CONCAT__(__c,ul)
#endif /* HPUX11_UINT32_C_CHECK */
*** inc/libgen.h *** inc/libgen.h
--- res/libgen.h --- res/libgen.h
*************** ***************
...@@ -173,10 +213,22 @@ ...@@ -173,10 +213,22 @@
! #define something _FOOsomething ! #define something _FOOsomething
#define mumble _FOOmumble #define mumble _FOOmumble
#endif /* BAD_LVAL_CHECK */ #endif /* BAD_LVAL_CHECK */
*** inc/limits.h
--- res/limits.h
***************
*** 1,5 ****
--- 1,7 ----
#ifndef LIMITS_IFNDEFS_CHECK
+ #ifndef DBL_DIG
# define DBL_DIG 0 /* somthin' */
+ #endif
#endif /* LIMITS_IFNDEFS_CHECK */
*** inc/math.h *** inc/math.h
--- res/math.h --- res/math.h
*************** ***************
*** 1,10 **** *** 1,35 ****
#ifndef BROKEN_CABS_CHECK #ifndef BROKEN_CABS_CHECK
...@@ -187,7 +239,32 @@ ...@@ -187,7 +239,32 @@
#endif #endif
#endif /* BROKEN_CABS_CHECK */ #endif /* BROKEN_CABS_CHECK */
--- 1,14 ----
#ifndef FIX_HEADER_BREAKAGE_CHECK
! extern double floor(), ceil(), fmod(), fabs();
#endif /* FIX_HEADER_BREAKAGE_CHECK */
#ifndef HPUX8_BOGUS_INLINES_CHECK
! inline int abs(int v) { return (v>=0)?v:-v; }
! inline double sqr(double v) { return v**0.5; }
#endif /* HPUX8_BOGUS_INLINES_CHECK */
#ifndef ISC_FMOD_CHECK
! extern double fmod(double);
#endif /* ISC_FMOD_CHECK */
#ifndef M88K_BAD_HYPOT_OPT_CHECK
extern double hypot();
#endif /* M88K_BAD_HYPOT_OPT_CHECK */
#ifndef MATH_EXCEPTION_CHECK
typedef struct exception t_math_exception;
#endif /* MATH_EXCEPTION_CHECK */
--- 1,56 ----
+ #ifndef FIXINC_MATH_EXCEPTION_CHECK + #ifndef FIXINC_MATH_EXCEPTION_CHECK
+ #define FIXINC_MATH_EXCEPTION_CHECK 1 + #define FIXINC_MATH_EXCEPTION_CHECK 1
+ +
...@@ -202,9 +279,40 @@ ...@@ -202,9 +279,40 @@
#endif #endif
#endif /* BROKEN_CABS_CHECK */ #endif /* BROKEN_CABS_CHECK */
***************
*** 12,14 **** #ifndef FIX_HEADER_BREAKAGE_CHECK
--- 16,23 ---- ! extern double floor(), ceil(), fmod(), fabs _PARAMS((double));
#endif /* FIX_HEADER_BREAKAGE_CHECK */
#ifndef HPUX8_BOGUS_INLINES_CHECK
! extern "C" int abs(int);
!
#endif /* HPUX8_BOGUS_INLINES_CHECK */
#ifndef ISC_FMOD_CHECK
! extern double fmod(double, double);
#endif /* ISC_FMOD_CHECK */
#ifndef M88K_BAD_HYPOT_OPT_CHECK
extern double hypot();
+ /* Workaround a stupid Motorola optimization if one
+ of x or y is 0.0 and the other is negative! */
+ #ifdef __STDC__
+ static __inline__ double fake_hypot (double x, double y)
+ #else
+ static __inline__ double fake_hypot (x, y)
+ double x, y;
+ #endif
+ {
+ return fabs (hypot (x, y));
+ }
+ #define hypot fake_hypot
#endif /* M88K_BAD_HYPOT_OPT_CHECK */
#ifndef MATH_EXCEPTION_CHECK #ifndef MATH_EXCEPTION_CHECK
typedef struct exception t_math_exception; typedef struct exception t_math_exception;
#endif /* MATH_EXCEPTION_CHECK */ #endif /* MATH_EXCEPTION_CHECK */
...@@ -213,6 +321,77 @@ ...@@ -213,6 +321,77 @@
+ #endif + #endif
+ +
+ #endif /* FIXINC_MATH_EXCEPTION_CHECK */ + #endif /* FIXINC_MATH_EXCEPTION_CHECK */
*** inc/netinet/ip.h
--- res/netinet/ip.h
***************
*** 4,10 ****
struct mumble {
union {
int x;
! }
}; /* mumbled struct */
#endif /* IP_MISSING_SEMI_CHECK */
--- 4,10 ----
struct mumble {
union {
int x;
! };
}; /* mumbled struct */
#endif /* IP_MISSING_SEMI_CHECK */
*** inc/rpc/auth.h
--- res/rpc/auth.h
***************
*** 1,5 ****
--- 1,6 ----
#ifndef STRUCT_SOCKADDR_CHECK
+ struct sockaddr;
extern AUTH* authdes_create( struct sockaddr* );
#endif /* STRUCT_SOCKADDR_CHECK */
*** inc/rpc/rpc.h
--- res/rpc/rpc.h
***************
*** 1,5 ****
#ifndef NESTED_AUTH_DES_CHECK
! /*#include <rpc/auth_des.h> /* skip this */
#endif /* NESTED_AUTH_DES_CHECK */
--- 1,5 ----
#ifndef NESTED_AUTH_DES_CHECK
! /*#include <rpc/auth_des.h> */ /* skip this */
#endif /* NESTED_AUTH_DES_CHECK */
*** inc/rpc/xdr.h
--- res/rpc/xdr.h
***************
*** 1,5 ****
--- 1,6 ----
#ifndef STRUCT_FILE_CHECK
+ struct __file_s;
extern void xdrstdio_create( struct __file_s* );
#endif /* STRUCT_FILE_CHECK */
*** inc/sparc/asm_linkage.h
--- res/sparc/asm_linkage.h
***************
*** 1,5 ****
#ifndef KANDR_CONCAT_CHECK
! #define __CONCAT__(a,b) a/**/b
#endif /* KANDR_CONCAT_CHECK */
--- 1,5 ----
#ifndef KANDR_CONCAT_CHECK
! #define __CONCAT__(a,b) a##b
#endif /* KANDR_CONCAT_CHECK */
*** inc/stdio.h *** inc/stdio.h
--- res/stdio.h --- res/stdio.h
*************** ***************
...@@ -327,6 +506,21 @@ ...@@ -327,6 +506,21 @@
extern int foo; extern int foo;
#endif #endif
#endif /* ALPHA_PARENS_CHECK */ #endif /* ALPHA_PARENS_CHECK */
*** inc/sys/asm.h
--- res/sys/asm.h
***************
*** 1,5 ****
#ifndef IRIX_ASM_APOSTROPHE_CHECK
! # and we're on vacation
#endif /* IRIX_ASM_APOSTROPHE_CHECK */
--- 1,5 ----
#ifndef IRIX_ASM_APOSTROPHE_CHECK
! # and we are on vacation
#endif /* IRIX_ASM_APOSTROPHE_CHECK */
*** inc/sys/file.h *** inc/sys/file.h
--- res/sys/file.h --- res/sys/file.h
*************** ***************
...@@ -342,6 +536,25 @@ ...@@ -342,6 +536,25 @@
#ifndef HP_SYSFILE_CHECK #ifndef HP_SYSFILE_CHECK
! extern void foo(struct file *, ...); /* HPUX_SOURCE - bad varargs */ ! extern void foo(struct file *, ...); /* HPUX_SOURCE - bad varargs */
#endif /* HP_SYSFILE_CHECK */ #endif /* HP_SYSFILE_CHECK */
*** inc/sys/limits.h
--- res/sys/limits.h
***************
*** 2,8 ****
#ifndef NESTED_SYS_LIMITS_CHECK
/*
! #define CHILD_MAX 20 /* Max, Max, ... */ /*
! #define OPEN_MAX 20 /* Max, Max, ... */
#endif /* NESTED_SYS_LIMITS_CHECK */
--- 2,8 ----
#ifndef NESTED_SYS_LIMITS_CHECK
/*
! #define CHILD_MAX 20 Max, Max, ... */ /*
! #define OPEN_MAX 20 Max, Max, ... */
#endif /* NESTED_SYS_LIMITS_CHECK */
*** inc/sys/mman.h *** inc/sys/mman.h
--- res/sys/mman.h --- res/sys/mman.h
*************** ***************
...@@ -426,6 +639,21 @@ ...@@ -426,6 +639,21 @@
# include "../machine/dontfix.h" # include "../machine/dontfix.h"
! # include <machine/psl.h> ! # include <machine/psl.h>
#endif /* HP_INLINE_CHECK */ #endif /* HP_INLINE_CHECK */
*** inc/sys/stat.h
--- res/sys/stat.h
***************
*** 1,5 ****
#ifndef M88K_BAD_S_IF_CHECK
! #define S_ISREG(m) (m & S_IFREG) /* is regular? */
#endif /* M88K_BAD_S_IF_CHECK */
--- 1,5 ----
#ifndef M88K_BAD_S_IF_CHECK
! #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* is regular? */
#endif /* M88K_BAD_S_IF_CHECK */
*** inc/sys/time.h *** inc/sys/time.h
--- res/sys/time.h --- res/sys/time.h
*************** ***************
...@@ -441,6 +669,23 @@ ...@@ -441,6 +669,23 @@
#ifndef HPUX_SYSTIME_CHECK #ifndef HPUX_SYSTIME_CHECK
! struct sigevent; ! struct sigevent;
#endif /* HPUX_SYSTIME_CHECK */ #endif /* HPUX_SYSTIME_CHECK */
*** inc/sys/types.h
--- res/sys/types.h
***************
*** 1,6 ****
#ifndef IRIX_MULTILINE_CMNT_CHECK
! /* we check the type of the result
! // of the sizeof something. This is a bad test :-( */
#endif /* IRIX_MULTILINE_CMNT_CHECK */
--- 1,6 ----
#ifndef IRIX_MULTILINE_CMNT_CHECK
! /* we check the type of the result */
! // /* of the sizeof something. This is a bad test :-( */
#endif /* IRIX_MULTILINE_CMNT_CHECK */
*** inc/sys/wait.h *** inc/sys/wait.h
--- res/sys/wait.h --- res/sys/wait.h
*************** ***************
......
...@@ -21,7 +21,7 @@ export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE VERBOSE ...@@ -21,7 +21,7 @@ export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE VERBOSE
mkdir ${DESTDIR} ${SRCDIR} mkdir ${DESTDIR} ${SRCDIR}
( cd ${SRCDIR} ( cd ${SRCDIR}
mkdir sys X11 Xm sundev sunwindow ) mkdir netinet rpc sparc sundev sunwindow sys X11 Xm )
[= [=
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a * files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search. * directory that GNU C will search.
* *
* This file contains 118 fixup descriptions. * This file contains 119 fixup descriptions.
* *
* See README-fixinc for more information. * See README-fixinc for more information.
* *
...@@ -1085,9 +1085,44 @@ const char* apzAvoid_BoolPatch[] = { "sed", ...@@ -1085,9 +1085,44 @@ const char* apzAvoid_BoolPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Bad_Lval fix
*/
#define BAD_LVAL_FIXIDX 22
tSCC zBad_LvalName[] =
"bad_lval";
/*
* File name selection pattern
*/
tSCC zBad_LvalList[] =
"|libgen.h|dirent.h|ftw.h|grp.h|ndbm.h|pthread.h|pwd.h|signal.h|standards.h|stdlib.h|string.h|stropts.h|time.h|unistd.h|";
/*
* Machine/OS name selection pattern
*/
#define apzBad_LvalMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zBad_LvalSelect0[] =
"^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
#define BAD_LVAL_TEST_CT 1
tTestDesc aBad_LvalTests[] = {
{ TT_EGREP, zBad_LvalSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Bad_Lval
*/
const char* apzBad_LvalPatch[] = { "sed",
"-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Bad_Struct_Term fix * Description of Bad_Struct_Term fix
*/ */
#define BAD_STRUCT_TERM_FIXIDX 22 #define BAD_STRUCT_TERM_FIXIDX 23
tSCC zBad_Struct_TermName[] = tSCC zBad_Struct_TermName[] =
"bad_struct_term"; "bad_struct_term";
...@@ -1122,7 +1157,7 @@ const char* apzBad_Struct_TermPatch[] = { "sed", ...@@ -1122,7 +1157,7 @@ const char* apzBad_Struct_TermPatch[] = { "sed",
* *
* Description of Badquote fix * Description of Badquote fix
*/ */
#define BADQUOTE_FIXIDX 23 #define BADQUOTE_FIXIDX 24
tSCC zBadquoteName[] = tSCC zBadquoteName[] =
"badquote"; "badquote";
...@@ -1147,41 +1182,6 @@ const char* apzBadquotePatch[] = { "sed", ...@@ -1147,41 +1182,6 @@ const char* apzBadquotePatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Bad_Lval fix
*/
#define BAD_LVAL_FIXIDX 24
tSCC zBad_LvalName[] =
"bad_lval";
/*
* File name selection pattern
*/
tSCC zBad_LvalList[] =
"|libgen.h|dirent.h|ftw.h|grp.h|ndbm.h|pthread.h|pwd.h|signal.h|standards.h|stdlib.h|string.h|stropts.h|time.h|unistd.h|";
/*
* Machine/OS name selection pattern
*/
#define apzBad_LvalMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zBad_LvalSelect0[] =
"^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
#define BAD_LVAL_TEST_CT 1
tTestDesc aBad_LvalTests[] = {
{ TT_EGREP, zBad_LvalSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Bad_Lval
*/
const char* apzBad_LvalPatch[] = { "sed",
"-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Broken_Assert_Stdio fix * Description of Broken_Assert_Stdio fix
*/ */
#define BROKEN_ASSERT_STDIO_FIXIDX 25 #define BROKEN_ASSERT_STDIO_FIXIDX 25
...@@ -1306,258 +1306,293 @@ const char* apzBroken_CabsPatch[] = { "sed", ...@@ -1306,258 +1306,293 @@ const char* apzBroken_CabsPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Dec_Intern_Asm fix * Description of Ctrl_Quotes_Def fix
*/ */
#define DEC_INTERN_ASM_FIXIDX 28 #define CTRL_QUOTES_DEF_FIXIDX 28
tSCC zDec_Intern_AsmName[] = tSCC zCtrl_Quotes_DefName[] =
"dec_intern_asm"; "ctrl_quotes_def";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zDec_Intern_AsmList[] = #define zCtrl_Quotes_DefList (char*)NULL
"|c_asm.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzDec_Intern_AsmMachs (const char**)NULL #define apzCtrl_Quotes_DefMachs (const char**)NULL
#define DEC_INTERN_ASM_TEST_CT 0
#define aDec_Intern_AsmTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Dec_Intern_Asm * content selection pattern - do fix if pattern found
*/ */
const char* apzDec_Intern_AsmPatch[] = { "sed", tSCC zCtrl_Quotes_DefSelect0[] =
"-e", "/^[ \t]*float[ \t]*fasm/i\\\n\ "define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
#ifdef __DECC\n",
"-e", "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n\ #define CTRL_QUOTES_DEF_TEST_CT 1
#endif\n", tTestDesc aCtrl_Quotes_DefTests[] = {
{ TT_EGREP, zCtrl_Quotes_DefSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_Quotes_Def
*/
const char* apzCtrl_Quotes_DefPatch[] = {
"char_macro_def",
"CTRL",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ecd_Cursor fix * Description of Ctrl_Quotes_Use fix
*/ */
#define ECD_CURSOR_FIXIDX 29 #define CTRL_QUOTES_USE_FIXIDX 29
tSCC zEcd_CursorName[] = tSCC zCtrl_Quotes_UseName[] =
"ecd_cursor"; "ctrl_quotes_use";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zEcd_CursorList[] = #define zCtrl_Quotes_UseList (char*)NULL
"|sunwindow/win_lock.h|sunwindow/win_cursor.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzEcd_CursorMachs (const char**)NULL #define apzCtrl_Quotes_UseMachs (const char**)NULL
#define ECD_CURSOR_TEST_CT 0
#define aEcd_CursorTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Ecd_Cursor * content selection pattern - do fix if pattern found
*/ */
const char* apzEcd_CursorPatch[] = { "sed", tSCC zCtrl_Quotes_UseSelect0[] =
"-e", "s/ecd.cursor/ecd_cursor/", "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
#define CTRL_QUOTES_USE_TEST_CT 1
tTestDesc aCtrl_Quotes_UseTests[] = {
{ TT_EGREP, zCtrl_Quotes_UseSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_Quotes_Use
*/
const char* apzCtrl_Quotes_UsePatch[] = {
"char_macro_use",
"CTRL",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hp_Inline fix * Description of Cxx_Unready fix
*/ */
#define HP_INLINE_FIXIDX 30 #define CXX_UNREADY_FIXIDX 30
tSCC zHp_InlineName[] = tSCC zCxx_UnreadyName[] =
"hp_inline"; "cxx_unready";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zHp_InlineList[] = tSCC zCxx_UnreadyList[] =
"|sys/spinlock.h|"; "|sys/mman.h|rpc/types.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzHp_InlineMachs (const char**)NULL #define apzCxx_UnreadyMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zHp_InlineSelect0[] = tSCC zCxx_UnreadySelect0[] =
"include.*\"\\.\\./machine/"; "[^#]+malloc.*;";
#define HP_INLINE_TEST_CT 1 /*
tTestDesc aHp_InlineTests[] = { * content bypass pattern - skip fix if pattern found
{ TT_EGREP, zHp_InlineSelect0, (regex_t*)NULL }, }; */
tSCC zCxx_UnreadyBypass0[] =
"\"C\"|__BEGIN_DECLS";
#define CXX_UNREADY_TEST_CT 2
tTestDesc aCxx_UnreadyTests[] = {
{ TT_NEGREP, zCxx_UnreadyBypass0, (regex_t*)NULL },
{ TT_EGREP, zCxx_UnreadySelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Hp_Inline * Fix Command Arguments for Cxx_Unready
*/ */
const char* apzHp_InlinePatch[] = { "sed", const char* apzCxx_UnreadyPatch[] = {
"-e", "s,\"../machine/inline.h\",<machine/inline.h>,", "wrap",
"-e", "s,\"../machine/psl.h\",<machine/psl.h>,", "#ifdef __cplusplus\n\
extern \"C\" {\n\
#endif\n",
"#ifdef __cplusplus\n\
}\n\
#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hp_Sysfile fix * Description of Dec_Intern_Asm fix
*/ */
#define HP_SYSFILE_FIXIDX 31 #define DEC_INTERN_ASM_FIXIDX 31
tSCC zHp_SysfileName[] = tSCC zDec_Intern_AsmName[] =
"hp_sysfile"; "dec_intern_asm";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zHp_SysfileList[] = tSCC zDec_Intern_AsmList[] =
"|sys/file.h|"; "|c_asm.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzHp_SysfileMachs (const char**)NULL #define apzDec_Intern_AsmMachs (const char**)NULL
#define DEC_INTERN_ASM_TEST_CT 0
#define aDec_Intern_AsmTests (tTestDesc*)NULL
/* /*
* content selection pattern - do fix if pattern found * Fix Command Arguments for Dec_Intern_Asm
*/ */
tSCC zHp_SysfileSelect0[] = const char* apzDec_Intern_AsmPatch[] = { "sed",
"HPUX_SOURCE"; "-e", "/^[ \t]*float[ \t]*fasm/i\\\n\
#ifdef __DECC\n",
"-e", "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n\
#endif\n",
(char*)NULL };
#define HP_SYSFILE_TEST_CT 1 /* * * * * * * * * * * * * * * * * * * * * * * * * *
tTestDesc aHp_SysfileTests[] = { *
{ TT_EGREP, zHp_SysfileSelect0, (regex_t*)NULL }, }; * Description of Ecd_Cursor fix
*/
#define ECD_CURSOR_FIXIDX 32
tSCC zEcd_CursorName[] =
"ecd_cursor";
/* /*
* Fix Command Arguments for Hp_Sysfile * File name selection pattern
*/ */
const char* apzHp_SysfilePatch[] = { "sed", tSCC zEcd_CursorList[] =
"-e", "s/(\\.\\.\\.)/(struct file *, ...)/", "|sunwindow/win_lock.h|sunwindow/win_cursor.h|";
/*
* Machine/OS name selection pattern
*/
#define apzEcd_CursorMachs (const char**)NULL
#define ECD_CURSOR_TEST_CT 0
#define aEcd_CursorTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Ecd_Cursor
*/
const char* apzEcd_CursorPatch[] = { "sed",
"-e", "s/ecd.cursor/ecd_cursor/",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Cxx_Unready fix * Description of Fix_Header_Breakage fix
*/ */
#define CXX_UNREADY_FIXIDX 32 #define FIX_HEADER_BREAKAGE_FIXIDX 33
tSCC zCxx_UnreadyName[] = tSCC zFix_Header_BreakageName[] =
"cxx_unready"; "fix_header_breakage";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zCxx_UnreadyList[] = tSCC zFix_Header_BreakageList[] =
"|sys/mman.h|rpc/types.h|"; "|math.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzCxx_UnreadyMachs (const char**)NULL tSCC* apzFix_Header_BreakageMachs[] = {
"m88k-motorola-sysv3*",
(const char*)NULL };
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zCxx_UnreadySelect0[] = tSCC zFix_Header_BreakageSelect0[] =
"[^#]+malloc.*;"; "extern double floor\\(\\), ceil\\(\\), fmod\\(\\), fabs\\(\\);";
/* #define FIX_HEADER_BREAKAGE_TEST_CT 1
* content bypass pattern - skip fix if pattern found tTestDesc aFix_Header_BreakageTests[] = {
*/ { TT_EGREP, zFix_Header_BreakageSelect0, (regex_t*)NULL }, };
tSCC zCxx_UnreadyBypass0[] =
"\"C\"|__BEGIN_DECLS";
#define CXX_UNREADY_TEST_CT 2
tTestDesc aCxx_UnreadyTests[] = {
{ TT_NEGREP, zCxx_UnreadyBypass0, (regex_t*)NULL },
{ TT_EGREP, zCxx_UnreadySelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Cxx_Unready * Fix Command Arguments for Fix_Header_Breakage
*/ */
const char* apzCxx_UnreadyPatch[] = { const char* apzFix_Header_BreakagePatch[] = {
"wrap", "format",
"#ifdef __cplusplus\n\ "extern double floor(), ceil(), fmod(), fabs _PARAMS((double));",
extern \"C\" {\n\
#endif\n",
"#ifdef __cplusplus\n\
}\n\
#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hpux_Maxint fix * Description of Hp_Inline fix
*/ */
#define HPUX_MAXINT_FIXIDX 33 #define HP_INLINE_FIXIDX 34
tSCC zHpux_MaxintName[] = tSCC zHp_InlineName[] =
"hpux_maxint"; "hp_inline";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zHpux_MaxintList[] = tSCC zHp_InlineList[] =
"|sys/param.h|"; "|sys/spinlock.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzHpux_MaxintMachs (const char**)NULL #define apzHp_InlineMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zHpux_MaxintSelect0[] = tSCC zHp_InlineSelect0[] =
"^#[ \t]*define[ \t]*MAXINT[ \t]"; "include.*\"\\.\\./machine/";
#define HPUX_MAXINT_TEST_CT 1 #define HP_INLINE_TEST_CT 1
tTestDesc aHpux_MaxintTests[] = { tTestDesc aHp_InlineTests[] = {
{ TT_EGREP, zHpux_MaxintSelect0, (regex_t*)NULL }, }; { TT_EGREP, zHp_InlineSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Hpux_Maxint * Fix Command Arguments for Hp_Inline
*/ */
const char* apzHpux_MaxintPatch[] = { "sed", const char* apzHp_InlinePatch[] = { "sed",
"-e", "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n\ "-e", "s,\"../machine/inline.h\",<machine/inline.h>,",
#ifndef MAXINT\n", "-e", "s,\"../machine/psl.h\",<machine/psl.h>,",
"-e", "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n\
#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hpux_Systime fix * Description of Hp_Sysfile fix
*/ */
#define HPUX_SYSTIME_FIXIDX 34 #define HP_SYSFILE_FIXIDX 35
tSCC zHpux_SystimeName[] = tSCC zHp_SysfileName[] =
"hpux_systime"; "hp_sysfile";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zHpux_SystimeList[] = tSCC zHp_SysfileList[] =
"|sys/time.h|"; "|sys/file.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzHpux_SystimeMachs (const char**)NULL #define apzHp_SysfileMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zHpux_SystimeSelect0[] = tSCC zHp_SysfileSelect0[] =
"^extern struct sigevent;"; "HPUX_SOURCE";
#define HPUX_SYSTIME_TEST_CT 1 #define HP_SYSFILE_TEST_CT 1
tTestDesc aHpux_SystimeTests[] = { tTestDesc aHp_SysfileTests[] = {
{ TT_EGREP, zHpux_SystimeSelect0, (regex_t*)NULL }, }; { TT_EGREP, zHp_SysfileSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Hpux_Systime * Fix Command Arguments for Hp_Sysfile
*/ */
const char* apzHpux_SystimePatch[] = { "sed", const char* apzHp_SysfilePatch[] = { "sed",
"-e", "s/^extern struct sigevent;/struct sigevent;/", "-e", "s/(\\.\\.\\.)/(struct file *, ...)/",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Hpux8_Bogus_Inlines fix * Description of Hpux8_Bogus_Inlines fix
*/ */
#define HPUX8_BOGUS_INLINES_FIXIDX 35 #define HPUX8_BOGUS_INLINES_FIXIDX 36
tSCC zHpux8_Bogus_InlinesName[] = tSCC zHpux8_Bogus_InlinesName[] =
"hpux8_bogus_inlines"; "hpux8_bogus_inlines";
...@@ -1595,7 +1630,7 @@ const char* apzHpux8_Bogus_InlinesPatch[] = { "sed", ...@@ -1595,7 +1630,7 @@ const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
* *
* Description of Hpux11_Uint32_C fix * Description of Hpux11_Uint32_C fix
*/ */
#define HPUX11_UINT32_C_FIXIDX 36 #define HPUX11_UINT32_C_FIXIDX 37
tSCC zHpux11_Uint32_CName[] = tSCC zHpux11_Uint32_CName[] =
"hpux11_uint32_c"; "hpux11_uint32_c";
...@@ -1622,15 +1657,16 @@ tTestDesc aHpux11_Uint32_CTests[] = { ...@@ -1622,15 +1657,16 @@ tTestDesc aHpux11_Uint32_CTests[] = {
/* /*
* Fix Command Arguments for Hpux11_Uint32_C * Fix Command Arguments for Hpux11_Uint32_C
*/ */
const char* apzHpux11_Uint32_CPatch[] = { "sed", const char* apzHpux11_Uint32_CPatch[] = {
"-e", "s/^#define UINT32_C(__c)\\([ \t]*\\)__CONCAT__(__CONCAT_U__(__c),l)/#define UINT32_C(__c)\\1__CONCAT__(__c,ul)/", "format",
"#define UINT32_C(__c) __CONCAT__(__c,ul)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Isc_Omits_With_Stdc fix * Description of Isc_Omits_With_Stdc fix
*/ */
#define ISC_OMITS_WITH_STDC_FIXIDX 37 #define ISC_OMITS_WITH_STDC_FIXIDX 38
tSCC zIsc_Omits_With_StdcName[] = tSCC zIsc_Omits_With_StdcName[] =
"isc_omits_with_stdc"; "isc_omits_with_stdc";
...@@ -1657,15 +1693,16 @@ tTestDesc aIsc_Omits_With_StdcTests[] = { ...@@ -1657,15 +1693,16 @@ tTestDesc aIsc_Omits_With_StdcTests[] = {
/* /*
* Fix Command Arguments for Isc_Omits_With_Stdc * Fix Command Arguments for Isc_Omits_With_Stdc
*/ */
const char* apzIsc_Omits_With_StdcPatch[] = { "sed", const char* apzIsc_Omits_With_StdcPatch[] = {
"-e", "s/!defined(__STDC__) && !defined(_POSIX_SOURCE)/!defined(_POSIX_SOURCE)/", "format",
"!defined(_POSIX_SOURCE)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Io_Quotes_Def fix * Description of Io_Quotes_Def fix
*/ */
#define IO_QUOTES_DEF_FIXIDX 38 #define IO_QUOTES_DEF_FIXIDX 39
tSCC zIo_Quotes_DefName[] = tSCC zIo_Quotes_DefName[] =
"io_quotes_def"; "io_quotes_def";
...@@ -1700,7 +1737,7 @@ const char* apzIo_Quotes_DefPatch[] = { ...@@ -1700,7 +1737,7 @@ const char* apzIo_Quotes_DefPatch[] = {
* *
* Description of Io_Quotes_Use fix * Description of Io_Quotes_Use fix
*/ */
#define IO_QUOTES_USE_FIXIDX 39 #define IO_QUOTES_USE_FIXIDX 40
tSCC zIo_Quotes_UseName[] = tSCC zIo_Quotes_UseName[] =
"io_quotes_use"; "io_quotes_use";
...@@ -1733,213 +1770,117 @@ const char* apzIo_Quotes_UsePatch[] = { ...@@ -1733,213 +1770,117 @@ const char* apzIo_Quotes_UsePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ctrl_Quotes_Def fix * Description of Hpux_Maxint fix
*/
#define CTRL_QUOTES_DEF_FIXIDX 40
tSCC zCtrl_Quotes_DefName[] =
"ctrl_quotes_def";
/*
* File name selection pattern
*/
#define zCtrl_Quotes_DefList (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzCtrl_Quotes_DefMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zCtrl_Quotes_DefSelect0[] =
"define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
#define CTRL_QUOTES_DEF_TEST_CT 1
tTestDesc aCtrl_Quotes_DefTests[] = {
{ TT_EGREP, zCtrl_Quotes_DefSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_Quotes_Def
*/
const char* apzCtrl_Quotes_DefPatch[] = {
"char_macro_def",
"CTRL",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Ctrl_Quotes_Use fix
*/
#define CTRL_QUOTES_USE_FIXIDX 41
tSCC zCtrl_Quotes_UseName[] =
"ctrl_quotes_use";
/*
* File name selection pattern
*/
#define zCtrl_Quotes_UseList (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzCtrl_Quotes_UseMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zCtrl_Quotes_UseSelect0[] =
"define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
#define CTRL_QUOTES_USE_TEST_CT 1
tTestDesc aCtrl_Quotes_UseTests[] = {
{ TT_EGREP, zCtrl_Quotes_UseSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_Quotes_Use
*/
const char* apzCtrl_Quotes_UsePatch[] = {
"char_macro_use",
"CTRL",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Ip_Missing_Semi fix
*/ */
#define IP_MISSING_SEMI_FIXIDX 42 #define HPUX_MAXINT_FIXIDX 41
tSCC zIp_Missing_SemiName[] = tSCC zHpux_MaxintName[] =
"ip_missing_semi"; "hpux_maxint";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zIp_Missing_SemiList[] = tSCC zHpux_MaxintList[] =
"|netinet/ip.h|"; "|sys/param.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzIp_Missing_SemiMachs (const char**)NULL #define apzHpux_MaxintMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zIp_Missing_SemiSelect0[] = tSCC zHpux_MaxintSelect0[] =
"}$"; "^#[ \t]*define[ \t]*MAXINT[ \t]";
#define IP_MISSING_SEMI_TEST_CT 1 #define HPUX_MAXINT_TEST_CT 1
tTestDesc aIp_Missing_SemiTests[] = { tTestDesc aHpux_MaxintTests[] = {
{ TT_EGREP, zIp_Missing_SemiSelect0, (regex_t*)NULL }, }; { TT_EGREP, zHpux_MaxintSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ip_Missing_Semi
*/
const char* apzIp_Missing_SemiPatch[] = { "sed",
"-e", "/^struct/,/^};/s/}$/};/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Irix_Multiline_Cmnt fix
*/
#define IRIX_MULTILINE_CMNT_FIXIDX 43
tSCC zIrix_Multiline_CmntName[] =
"irix_multiline_cmnt";
/*
* File name selection pattern
*/
tSCC zIrix_Multiline_CmntList[] =
"|sys/types.h|";
/*
* Machine/OS name selection pattern
*/
#define apzIrix_Multiline_CmntMachs (const char**)NULL
#define IRIX_MULTILINE_CMNT_TEST_CT 0
#define aIrix_Multiline_CmntTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Irix_Multiline_Cmnt * Fix Command Arguments for Hpux_Maxint
*/ */
const char* apzIrix_Multiline_CmntPatch[] = { "sed", const char* apzHpux_MaxintPatch[] = { "sed",
"-e", "s@type of the result@type of the result */@", "-e", "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n\
"-e", "s@of the sizeof@/* of the sizeof@", #ifndef MAXINT\n",
"-e", "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n\
#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Irix_Sockaddr fix * Description of Hpux_Systime fix
*/ */
#define IRIX_SOCKADDR_FIXIDX 44 #define HPUX_SYSTIME_FIXIDX 42
tSCC zIrix_SockaddrName[] = tSCC zHpux_SystimeName[] =
"irix_sockaddr"; "hpux_systime";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zIrix_SockaddrList[] = tSCC zHpux_SystimeList[] =
"|rpc/auth.h|"; "|sys/time.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzIrix_SockaddrMachs (const char**)NULL #define apzHpux_SystimeMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zIrix_SockaddrSelect0[] = tSCC zHpux_SystimeSelect0[] =
"authdes_create.*struct sockaddr"; "^extern struct sigevent;";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zIrix_SockaddrBypass0[] =
"<sys/socket.h>";
#define IRIX_SOCKADDR_TEST_CT 2 #define HPUX_SYSTIME_TEST_CT 1
tTestDesc aIrix_SockaddrTests[] = { tTestDesc aHpux_SystimeTests[] = {
{ TT_NEGREP, zIrix_SockaddrBypass0, (regex_t*)NULL }, { TT_EGREP, zHpux_SystimeSelect0, (regex_t*)NULL }, };
{ TT_EGREP, zIrix_SockaddrSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Irix_Sockaddr * Fix Command Arguments for Hpux_Systime
*/ */
const char* apzIrix_SockaddrPatch[] = { "sed", const char* apzHpux_SystimePatch[] = { "sed",
"-e", "/authdes_create.*struct sockaddr/i\\\n\ "-e", "s/^extern struct sigevent;/struct sigevent;/",
struct sockaddr;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Irix_Struct__File fix * Description of Ip_Missing_Semi fix
*/ */
#define IRIX_STRUCT__FILE_FIXIDX 45 #define IP_MISSING_SEMI_FIXIDX 43
tSCC zIrix_Struct__FileName[] = tSCC zIp_Missing_SemiName[] =
"irix_struct__file"; "ip_missing_semi";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zIrix_Struct__FileList[] = tSCC zIp_Missing_SemiList[] =
"|rpc/xdr.h|"; "|netinet/ip.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzIrix_Struct__FileMachs (const char**)NULL #define apzIp_Missing_SemiMachs (const char**)NULL
#define IRIX_STRUCT__FILE_TEST_CT 0
#define aIrix_Struct__FileTests (tTestDesc*)NULL /*
* content selection pattern - do fix if pattern found
*/
tSCC zIp_Missing_SemiSelect0[] =
"}$";
#define IP_MISSING_SEMI_TEST_CT 1
tTestDesc aIp_Missing_SemiTests[] = {
{ TT_EGREP, zIp_Missing_SemiSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Irix_Struct__File * Fix Command Arguments for Ip_Missing_Semi
*/ */
const char* apzIrix_Struct__FilePatch[] = { "sed", const char* apzIp_Missing_SemiPatch[] = { "sed",
"-e", "/xdrstdio_create.*struct __file_s/i\\\n\ "-e", "/^struct/,/^};/s/}$/};/",
struct __file_s;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Irix_Asm_Apostrophe fix * Description of Irix_Asm_Apostrophe fix
*/ */
#define IRIX_ASM_APOSTROPHE_FIXIDX 46 #define IRIX_ASM_APOSTROPHE_FIXIDX 44
tSCC zIrix_Asm_ApostropheName[] = tSCC zIrix_Asm_ApostropheName[] =
"irix_asm_apostrophe"; "irix_asm_apostrophe";
...@@ -1966,116 +1907,81 @@ tTestDesc aIrix_Asm_ApostropheTests[] = { ...@@ -1966,116 +1907,81 @@ tTestDesc aIrix_Asm_ApostropheTests[] = {
/* /*
* Fix Command Arguments for Irix_Asm_Apostrophe * Fix Command Arguments for Irix_Asm_Apostrophe
*/ */
const char* apzIrix_Asm_ApostrophePatch[] = { "sed", const char* apzIrix_Asm_ApostrophePatch[] = {
"-e", "/^[ \t]*#/s/\\([Ww]e\\)'re/\\1 are/", "format",
(char*)NULL }; "%1 are",
"^([ \t]*#.*[Ww]e)'re",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Isc_Fmod fix
*/
#define ISC_FMOD_FIXIDX 47
tSCC zIsc_FmodName[] =
"isc_fmod";
/*
* File name selection pattern
*/
tSCC zIsc_FmodList[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzIsc_FmodMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zIsc_FmodSelect0[] =
"fmod\\(double\\)";
#define ISC_FMOD_TEST_CT 1
tTestDesc aIsc_FmodTests[] = {
{ TT_EGREP, zIsc_FmodSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Isc_Fmod
*/
const char* apzIsc_FmodPatch[] = { "sed",
"-e", "s/fmod(double)/fmod(double, double)/",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Motorola_Nested fix * Description of Irix_Multiline_Cmnt fix
*/ */
#define MOTOROLA_NESTED_FIXIDX 48 #define IRIX_MULTILINE_CMNT_FIXIDX 45
tSCC zMotorola_NestedName[] = tSCC zIrix_Multiline_CmntName[] =
"motorola_nested"; "irix_multiline_cmnt";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zMotorola_NestedList[] = tSCC zIrix_Multiline_CmntList[] =
"|limits.h|sys/limits.h|"; "|sys/types.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzMotorola_NestedMachs[] = { #define apzIrix_Multiline_CmntMachs (const char**)NULL
"m68k-motorola-sysv*", #define IRIX_MULTILINE_CMNT_TEST_CT 0
(const char*)NULL }; #define aIrix_Multiline_CmntTests (tTestDesc*)NULL
#define MOTOROLA_NESTED_TEST_CT 0
#define aMotorola_NestedTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Motorola_Nested * Fix Command Arguments for Irix_Multiline_Cmnt
*/ */
const char* apzMotorola_NestedPatch[] = { "sed", const char* apzIrix_Multiline_CmntPatch[] = { "sed",
"-e", "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*/\\* max # bytes atomic in write to a\\)$@\\1 */@", "-e", "s@type of the result@type of the result */@",
"-e", "s@\\(/\\*#define\tHUGE_VAL\t3.40282346638528860e+38 \\)\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@", "-e", "s@of the sizeof@/* of the sizeof@",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Isc_Sys_Limits fix * Description of Isc_Fmod fix
*/ */
#define ISC_SYS_LIMITS_FIXIDX 49 #define ISC_FMOD_FIXIDX 46
tSCC zIsc_Sys_LimitsName[] = tSCC zIsc_FmodName[] =
"isc_sys_limits"; "isc_fmod";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zIsc_Sys_LimitsList[] = tSCC zIsc_FmodList[] =
"|sys/limits.h|"; "|math.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzIsc_Sys_LimitsMachs (const char**)NULL #define apzIsc_FmodMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zIsc_Sys_LimitsSelect0[] = tSCC zIsc_FmodSelect0[] =
"CHILD_MAX"; "fmod\\(double\\)";
#define ISC_SYS_LIMITS_TEST_CT 1 #define ISC_FMOD_TEST_CT 1
tTestDesc aIsc_Sys_LimitsTests[] = { tTestDesc aIsc_FmodTests[] = {
{ TT_EGREP, zIsc_Sys_LimitsSelect0, (regex_t*)NULL }, }; { TT_EGREP, zIsc_FmodSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Isc_Sys_Limits * Fix Command Arguments for Isc_Fmod
*/ */
const char* apzIsc_Sys_LimitsPatch[] = { "sed", const char* apzIsc_FmodPatch[] = {
"-e", "/CHILD_MAX/s,/\\* Max, Max,", "format",
"-e", "/OPEN_MAX/s,/\\* Max, Max,", "fmod(double, double)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Kandr_Concat fix * Description of Kandr_Concat fix
*/ */
#define KANDR_CONCAT_FIXIDX 50 #define KANDR_CONCAT_FIXIDX 47
tSCC zKandr_ConcatName[] = tSCC zKandr_ConcatName[] =
"kandr_concat"; "kandr_concat";
...@@ -2102,15 +2008,16 @@ tTestDesc aKandr_ConcatTests[] = { ...@@ -2102,15 +2008,16 @@ tTestDesc aKandr_ConcatTests[] = {
/* /*
* Fix Command Arguments for Kandr_Concat * Fix Command Arguments for Kandr_Concat
*/ */
const char* apzKandr_ConcatPatch[] = { "sed", const char* apzKandr_ConcatPatch[] = {
"-e", "s|/\\*\\*/|##|g", "format",
"##",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Limits_Ifndefs fix * Description of Limits_Ifndefs fix
*/ */
#define LIMITS_IFNDEFS_FIXIDX 51 #define LIMITS_IFNDEFS_FIXIDX 48
tSCC zLimits_IfndefsName[] = tSCC zLimits_IfndefsName[] =
"limits_ifndefs"; "limits_ifndefs";
...@@ -2137,39 +2044,19 @@ tTestDesc aLimits_IfndefsTests[] = { ...@@ -2137,39 +2044,19 @@ tTestDesc aLimits_IfndefsTests[] = {
/* /*
* Fix Command Arguments for Limits_Ifndefs * Fix Command Arguments for Limits_Ifndefs
*/ */
const char* apzLimits_IfndefsPatch[] = { "sed", const char* apzLimits_IfndefsPatch[] = {
"-e", "/[ \t]FLT_MIN[ \t]/i\\\n\ "format",
#ifndef FLT_MIN\n", "#ifndef %1\n\
"-e", "/[ \t]FLT_MIN[ \t]/a\\\n\ %0#endif\n",
#endif\n", "^[ \t]*#[ \t]*define[ \t]+((FLT|DBL)_(MIN|MAX|DIG))[ \t][^\n\
"-e", "/[ \t]FLT_MAX[ \t]/i\\\n\ ]*\n",
#ifndef FLT_MAX\n",
"-e", "/[ \t]FLT_MAX[ \t]/a\\\n\
#endif\n",
"-e", "/[ \t]FLT_DIG[ \t]/i\\\n\
#ifndef FLT_DIG\n",
"-e", "/[ \t]FLT_DIG[ \t]/a\\\n\
#endif\n",
"-e", "/[ \t]DBL_MIN[ \t]/i\\\n\
#ifndef DBL_MIN\n",
"-e", "/[ \t]DBL_MIN[ \t]/a\\\n\
#endif\n",
"-e", "/[ \t]DBL_MAX[ \t]/i\\\n\
#ifndef DBL_MAX\n",
"-e", "/[ \t]DBL_MAX[ \t]/a\\\n\
#endif\n",
"-e", "/[ \t]DBL_DIG[ \t]/i\\\n\
#ifndef DBL_DIG\n",
"-e", "/[ \t]DBL_DIG[ \t]/a\\\n\
#endif\n",
"-e", "/^\\(\\/\\*#define\tHUGE_VAL\t3\\.[0-9e+]* *\\)\\/\\*/s//\\1/",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Lynx_Void_Int fix * Description of Lynx_Void_Int fix
*/ */
#define LYNX_VOID_INT_FIXIDX 52 #define LYNX_VOID_INT_FIXIDX 49
tSCC zLynx_Void_IntName[] = tSCC zLynx_Void_IntName[] =
"lynx_void_int"; "lynx_void_int";
...@@ -2187,7 +2074,7 @@ tSCC zLynx_Void_IntList[] = ...@@ -2187,7 +2074,7 @@ tSCC zLynx_Void_IntList[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zLynx_Void_IntSelect0[] = tSCC zLynx_Void_IntSelect0[] =
"#[ \t]*define[ \t]+void[ \t]+int"; "#[ \t]*define[ \t]+void[ \t]+int[ \t]*";
#define LYNX_VOID_INT_TEST_CT 1 #define LYNX_VOID_INT_TEST_CT 1
tTestDesc aLynx_Void_IntTests[] = { tTestDesc aLynx_Void_IntTests[] = {
...@@ -2196,15 +2083,16 @@ tTestDesc aLynx_Void_IntTests[] = { ...@@ -2196,15 +2083,16 @@ tTestDesc aLynx_Void_IntTests[] = {
/* /*
* Fix Command Arguments for Lynx_Void_Int * Fix Command Arguments for Lynx_Void_Int
*/ */
const char* apzLynx_Void_IntPatch[] = { "sed", const char* apzLynx_Void_IntPatch[] = {
"-e", "/#[ \t]*define[ \t][ \t]*void[ \t]int/d", "format",
"",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Lynxos_Fcntl_Proto fix * Description of Lynxos_Fcntl_Proto fix
*/ */
#define LYNXOS_FCNTL_PROTO_FIXIDX 53 #define LYNXOS_FCNTL_PROTO_FIXIDX 50
tSCC zLynxos_Fcntl_ProtoName[] = tSCC zLynxos_Fcntl_ProtoName[] =
"lynxos_fcntl_proto"; "lynxos_fcntl_proto";
...@@ -2222,7 +2110,7 @@ tSCC zLynxos_Fcntl_ProtoList[] = ...@@ -2222,7 +2110,7 @@ tSCC zLynxos_Fcntl_ProtoList[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zLynxos_Fcntl_ProtoSelect0[] = tSCC zLynxos_Fcntl_ProtoSelect0[] =
"fcntl.*\\(int, int, int\\)"; "fcntl[ \t]*\\(int, int, int\\)";
#define LYNXOS_FCNTL_PROTO_TEST_CT 1 #define LYNXOS_FCNTL_PROTO_TEST_CT 1
tTestDesc aLynxos_Fcntl_ProtoTests[] = { tTestDesc aLynxos_Fcntl_ProtoTests[] = {
...@@ -2231,15 +2119,17 @@ tTestDesc aLynxos_Fcntl_ProtoTests[] = { ...@@ -2231,15 +2119,17 @@ tTestDesc aLynxos_Fcntl_ProtoTests[] = {
/* /*
* Fix Command Arguments for Lynxos_Fcntl_Proto * Fix Command Arguments for Lynxos_Fcntl_Proto
*/ */
const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed", const char* apzLynxos_Fcntl_ProtoPatch[] = {
"-e", "s/\\(fcntl.*(int, int, \\)int)/\\1...)/", "format",
"%1...)",
"(fcntl[ \t]*\\(int, int, )int\\)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of M88k_Bad_Hypot_Opt fix * Description of M88k_Bad_Hypot_Opt fix
*/ */
#define M88K_BAD_HYPOT_OPT_FIXIDX 54 #define M88K_BAD_HYPOT_OPT_FIXIDX 51
tSCC zM88k_Bad_Hypot_OptName[] = tSCC zM88k_Bad_Hypot_OptName[] =
"m88k_bad_hypot_opt"; "m88k_bad_hypot_opt";
...@@ -2254,26 +2144,33 @@ tSCC zM88k_Bad_Hypot_OptList[] = ...@@ -2254,26 +2144,33 @@ tSCC zM88k_Bad_Hypot_OptList[] =
tSCC* apzM88k_Bad_Hypot_OptMachs[] = { tSCC* apzM88k_Bad_Hypot_OptMachs[] = {
"m88k-motorola-sysv3*", "m88k-motorola-sysv3*",
(const char*)NULL }; (const char*)NULL };
#define M88K_BAD_HYPOT_OPT_TEST_CT 0
#define aM88k_Bad_Hypot_OptTests (tTestDesc*)NULL /*
* content selection pattern - do fix if pattern found
*/
tSCC zM88k_Bad_Hypot_OptSelect0[] =
"^extern double hypot\\(\\);\n";
#define M88K_BAD_HYPOT_OPT_TEST_CT 1
tTestDesc aM88k_Bad_Hypot_OptTests[] = {
{ TT_EGREP, zM88k_Bad_Hypot_OptSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for M88k_Bad_Hypot_Opt * Fix Command Arguments for M88k_Bad_Hypot_Opt
*/ */
const char* apzM88k_Bad_Hypot_OptPatch[] = { "sed", const char* apzM88k_Bad_Hypot_OptPatch[] = {
"-e", "s/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/", "format",
"-e", "/^extern double hypot();$/a\\\n\ "%0/* Workaround a stupid Motorola optimization if one\n\
\\/* Workaround a stupid Motorola optimization if one\\\n\ of x or y is 0.0 and the other is negative! */\n\
of x or y is 0.0 and the other is negative! *\\/\\\n\ #ifdef __STDC__\n\
#ifdef __STDC__\\\n\ static __inline__ double fake_hypot (double x, double y)\n\
static __inline__ double fake_hypot (double x, double y)\\\n\ #else\n\
#else\\\n\ static __inline__ double fake_hypot (x, y)\n\
static __inline__ double fake_hypot (x, y)\\\n\ \tdouble x, y;\n\
\tdouble x, y;\\\n\ #endif\n\
#endif\\\n\ {\n\
{\\\n\ \treturn fabs (hypot (x, y));\n\
\treturn fabs (hypot (x, y));\\\n\ }\n\
}\\\n\
#define hypot\tfake_hypot\n", #define hypot\tfake_hypot\n",
(char*)NULL }; (char*)NULL };
...@@ -2281,7 +2178,7 @@ static __inline__ double fake_hypot (x, y)\\\n\ ...@@ -2281,7 +2178,7 @@ static __inline__ double fake_hypot (x, y)\\\n\
* *
* Description of M88k_Bad_S_If fix * Description of M88k_Bad_S_If fix
*/ */
#define M88K_BAD_S_IF_FIXIDX 55 #define M88K_BAD_S_IF_FIXIDX 52
tSCC zM88k_Bad_S_IfName[] = tSCC zM88k_Bad_S_IfName[] =
"m88k_bad_s_if"; "m88k_bad_s_if";
...@@ -2301,7 +2198,7 @@ tSCC* apzM88k_Bad_S_IfMachs[] = { ...@@ -2301,7 +2198,7 @@ tSCC* apzM88k_Bad_S_IfMachs[] = {
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zM88k_Bad_S_IfSelect0[] = tSCC zM88k_Bad_S_IfSelect0[] =
"#define[ \t]+S_IS[A-Z]*(m)[ \t]"; "#define[ \t]+S_IS[A-Z]+\\(m\\)[ \t]+\\(m[ \t]*&";
#define M88K_BAD_S_IF_TEST_CT 1 #define M88K_BAD_S_IF_TEST_CT 1
tTestDesc aM88k_Bad_S_IfTests[] = { tTestDesc aM88k_Bad_S_IfTests[] = {
...@@ -2310,16 +2207,17 @@ tTestDesc aM88k_Bad_S_IfTests[] = { ...@@ -2310,16 +2207,17 @@ tTestDesc aM88k_Bad_S_IfTests[] = {
/* /*
* Fix Command Arguments for M88k_Bad_S_If * Fix Command Arguments for M88k_Bad_S_If
*/ */
const char* apzM88k_Bad_S_IfPatch[] = { "sed", const char* apzM88k_Bad_S_IfPatch[] = {
"-e", "s/^\\(#define[ \t]*S_IS[A-Z]*(m)\\)[ \t]*(m[ \t]*&[ \t]*\\(S_IF[A-Z][A-Z][A-Z][A-Z]*\\)[ \t]*)/\\1 (((m)\\&S_IFMT)==\\2)/", "format",
"-e", "s/^\\(#define[ \t]*S_IS[A-Z]*(m)\\)[ \t]*(m[ \t]*&[ \t]*\\(0[0-9]*\\)[ \t]*)/\\1 (((m)\\&S_IFMT)==\\2)/", "#define %1(m) (((m) & S_IFMT) == %2)",
"#define[ \t]+(S_IS[A-Z]+)\\(m\\)[ \t]+\\(m[ \t]*&[ \t]*(S_IF[A-Z][A-Z][A-Z]+|0[0-9]+)[ \t]*\\)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of M88k_Multi_Incl fix * Description of M88k_Multi_Incl fix
*/ */
#define M88K_MULTI_INCL_FIXIDX 56 #define M88K_MULTI_INCL_FIXIDX 53
tSCC zM88k_Multi_InclName[] = tSCC zM88k_Multi_InclName[] =
"m88k_multi_incl"; "m88k_multi_incl";
...@@ -2361,7 +2259,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c", ...@@ -2361,7 +2259,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
* *
* Description of Machine_Ansi_H_Va_List fix * Description of Machine_Ansi_H_Va_List fix
*/ */
#define MACHINE_ANSI_H_VA_LIST_FIXIDX 57 #define MACHINE_ANSI_H_VA_LIST_FIXIDX 54
tSCC zMachine_Ansi_H_Va_ListName[] = tSCC zMachine_Ansi_H_Va_ListName[] =
"machine_ansi_h_va_list"; "machine_ansi_h_va_list";
...@@ -2403,7 +2301,7 @@ const char* apzMachine_Ansi_H_Va_ListPatch[] = { "sed", ...@@ -2403,7 +2301,7 @@ const char* apzMachine_Ansi_H_Va_ListPatch[] = { "sed",
* *
* Description of Machine_Name fix * Description of Machine_Name fix
*/ */
#define MACHINE_NAME_FIXIDX 58 #define MACHINE_NAME_FIXIDX 55
tSCC zMachine_NameName[] = tSCC zMachine_NameName[] =
"machine_name"; "machine_name";
...@@ -2436,7 +2334,7 @@ const char* apzMachine_NamePatch[] = { ...@@ -2436,7 +2334,7 @@ const char* apzMachine_NamePatch[] = {
* *
* Description of Math_Exception fix * Description of Math_Exception fix
*/ */
#define MATH_EXCEPTION_FIXIDX 59 #define MATH_EXCEPTION_FIXIDX 56
tSCC zMath_ExceptionName[] = tSCC zMath_ExceptionName[] =
"math_exception"; "math_exception";
...@@ -2484,7 +2382,7 @@ const char* apzMath_ExceptionPatch[] = { ...@@ -2484,7 +2382,7 @@ const char* apzMath_ExceptionPatch[] = {
* *
* Description of Math_Huge_Val_From_Dbl_Max fix * Description of Math_Huge_Val_From_Dbl_Max fix
*/ */
#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 60 #define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 57
tSCC zMath_Huge_Val_From_Dbl_MaxName[] = tSCC zMath_Huge_Val_From_Dbl_MaxName[] =
"math_huge_val_from_dbl_max"; "math_huge_val_from_dbl_max";
...@@ -2531,7 +2429,7 @@ const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c", ...@@ -2531,7 +2429,7 @@ const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c",
* *
* Description of Math_Huge_Val_Ifndef fix * Description of Math_Huge_Val_Ifndef fix
*/ */
#define MATH_HUGE_VAL_IFNDEF_FIXIDX 61 #define MATH_HUGE_VAL_IFNDEF_FIXIDX 58
tSCC zMath_Huge_Val_IfndefName[] = tSCC zMath_Huge_Val_IfndefName[] =
"math_huge_val_ifndef"; "math_huge_val_ifndef";
...@@ -2567,29 +2465,131 @@ const char* apzMath_Huge_Val_IfndefPatch[] = { "sed", ...@@ -2567,29 +2465,131 @@ const char* apzMath_Huge_Val_IfndefPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Nested_Comment fix * Description of Nested_Motorola fix
*/
#define NESTED_MOTOROLA_FIXIDX 59
tSCC zNested_MotorolaName[] =
"nested_motorola";
/*
* File name selection pattern
*/
tSCC zNested_MotorolaList[] =
"|limits.h|sys/limits.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzNested_MotorolaMachs[] = {
"m68k-motorola-sysv*",
(const char*)NULL };
#define NESTED_MOTOROLA_TEST_CT 0
#define aNested_MotorolaTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Nested_Motorola
*/
const char* apzNested_MotorolaPatch[] = { "sed",
"-e", "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*/\\* max # bytes atomic in write to a\\)$@\\1 */@",
"-e", "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Nested_Sys_Limits fix
*/
#define NESTED_SYS_LIMITS_FIXIDX 60
tSCC zNested_Sys_LimitsName[] =
"nested_sys_limits";
/*
* File name selection pattern
*/
tSCC zNested_Sys_LimitsList[] =
"|sys/limits.h|";
/*
* Machine/OS name selection pattern
*/
#define apzNested_Sys_LimitsMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zNested_Sys_LimitsSelect0[] =
"CHILD_MAX";
#define NESTED_SYS_LIMITS_TEST_CT 1
tTestDesc aNested_Sys_LimitsTests[] = {
{ TT_EGREP, zNested_Sys_LimitsSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Nested_Sys_Limits
*/
const char* apzNested_Sys_LimitsPatch[] = { "sed",
"-e", "/CHILD_MAX/s,/\\* Max, Max,",
"-e", "/OPEN_MAX/s,/\\* Max, Max,",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Nested_Auth_Des fix
*/ */
#define NESTED_COMMENT_FIXIDX 62 #define NESTED_AUTH_DES_FIXIDX 61
tSCC zNested_CommentName[] = tSCC zNested_Auth_DesName[] =
"nested_comment"; "nested_auth_des";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zNested_CommentList[] = tSCC zNested_Auth_DesList[] =
"|rpc/rpc.h|"; "|rpc/rpc.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzNested_CommentMachs (const char**)NULL #define apzNested_Auth_DesMachs (const char**)NULL
#define NESTED_COMMENT_TEST_CT 0
#define aNested_CommentTests (tTestDesc*)NULL /*
* content selection pattern - do fix if pattern found
*/
tSCC zNested_Auth_DesSelect0[] =
"(/\\*.*rpc/auth_des\\.h>.*)/\\*";
#define NESTED_AUTH_DES_TEST_CT 1
tTestDesc aNested_Auth_DesTests[] = {
{ TT_EGREP, zNested_Auth_DesSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Nested_Auth_Des
*/
const char* apzNested_Auth_DesPatch[] = {
"format",
"%1*/ /*",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Nested_Ultrix fix
*/
#define NESTED_ULTRIX_FIXIDX 62
tSCC zNested_UltrixName[] =
"nested_ultrix";
/*
* File name selection pattern
*/
tSCC zNested_UltrixList[] =
"|rpc/svc.h|";
/*
* Machine/OS name selection pattern
*/
#define apzNested_UltrixMachs (const char**)NULL
#define NESTED_ULTRIX_TEST_CT 0
#define aNested_UltrixTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Nested_Comment * Fix Command Arguments for Nested_Ultrix
*/ */
const char* apzNested_CommentPatch[] = { "sed", const char* apzNested_UltrixPatch[] = { "sed",
"-e", "s@^\\(/\\*.*rpc/auth_des.h>.*\\)/\\*@\\1*/ /*@", "-e", "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -3077,82 +3077,82 @@ const char* apzRs6000_ParamPatch[] = { "sed", ...@@ -3077,82 +3077,82 @@ const char* apzRs6000_ParamPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Sco_Strict_Ansi fix * Description of Sco_Static_Func fix
*/ */
#define SCO_STRICT_ANSI_FIXIDX 76 #define SCO_STATIC_FUNC_FIXIDX 76
tSCC zSco_Strict_AnsiName[] = tSCC zSco_Static_FuncName[] =
"sco_strict_ansi"; "sco_static_func";
/* /*
* File name selection pattern * File name selection pattern
*/ */
#define zSco_Strict_AnsiList (char*)NULL tSCC zSco_Static_FuncList[] =
"|sys/stat.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzSco_Strict_AnsiMachs[] = { tSCC* apzSco_Static_FuncMachs[] = {
"i?86-*-sco3.2*", "i?86-*-sco3.2*",
(const char*)NULL }; (const char*)NULL };
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zSco_Strict_AnsiSelect0[] = tSCC zSco_Static_FuncSelect0[] =
"^[ \t]*#[ \t]*if.*!__STDC__"; "^static int";
#define SCO_STRICT_ANSI_TEST_CT 1 #define SCO_STATIC_FUNC_TEST_CT 1
tTestDesc aSco_Strict_AnsiTests[] = { tTestDesc aSco_Static_FuncTests[] = {
{ TT_EGREP, zSco_Strict_AnsiSelect0, (regex_t*)NULL }, }; { TT_EGREP, zSco_Static_FuncSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Sco_Strict_Ansi * Fix Command Arguments for Sco_Static_Func
*/ */
const char* apzSco_Strict_AnsiPatch[] = { "sed", const char* apzSco_Static_FuncPatch[] = { "sed",
"-e", "s/!__STDC__/!defined(__STRICT_ANSI__)/g", "-e", "/^static int/i\\\n\
#if __cplusplus\\\n\
extern \"C\" {\\\n\
#endif /* __cplusplus */",
"-e", "/^}$/a\\\n\
#if __cplusplus\\\n\
}\\\n\
#endif /* __cplusplus */",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Sco_Static_Func fix * Description of Sco_Strict_Ansi fix
*/ */
#define SCO_STATIC_FUNC_FIXIDX 77 #define SCO_STRICT_ANSI_FIXIDX 77
tSCC zSco_Static_FuncName[] = tSCC zSco_Strict_AnsiName[] =
"sco_static_func"; "sco_strict_ansi";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zSco_Static_FuncList[] = #define zSco_Strict_AnsiList (char*)NULL
"|sys/stat.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzSco_Static_FuncMachs[] = { tSCC* apzSco_Strict_AnsiMachs[] = {
"i?86-*-sco3.2*", "i?86-*-sco3.2*",
(const char*)NULL }; (const char*)NULL };
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zSco_Static_FuncSelect0[] = tSCC zSco_Strict_AnsiSelect0[] =
"^static int"; "^[ \t]*#[ \t]*if.*!__STDC__";
#define SCO_STATIC_FUNC_TEST_CT 1 #define SCO_STRICT_ANSI_TEST_CT 1
tTestDesc aSco_Static_FuncTests[] = { tTestDesc aSco_Strict_AnsiTests[] = {
{ TT_EGREP, zSco_Static_FuncSelect0, (regex_t*)NULL }, }; { TT_EGREP, zSco_Strict_AnsiSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Sco_Static_Func * Fix Command Arguments for Sco_Strict_Ansi
*/ */
const char* apzSco_Static_FuncPatch[] = { "sed", const char* apzSco_Strict_AnsiPatch[] = { "sed",
"-e", "/^static int/i\\\n\ "-e", "s/!__STDC__/!defined(__STRICT_ANSI__)/g",
#if __cplusplus\\\n\
extern \"C\" {\\\n\
#endif /* __cplusplus */",
"-e", "/^}$/a\\\n\
#if __cplusplus\\\n\
}\\\n\
#endif /* __cplusplus */",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -3346,9 +3346,90 @@ s@_Va_LIST@_VA_LIST@", ...@@ -3346,9 +3346,90 @@ s@_Va_LIST@_VA_LIST@",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Struct_File fix
*/
#define STRUCT_FILE_FIXIDX 83
tSCC zStruct_FileName[] =
"struct_file";
/*
* File name selection pattern
*/
tSCC zStruct_FileList[] =
"|rpc/xdr.h|";
/*
* Machine/OS name selection pattern
*/
#define apzStruct_FileMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zStruct_FileSelect0[] =
"^.*xdrstdio_create.*struct __file_s";
#define STRUCT_FILE_TEST_CT 1
tTestDesc aStruct_FileTests[] = {
{ TT_EGREP, zStruct_FileSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Struct_File
*/
const char* apzStruct_FilePatch[] = {
"format",
"struct __file_s;\n\
%0",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Struct_Sockaddr fix
*/
#define STRUCT_SOCKADDR_FIXIDX 84
tSCC zStruct_SockaddrName[] =
"struct_sockaddr";
/*
* File name selection pattern
*/
tSCC zStruct_SockaddrList[] =
"|rpc/auth.h|";
/*
* Machine/OS name selection pattern
*/
#define apzStruct_SockaddrMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zStruct_SockaddrSelect0[] =
"^.*authdes_create.*struct sockaddr";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zStruct_SockaddrBypass0[] =
"<sys/socket.h>";
#define STRUCT_SOCKADDR_TEST_CT 2
tTestDesc aStruct_SockaddrTests[] = {
{ TT_NEGREP, zStruct_SockaddrBypass0, (regex_t*)NULL },
{ TT_EGREP, zStruct_SockaddrSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Struct_Sockaddr
*/
const char* apzStruct_SockaddrPatch[] = {
"format",
"struct sockaddr;\n\
%0",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sun_Auth_Proto fix * Description of Sun_Auth_Proto fix
*/ */
#define SUN_AUTH_PROTO_FIXIDX 83 #define SUN_AUTH_PROTO_FIXIDX 85
tSCC zSun_Auth_ProtoName[] = tSCC zSun_Auth_ProtoName[] =
"sun_auth_proto"; "sun_auth_proto";
...@@ -3388,7 +3469,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed", ...@@ -3388,7 +3469,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed",
* *
* Description of Sun_Bogus_Ifdef fix * Description of Sun_Bogus_Ifdef fix
*/ */
#define SUN_BOGUS_IFDEF_FIXIDX 84 #define SUN_BOGUS_IFDEF_FIXIDX 86
tSCC zSun_Bogus_IfdefName[] = tSCC zSun_Bogus_IfdefName[] =
"sun_bogus_ifdef"; "sun_bogus_ifdef";
...@@ -3423,7 +3504,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed", ...@@ -3423,7 +3504,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed",
* *
* Description of Sun_Bogus_Ifdef_Sun4c fix * Description of Sun_Bogus_Ifdef_Sun4c fix
*/ */
#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 85 #define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 87
tSCC zSun_Bogus_Ifdef_Sun4cName[] = tSCC zSun_Bogus_Ifdef_Sun4cName[] =
"sun_bogus_ifdef_sun4c"; "sun_bogus_ifdef_sun4c";
...@@ -3458,7 +3539,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed", ...@@ -3458,7 +3539,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
* *
* Description of Sun_Catmacro fix * Description of Sun_Catmacro fix
*/ */
#define SUN_CATMACRO_FIXIDX 86 #define SUN_CATMACRO_FIXIDX 88
tSCC zSun_CatmacroName[] = tSCC zSun_CatmacroName[] =
"sun_catmacro"; "sun_catmacro";
...@@ -3498,7 +3579,7 @@ const char* apzSun_CatmacroPatch[] = { "sed", ...@@ -3498,7 +3579,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
* *
* Description of Sun_Malloc fix * Description of Sun_Malloc fix
*/ */
#define SUN_MALLOC_FIXIDX 87 #define SUN_MALLOC_FIXIDX 89
tSCC zSun_MallocName[] = tSCC zSun_MallocName[] =
"sun_malloc"; "sun_malloc";
...@@ -3528,7 +3609,7 @@ const char* apzSun_MallocPatch[] = { "sed", ...@@ -3528,7 +3609,7 @@ const char* apzSun_MallocPatch[] = { "sed",
* *
* Description of Sun_Rusers_Semi fix * Description of Sun_Rusers_Semi fix
*/ */
#define SUN_RUSERS_SEMI_FIXIDX 88 #define SUN_RUSERS_SEMI_FIXIDX 90
tSCC zSun_Rusers_SemiName[] = tSCC zSun_Rusers_SemiName[] =
"sun_rusers_semi"; "sun_rusers_semi";
...@@ -3563,7 +3644,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed", ...@@ -3563,7 +3644,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
* *
* Description of Sun_Signal fix * Description of Sun_Signal fix
*/ */
#define SUN_SIGNAL_FIXIDX 89 #define SUN_SIGNAL_FIXIDX 91
tSCC zSun_SignalName[] = tSCC zSun_SignalName[] =
"sun_signal"; "sun_signal";
...@@ -3603,7 +3684,7 @@ void\t(*signal(...))(...);\\\n\ ...@@ -3603,7 +3684,7 @@ void\t(*signal(...))(...);\\\n\
* *
* Description of Sunos_Matherr_Decl fix * Description of Sunos_Matherr_Decl fix
*/ */
#define SUNOS_MATHERR_DECL_FIXIDX 90 #define SUNOS_MATHERR_DECL_FIXIDX 92
tSCC zSunos_Matherr_DeclName[] = tSCC zSunos_Matherr_DeclName[] =
"sunos_matherr_decl"; "sunos_matherr_decl";
...@@ -3640,7 +3721,7 @@ struct exception;\n", ...@@ -3640,7 +3721,7 @@ struct exception;\n",
* *
* Description of Sunos_Strlen fix * Description of Sunos_Strlen fix
*/ */
#define SUNOS_STRLEN_FIXIDX 91 #define SUNOS_STRLEN_FIXIDX 93
tSCC zSunos_StrlenName[] = tSCC zSunos_StrlenName[] =
"sunos_strlen"; "sunos_strlen";
...@@ -3675,7 +3756,7 @@ const char* apzSunos_StrlenPatch[] = { "sed", ...@@ -3675,7 +3756,7 @@ const char* apzSunos_StrlenPatch[] = { "sed",
* *
* Description of Svr4_Getcwd fix * Description of Svr4_Getcwd fix
*/ */
#define SVR4_GETCWD_FIXIDX 92 #define SVR4_GETCWD_FIXIDX 94
tSCC zSvr4_GetcwdName[] = tSCC zSvr4_GetcwdName[] =
"svr4_getcwd"; "svr4_getcwd";
...@@ -3710,7 +3791,7 @@ const char* apzSvr4_GetcwdPatch[] = { "sed", ...@@ -3710,7 +3791,7 @@ const char* apzSvr4_GetcwdPatch[] = { "sed",
* *
* Description of Svr4_Profil fix * Description of Svr4_Profil fix
*/ */
#define SVR4_PROFIL_FIXIDX 93 #define SVR4_PROFIL_FIXIDX 95
tSCC zSvr4_ProfilName[] = tSCC zSvr4_ProfilName[] =
"svr4_profil"; "svr4_profil";
...@@ -3737,7 +3818,7 @@ const char* apzSvr4_ProfilPatch[] = { "sed", ...@@ -3737,7 +3818,7 @@ const char* apzSvr4_ProfilPatch[] = { "sed",
* *
* Description of Systypes fix * Description of Systypes fix
*/ */
#define SYSTYPES_FIXIDX 94 #define SYSTYPES_FIXIDX 96
tSCC zSystypesName[] = tSCC zSystypesName[] =
"systypes"; "systypes";
...@@ -3796,7 +3877,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\ ...@@ -3796,7 +3877,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
* *
* Description of Systypes_Stdlib_Size_T fix * Description of Systypes_Stdlib_Size_T fix
*/ */
#define SYSTYPES_STDLIB_SIZE_T_FIXIDX 95 #define SYSTYPES_STDLIB_SIZE_T_FIXIDX 97
tSCC zSystypes_Stdlib_Size_TName[] = tSCC zSystypes_Stdlib_Size_TName[] =
"systypes_stdlib_size_t"; "systypes_stdlib_size_t";
...@@ -3842,7 +3923,7 @@ const char* apzSystypes_Stdlib_Size_TPatch[] = { "sed", ...@@ -3842,7 +3923,7 @@ const char* apzSystypes_Stdlib_Size_TPatch[] = { "sed",
* *
* Description of Sysv68_String fix * Description of Sysv68_String fix
*/ */
#define SYSV68_STRING_FIXIDX 96 #define SYSV68_STRING_FIXIDX 98
tSCC zSysv68_StringName[] = tSCC zSysv68_StringName[] =
"sysv68_string"; "sysv68_string";
...@@ -3879,7 +3960,7 @@ extern unsigned int\\\n\ ...@@ -3879,7 +3960,7 @@ extern unsigned int\\\n\
* *
* Description of Sysz_Stdlib_For_Sun fix * Description of Sysz_Stdlib_For_Sun fix
*/ */
#define SYSZ_STDLIB_FOR_SUN_FIXIDX 97 #define SYSZ_STDLIB_FOR_SUN_FIXIDX 99
tSCC zSysz_Stdlib_For_SunName[] = tSCC zSysz_Stdlib_For_SunName[] =
"sysz_stdlib_for_sun"; "sysz_stdlib_for_sun";
...@@ -3912,7 +3993,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed", ...@@ -3912,7 +3993,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
* *
* Description of Sysz_Stdtypes_For_Sun fix * Description of Sysz_Stdtypes_For_Sun fix
*/ */
#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 98 #define SYSZ_STDTYPES_FOR_SUN_FIXIDX 100
tSCC zSysz_Stdtypes_For_SunName[] = tSCC zSysz_Stdtypes_For_SunName[] =
"sysz_stdtypes_for_sun"; "sysz_stdtypes_for_sun";
...@@ -3953,7 +4034,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed", ...@@ -3953,7 +4034,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
* *
* Description of Tinfo_Cplusplus fix * Description of Tinfo_Cplusplus fix
*/ */
#define TINFO_CPLUSPLUS_FIXIDX 99 #define TINFO_CPLUSPLUS_FIXIDX 101
tSCC zTinfo_CplusplusName[] = tSCC zTinfo_CplusplusName[] =
"tinfo_cplusplus"; "tinfo_cplusplus";
...@@ -3986,45 +4067,9 @@ const char* apzTinfo_CplusplusPatch[] = { "sed", ...@@ -3986,45 +4067,9 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ultrix_Fix_Fixproto fix
*/
#define ULTRIX_FIX_FIXPROTO_FIXIDX 100
tSCC zUltrix_Fix_FixprotoName[] =
"ultrix_fix_fixproto";
/*
* File name selection pattern
*/
tSCC zUltrix_Fix_FixprotoList[] =
"|sys/utsname.h|";
/*
* Machine/OS name selection pattern
*/
#define apzUltrix_Fix_FixprotoMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zUltrix_Fix_FixprotoSelect0[] =
"ULTRIX";
#define ULTRIX_FIX_FIXPROTO_TEST_CT 1
tTestDesc aUltrix_Fix_FixprotoTests[] = {
{ TT_EGREP, zUltrix_Fix_FixprotoSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ultrix_Fix_Fixproto
*/
const char* apzUltrix_Fix_FixprotoPatch[] = { "sed",
"-e", "/^[ \t]*extern[ \t]*int[ \t]*uname();$/i\\\n\
struct utsname;\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Ultrix_Atof_Param fix * Description of Ultrix_Atof_Param fix
*/ */
#define ULTRIX_ATOF_PARAM_FIXIDX 101 #define ULTRIX_ATOF_PARAM_FIXIDX 102
tSCC zUltrix_Atof_ParamName[] = tSCC zUltrix_Atof_ParamName[] =
"ultrix_atof_param"; "ultrix_atof_param";
...@@ -4059,7 +4104,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed", ...@@ -4059,7 +4104,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed",
* *
* Description of Ultrix_Const fix * Description of Ultrix_Const fix
*/ */
#define ULTRIX_CONST_FIXIDX 102 #define ULTRIX_CONST_FIXIDX 103
tSCC zUltrix_ConstName[] = tSCC zUltrix_ConstName[] =
"ultrix_const"; "ultrix_const";
...@@ -4092,71 +4137,80 @@ const char* apzUltrix_ConstPatch[] = { "sed", ...@@ -4092,71 +4137,80 @@ const char* apzUltrix_ConstPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ultrix_Ifdef fix * Description of Ultrix_Fix_Fixproto fix
*/ */
#define ULTRIX_IFDEF_FIXIDX 103 #define ULTRIX_FIX_FIXPROTO_FIXIDX 104
tSCC zUltrix_IfdefName[] = tSCC zUltrix_Fix_FixprotoName[] =
"ultrix_ifdef"; "ultrix_fix_fixproto";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zUltrix_IfdefList[] = tSCC zUltrix_Fix_FixprotoList[] =
"|sys/file.h|"; "|sys/utsname.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzUltrix_IfdefMachs (const char**)NULL #define apzUltrix_Fix_FixprotoMachs (const char**)NULL
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zUltrix_IfdefSelect0[] = tSCC zUltrix_Fix_FixprotoSelect0[] =
"#ifdef KERNEL[ \t]*[^ \t]"; "ULTRIX";
#define ULTRIX_IFDEF_TEST_CT 1 #define ULTRIX_FIX_FIXPROTO_TEST_CT 1
tTestDesc aUltrix_IfdefTests[] = { tTestDesc aUltrix_Fix_FixprotoTests[] = {
{ TT_EGREP, zUltrix_IfdefSelect0, (regex_t*)NULL }, }; { TT_EGREP, zUltrix_Fix_FixprotoSelect0, (regex_t*)NULL }, };
/* /*
* Fix Command Arguments for Ultrix_Ifdef * Fix Command Arguments for Ultrix_Fix_Fixproto
*/ */
const char* apzUltrix_IfdefPatch[] = { "sed", const char* apzUltrix_Fix_FixprotoPatch[] = { "sed",
"-e", "s/#ifdef KERNEL/#if defined(KERNEL)/", "-e", "/^[ \t]*extern[ \t]*int[ \t]*uname();$/i\\\n\
struct utsname;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ultrix_Nested_Cmnt fix * Description of Ultrix_Ifdef fix
*/ */
#define ULTRIX_NESTED_CMNT_FIXIDX 104 #define ULTRIX_IFDEF_FIXIDX 105
tSCC zUltrix_Nested_CmntName[] = tSCC zUltrix_IfdefName[] =
"ultrix_nested_cmnt"; "ultrix_ifdef";
/* /*
* File name selection pattern * File name selection pattern
*/ */
tSCC zUltrix_Nested_CmntList[] = tSCC zUltrix_IfdefList[] =
"|rpc/svc.h|"; "|sys/file.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
#define apzUltrix_Nested_CmntMachs (const char**)NULL #define apzUltrix_IfdefMachs (const char**)NULL
#define ULTRIX_NESTED_CMNT_TEST_CT 0
#define aUltrix_Nested_CmntTests (tTestDesc*)NULL
/* /*
* Fix Command Arguments for Ultrix_Nested_Cmnt * content selection pattern - do fix if pattern found
*/ */
const char* apzUltrix_Nested_CmntPatch[] = { "sed", tSCC zUltrix_IfdefSelect0[] =
"-e", "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@", "#ifdef KERNEL[ \t]*[^ \t]";
#define ULTRIX_IFDEF_TEST_CT 1
tTestDesc aUltrix_IfdefTests[] = {
{ TT_EGREP, zUltrix_IfdefSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ultrix_Ifdef
*/
const char* apzUltrix_IfdefPatch[] = { "sed",
"-e", "s/#ifdef KERNEL/#if defined(KERNEL)/",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Ultrix_Static fix * Description of Ultrix_Static fix
*/ */
#define ULTRIX_STATIC_FIXIDX 105 #define ULTRIX_STATIC_FIXIDX 106
tSCC zUltrix_StaticName[] = tSCC zUltrix_StaticName[] =
"ultrix_static"; "ultrix_static";
...@@ -4193,7 +4247,7 @@ const char* apzUltrix_StaticPatch[] = { "sed", ...@@ -4193,7 +4247,7 @@ const char* apzUltrix_StaticPatch[] = { "sed",
* *
* Description of Undefine_Null fix * Description of Undefine_Null fix
*/ */
#define UNDEFINE_NULL_FIXIDX 106 #define UNDEFINE_NULL_FIXIDX 107
tSCC zUndefine_NullName[] = tSCC zUndefine_NullName[] =
"undefine_null"; "undefine_null";
...@@ -4239,7 +4293,7 @@ const char* apzUndefine_NullPatch[] = { ...@@ -4239,7 +4293,7 @@ const char* apzUndefine_NullPatch[] = {
* *
* Description of Unixware7_Byteorder_Fix fix * Description of Unixware7_Byteorder_Fix fix
*/ */
#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 107 #define UNIXWARE7_BYTEORDER_FIX_FIXIDX 108
tSCC zUnixware7_Byteorder_FixName[] = tSCC zUnixware7_Byteorder_FixName[] =
"unixware7_byteorder_fix"; "unixware7_byteorder_fix";
...@@ -4282,7 +4336,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed", ...@@ -4282,7 +4336,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed",
* *
* Description of Va_I960_Macro fix * Description of Va_I960_Macro fix
*/ */
#define VA_I960_MACRO_FIXIDX 108 #define VA_I960_MACRO_FIXIDX 109
tSCC zVa_I960_MacroName[] = tSCC zVa_I960_MacroName[] =
"va_i960_macro"; "va_i960_macro";
...@@ -4320,7 +4374,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed", ...@@ -4320,7 +4374,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed",
* *
* Description of Void_Null fix * Description of Void_Null fix
*/ */
#define VOID_NULL_FIXIDX 109 #define VOID_NULL_FIXIDX 110
tSCC zVoid_NullName[] = tSCC zVoid_NullName[] =
"void_null"; "void_null";
...@@ -4355,7 +4409,7 @@ const char* apzVoid_NullPatch[] = { "sed", ...@@ -4355,7 +4409,7 @@ const char* apzVoid_NullPatch[] = { "sed",
* *
* Description of Vxworks_Gcc_Problem fix * Description of Vxworks_Gcc_Problem fix
*/ */
#define VXWORKS_GCC_PROBLEM_FIXIDX 110 #define VXWORKS_GCC_PROBLEM_FIXIDX 111
tSCC zVxworks_Gcc_ProblemName[] = tSCC zVxworks_Gcc_ProblemName[] =
"vxworks_gcc_problem"; "vxworks_gcc_problem";
...@@ -4405,7 +4459,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", ...@@ -4405,7 +4459,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
* *
* Description of Vxworks_Needs_Vxtypes fix * Description of Vxworks_Needs_Vxtypes fix
*/ */
#define VXWORKS_NEEDS_VXTYPES_FIXIDX 111 #define VXWORKS_NEEDS_VXTYPES_FIXIDX 112
tSCC zVxworks_Needs_VxtypesName[] = tSCC zVxworks_Needs_VxtypesName[] =
"vxworks_needs_vxtypes"; "vxworks_needs_vxtypes";
...@@ -4440,7 +4494,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed", ...@@ -4440,7 +4494,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed",
* *
* Description of Vxworks_Needs_Vxworks fix * Description of Vxworks_Needs_Vxworks fix
*/ */
#define VXWORKS_NEEDS_VXWORKS_FIXIDX 112 #define VXWORKS_NEEDS_VXWORKS_FIXIDX 113
tSCC zVxworks_Needs_VxworksName[] = tSCC zVxworks_Needs_VxworksName[] =
"vxworks_needs_vxworks"; "vxworks_needs_vxworks";
...@@ -4489,7 +4543,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed", ...@@ -4489,7 +4543,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
* *
* Description of Vxworks_Time fix * Description of Vxworks_Time fix
*/ */
#define VXWORKS_TIME_FIXIDX 113 #define VXWORKS_TIME_FIXIDX 114
tSCC zVxworks_TimeName[] = tSCC zVxworks_TimeName[] =
"vxworks_time"; "vxworks_time";
...@@ -4540,7 +4594,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\ ...@@ -4540,7 +4594,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\
* *
* Description of X11_Class fix * Description of X11_Class fix
*/ */
#define X11_CLASS_FIXIDX 114 #define X11_CLASS_FIXIDX 115
tSCC zX11_ClassName[] = tSCC zX11_ClassName[] =
"x11_class"; "x11_class";
...@@ -4580,7 +4634,7 @@ const char* apzX11_ClassPatch[] = { "sed", ...@@ -4580,7 +4634,7 @@ const char* apzX11_ClassPatch[] = { "sed",
* *
* Description of X11_Class_Usage fix * Description of X11_Class_Usage fix
*/ */
#define X11_CLASS_USAGE_FIXIDX 115 #define X11_CLASS_USAGE_FIXIDX 116
tSCC zX11_Class_UsageName[] = tSCC zX11_Class_UsageName[] =
"x11_class_usage"; "x11_class_usage";
...@@ -4615,7 +4669,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed", ...@@ -4615,7 +4669,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed",
* *
* Description of X11_New fix * Description of X11_New fix
*/ */
#define X11_NEW_FIXIDX 116 #define X11_NEW_FIXIDX 117
tSCC zX11_NewName[] = tSCC zX11_NewName[] =
"x11_new"; "x11_new";
...@@ -4656,7 +4710,7 @@ const char* apzX11_NewPatch[] = { "sed", ...@@ -4656,7 +4710,7 @@ const char* apzX11_NewPatch[] = { "sed",
* *
* Description of X11_Sprintf fix * Description of X11_Sprintf fix
*/ */
#define X11_SPRINTF_FIXIDX 117 #define X11_SPRINTF_FIXIDX 118
tSCC zX11_SprintfName[] = tSCC zX11_SprintfName[] =
"x11_sprintf"; "x11_sprintf";
...@@ -4694,9 +4748,9 @@ extern char *\tsprintf();\\\n\ ...@@ -4694,9 +4748,9 @@ extern char *\tsprintf();\\\n\
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 105 #define REGEX_COUNT 109
#define MACH_LIST_SIZE_LIMIT 279 #define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 118 #define FIX_COUNT 119
tFixDesc fixDescList[ FIX_COUNT ] = { tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList, { zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
...@@ -4809,6 +4863,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4809,6 +4863,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AVOID_BOOL_TEST_CT, FD_MACH_ONLY, AVOID_BOOL_TEST_CT, FD_MACH_ONLY,
aAvoid_BoolTests, apzAvoid_BoolPatch }, aAvoid_BoolTests, apzAvoid_BoolPatch },
{ zBad_LvalName, zBad_LvalList,
apzBad_LvalMachs,
BAD_LVAL_TEST_CT, FD_MACH_ONLY,
aBad_LvalTests, apzBad_LvalPatch },
{ zBad_Struct_TermName, zBad_Struct_TermList, { zBad_Struct_TermName, zBad_Struct_TermList,
apzBad_Struct_TermMachs, apzBad_Struct_TermMachs,
BAD_STRUCT_TERM_TEST_CT, FD_MACH_ONLY, BAD_STRUCT_TERM_TEST_CT, FD_MACH_ONLY,
...@@ -4819,11 +4878,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4819,11 +4878,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
BADQUOTE_TEST_CT, FD_MACH_ONLY, BADQUOTE_TEST_CT, FD_MACH_ONLY,
aBadquoteTests, apzBadquotePatch }, aBadquoteTests, apzBadquotePatch },
{ zBad_LvalName, zBad_LvalList,
apzBad_LvalMachs,
BAD_LVAL_TEST_CT, FD_MACH_ONLY,
aBad_LvalTests, apzBad_LvalPatch },
{ zBroken_Assert_StdioName, zBroken_Assert_StdioList, { zBroken_Assert_StdioName, zBroken_Assert_StdioList,
apzBroken_Assert_StdioMachs, apzBroken_Assert_StdioMachs,
BROKEN_ASSERT_STDIO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, BROKEN_ASSERT_STDIO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
...@@ -4839,6 +4893,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4839,6 +4893,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
BROKEN_CABS_TEST_CT, FD_MACH_ONLY, BROKEN_CABS_TEST_CT, FD_MACH_ONLY,
aBroken_CabsTests, apzBroken_CabsPatch }, aBroken_CabsTests, apzBroken_CabsPatch },
{ zCtrl_Quotes_DefName, zCtrl_Quotes_DefList,
apzCtrl_Quotes_DefMachs,
CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_Quotes_DefTests, apzCtrl_Quotes_DefPatch },
{ zCtrl_Quotes_UseName, zCtrl_Quotes_UseList,
apzCtrl_Quotes_UseMachs,
CTRL_QUOTES_USE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_Quotes_UseTests, apzCtrl_Quotes_UsePatch },
{ zCxx_UnreadyName, zCxx_UnreadyList,
apzCxx_UnreadyMachs,
CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCxx_UnreadyTests, apzCxx_UnreadyPatch },
{ zDec_Intern_AsmName, zDec_Intern_AsmList, { zDec_Intern_AsmName, zDec_Intern_AsmList,
apzDec_Intern_AsmMachs, apzDec_Intern_AsmMachs,
DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY, DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY,
...@@ -4849,6 +4918,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4849,6 +4918,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ECD_CURSOR_TEST_CT, FD_MACH_ONLY, ECD_CURSOR_TEST_CT, FD_MACH_ONLY,
aEcd_CursorTests, apzEcd_CursorPatch }, aEcd_CursorTests, apzEcd_CursorPatch },
{ zFix_Header_BreakageName, zFix_Header_BreakageList,
apzFix_Header_BreakageMachs,
FIX_HEADER_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aFix_Header_BreakageTests, apzFix_Header_BreakagePatch },
{ zHp_InlineName, zHp_InlineList, { zHp_InlineName, zHp_InlineList,
apzHp_InlineMachs, apzHp_InlineMachs,
HP_INLINE_TEST_CT, FD_MACH_ONLY, HP_INLINE_TEST_CT, FD_MACH_ONLY,
...@@ -4859,21 +4933,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4859,21 +4933,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HP_SYSFILE_TEST_CT, FD_MACH_ONLY, HP_SYSFILE_TEST_CT, FD_MACH_ONLY,
aHp_SysfileTests, apzHp_SysfilePatch }, aHp_SysfileTests, apzHp_SysfilePatch },
{ zCxx_UnreadyName, zCxx_UnreadyList,
apzCxx_UnreadyMachs,
CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCxx_UnreadyTests, apzCxx_UnreadyPatch },
{ zHpux_MaxintName, zHpux_MaxintList,
apzHpux_MaxintMachs,
HPUX_MAXINT_TEST_CT, FD_MACH_ONLY,
aHpux_MaxintTests, apzHpux_MaxintPatch },
{ zHpux_SystimeName, zHpux_SystimeList,
apzHpux_SystimeMachs,
HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY,
aHpux_SystimeTests, apzHpux_SystimePatch },
{ zHpux8_Bogus_InlinesName, zHpux8_Bogus_InlinesList, { zHpux8_Bogus_InlinesName, zHpux8_Bogus_InlinesList,
apzHpux8_Bogus_InlinesMachs, apzHpux8_Bogus_InlinesMachs,
HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY, HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY,
...@@ -4881,12 +4940,12 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4881,12 +4940,12 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zHpux11_Uint32_CName, zHpux11_Uint32_CList, { zHpux11_Uint32_CName, zHpux11_Uint32_CList,
apzHpux11_Uint32_CMachs, apzHpux11_Uint32_CMachs,
HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY, HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux11_Uint32_CTests, apzHpux11_Uint32_CPatch }, aHpux11_Uint32_CTests, apzHpux11_Uint32_CPatch },
{ zIsc_Omits_With_StdcName, zIsc_Omits_With_StdcList, { zIsc_Omits_With_StdcName, zIsc_Omits_With_StdcList,
apzIsc_Omits_With_StdcMachs, apzIsc_Omits_With_StdcMachs,
ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY, ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIsc_Omits_With_StdcTests, apzIsc_Omits_With_StdcPatch }, aIsc_Omits_With_StdcTests, apzIsc_Omits_With_StdcPatch },
{ zIo_Quotes_DefName, zIo_Quotes_DefList, { zIo_Quotes_DefName, zIo_Quotes_DefList,
...@@ -4899,84 +4958,64 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -4899,84 +4958,64 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
IO_QUOTES_USE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, IO_QUOTES_USE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_Quotes_UseTests, apzIo_Quotes_UsePatch }, aIo_Quotes_UseTests, apzIo_Quotes_UsePatch },
{ zCtrl_Quotes_DefName, zCtrl_Quotes_DefList, { zHpux_MaxintName, zHpux_MaxintList,
apzCtrl_Quotes_DefMachs, apzHpux_MaxintMachs,
CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, HPUX_MAXINT_TEST_CT, FD_MACH_ONLY,
aCtrl_Quotes_DefTests, apzCtrl_Quotes_DefPatch }, aHpux_MaxintTests, apzHpux_MaxintPatch },
{ zCtrl_Quotes_UseName, zCtrl_Quotes_UseList, { zHpux_SystimeName, zHpux_SystimeList,
apzCtrl_Quotes_UseMachs, apzHpux_SystimeMachs,
CTRL_QUOTES_USE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY,
aCtrl_Quotes_UseTests, apzCtrl_Quotes_UsePatch }, aHpux_SystimeTests, apzHpux_SystimePatch },
{ zIp_Missing_SemiName, zIp_Missing_SemiList, { zIp_Missing_SemiName, zIp_Missing_SemiList,
apzIp_Missing_SemiMachs, apzIp_Missing_SemiMachs,
IP_MISSING_SEMI_TEST_CT, FD_MACH_ONLY, IP_MISSING_SEMI_TEST_CT, FD_MACH_ONLY,
aIp_Missing_SemiTests, apzIp_Missing_SemiPatch }, aIp_Missing_SemiTests, apzIp_Missing_SemiPatch },
{ zIrix_Asm_ApostropheName, zIrix_Asm_ApostropheList,
apzIrix_Asm_ApostropheMachs,
IRIX_ASM_APOSTROPHE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIrix_Asm_ApostropheTests, apzIrix_Asm_ApostrophePatch },
{ zIrix_Multiline_CmntName, zIrix_Multiline_CmntList, { zIrix_Multiline_CmntName, zIrix_Multiline_CmntList,
apzIrix_Multiline_CmntMachs, apzIrix_Multiline_CmntMachs,
IRIX_MULTILINE_CMNT_TEST_CT, FD_MACH_ONLY, IRIX_MULTILINE_CMNT_TEST_CT, FD_MACH_ONLY,
aIrix_Multiline_CmntTests, apzIrix_Multiline_CmntPatch }, aIrix_Multiline_CmntTests, apzIrix_Multiline_CmntPatch },
{ zIrix_SockaddrName, zIrix_SockaddrList,
apzIrix_SockaddrMachs,
IRIX_SOCKADDR_TEST_CT, FD_MACH_ONLY,
aIrix_SockaddrTests, apzIrix_SockaddrPatch },
{ zIrix_Struct__FileName, zIrix_Struct__FileList,
apzIrix_Struct__FileMachs,
IRIX_STRUCT__FILE_TEST_CT, FD_MACH_ONLY,
aIrix_Struct__FileTests, apzIrix_Struct__FilePatch },
{ zIrix_Asm_ApostropheName, zIrix_Asm_ApostropheList,
apzIrix_Asm_ApostropheMachs,
IRIX_ASM_APOSTROPHE_TEST_CT, FD_MACH_ONLY,
aIrix_Asm_ApostropheTests, apzIrix_Asm_ApostrophePatch },
{ zIsc_FmodName, zIsc_FmodList, { zIsc_FmodName, zIsc_FmodList,
apzIsc_FmodMachs, apzIsc_FmodMachs,
ISC_FMOD_TEST_CT, FD_MACH_ONLY, ISC_FMOD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIsc_FmodTests, apzIsc_FmodPatch }, aIsc_FmodTests, apzIsc_FmodPatch },
{ zMotorola_NestedName, zMotorola_NestedList,
apzMotorola_NestedMachs,
MOTOROLA_NESTED_TEST_CT, FD_MACH_ONLY,
aMotorola_NestedTests, apzMotorola_NestedPatch },
{ zIsc_Sys_LimitsName, zIsc_Sys_LimitsList,
apzIsc_Sys_LimitsMachs,
ISC_SYS_LIMITS_TEST_CT, FD_MACH_ONLY,
aIsc_Sys_LimitsTests, apzIsc_Sys_LimitsPatch },
{ zKandr_ConcatName, zKandr_ConcatList, { zKandr_ConcatName, zKandr_ConcatList,
apzKandr_ConcatMachs, apzKandr_ConcatMachs,
KANDR_CONCAT_TEST_CT, FD_MACH_ONLY, KANDR_CONCAT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aKandr_ConcatTests, apzKandr_ConcatPatch }, aKandr_ConcatTests, apzKandr_ConcatPatch },
{ zLimits_IfndefsName, zLimits_IfndefsList, { zLimits_IfndefsName, zLimits_IfndefsList,
apzLimits_IfndefsMachs, apzLimits_IfndefsMachs,
LIMITS_IFNDEFS_TEST_CT, FD_MACH_ONLY, LIMITS_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aLimits_IfndefsTests, apzLimits_IfndefsPatch }, aLimits_IfndefsTests, apzLimits_IfndefsPatch },
{ zLynx_Void_IntName, zLynx_Void_IntList, { zLynx_Void_IntName, zLynx_Void_IntList,
apzLynx_Void_IntMachs, apzLynx_Void_IntMachs,
LYNX_VOID_INT_TEST_CT, FD_MACH_ONLY, LYNX_VOID_INT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aLynx_Void_IntTests, apzLynx_Void_IntPatch }, aLynx_Void_IntTests, apzLynx_Void_IntPatch },
{ zLynxos_Fcntl_ProtoName, zLynxos_Fcntl_ProtoList, { zLynxos_Fcntl_ProtoName, zLynxos_Fcntl_ProtoList,
apzLynxos_Fcntl_ProtoMachs, apzLynxos_Fcntl_ProtoMachs,
LYNXOS_FCNTL_PROTO_TEST_CT, FD_MACH_ONLY, LYNXOS_FCNTL_PROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aLynxos_Fcntl_ProtoTests, apzLynxos_Fcntl_ProtoPatch }, aLynxos_Fcntl_ProtoTests, apzLynxos_Fcntl_ProtoPatch },
{ zM88k_Bad_Hypot_OptName, zM88k_Bad_Hypot_OptList, { zM88k_Bad_Hypot_OptName, zM88k_Bad_Hypot_OptList,
apzM88k_Bad_Hypot_OptMachs, apzM88k_Bad_Hypot_OptMachs,
M88K_BAD_HYPOT_OPT_TEST_CT, FD_MACH_ONLY, M88K_BAD_HYPOT_OPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aM88k_Bad_Hypot_OptTests, apzM88k_Bad_Hypot_OptPatch }, aM88k_Bad_Hypot_OptTests, apzM88k_Bad_Hypot_OptPatch },
{ zM88k_Bad_S_IfName, zM88k_Bad_S_IfList, { zM88k_Bad_S_IfName, zM88k_Bad_S_IfList,
apzM88k_Bad_S_IfMachs, apzM88k_Bad_S_IfMachs,
M88K_BAD_S_IF_TEST_CT, FD_MACH_ONLY, M88K_BAD_S_IF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aM88k_Bad_S_IfTests, apzM88k_Bad_S_IfPatch }, aM88k_Bad_S_IfTests, apzM88k_Bad_S_IfPatch },
{ zM88k_Multi_InclName, zM88k_Multi_InclList, { zM88k_Multi_InclName, zM88k_Multi_InclList,
...@@ -5009,10 +5048,25 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -5009,10 +5048,25 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
MATH_HUGE_VAL_IFNDEF_TEST_CT, FD_MACH_ONLY, MATH_HUGE_VAL_IFNDEF_TEST_CT, FD_MACH_ONLY,
aMath_Huge_Val_IfndefTests, apzMath_Huge_Val_IfndefPatch }, aMath_Huge_Val_IfndefTests, apzMath_Huge_Val_IfndefPatch },
{ zNested_CommentName, zNested_CommentList, { zNested_MotorolaName, zNested_MotorolaList,
apzNested_CommentMachs, apzNested_MotorolaMachs,
NESTED_COMMENT_TEST_CT, FD_MACH_ONLY, NESTED_MOTOROLA_TEST_CT, FD_MACH_ONLY,
aNested_CommentTests, apzNested_CommentPatch }, aNested_MotorolaTests, apzNested_MotorolaPatch },
{ zNested_Sys_LimitsName, zNested_Sys_LimitsList,
apzNested_Sys_LimitsMachs,
NESTED_SYS_LIMITS_TEST_CT, FD_MACH_ONLY,
aNested_Sys_LimitsTests, apzNested_Sys_LimitsPatch },
{ zNested_Auth_DesName, zNested_Auth_DesList,
apzNested_Auth_DesMachs,
NESTED_AUTH_DES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aNested_Auth_DesTests, apzNested_Auth_DesPatch },
{ zNested_UltrixName, zNested_UltrixList,
apzNested_UltrixMachs,
NESTED_ULTRIX_TEST_CT, FD_MACH_ONLY,
aNested_UltrixTests, apzNested_UltrixPatch },
{ zNews_Os_RecursionName, zNews_Os_RecursionList, { zNews_Os_RecursionName, zNews_Os_RecursionList,
apzNews_Os_RecursionMachs, apzNews_Os_RecursionMachs,
...@@ -5079,16 +5133,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -5079,16 +5133,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
RS6000_PARAM_TEST_CT, FD_MACH_ONLY, RS6000_PARAM_TEST_CT, FD_MACH_ONLY,
aRs6000_ParamTests, apzRs6000_ParamPatch }, aRs6000_ParamTests, apzRs6000_ParamPatch },
{ zSco_Strict_AnsiName, zSco_Strict_AnsiList,
apzSco_Strict_AnsiMachs,
SCO_STRICT_ANSI_TEST_CT, FD_MACH_ONLY,
aSco_Strict_AnsiTests, apzSco_Strict_AnsiPatch },
{ zSco_Static_FuncName, zSco_Static_FuncList, { zSco_Static_FuncName, zSco_Static_FuncList,
apzSco_Static_FuncMachs, apzSco_Static_FuncMachs,
SCO_STATIC_FUNC_TEST_CT, FD_MACH_ONLY, SCO_STATIC_FUNC_TEST_CT, FD_MACH_ONLY,
aSco_Static_FuncTests, apzSco_Static_FuncPatch }, aSco_Static_FuncTests, apzSco_Static_FuncPatch },
{ zSco_Strict_AnsiName, zSco_Strict_AnsiList,
apzSco_Strict_AnsiMachs,
SCO_STRICT_ANSI_TEST_CT, FD_MACH_ONLY,
aSco_Strict_AnsiTests, apzSco_Strict_AnsiPatch },
{ zSco_UtimeName, zSco_UtimeList, { zSco_UtimeName, zSco_UtimeList,
apzSco_UtimeMachs, apzSco_UtimeMachs,
SCO_UTIME_TEST_CT, FD_MACH_ONLY, SCO_UTIME_TEST_CT, FD_MACH_ONLY,
...@@ -5114,6 +5168,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -5114,6 +5168,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY, STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY,
aStdio_Va_ListTests, apzStdio_Va_ListPatch }, aStdio_Va_ListTests, apzStdio_Va_ListPatch },
{ zStruct_FileName, zStruct_FileList,
apzStruct_FileMachs,
STRUCT_FILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aStruct_FileTests, apzStruct_FilePatch },
{ zStruct_SockaddrName, zStruct_SockaddrList,
apzStruct_SockaddrMachs,
STRUCT_SOCKADDR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aStruct_SockaddrTests, apzStruct_SockaddrPatch },
{ zSun_Auth_ProtoName, zSun_Auth_ProtoList, { zSun_Auth_ProtoName, zSun_Auth_ProtoList,
apzSun_Auth_ProtoMachs, apzSun_Auth_ProtoMachs,
SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY, SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY,
...@@ -5199,11 +5263,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -5199,11 +5263,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
TINFO_CPLUSPLUS_TEST_CT, FD_MACH_ONLY, TINFO_CPLUSPLUS_TEST_CT, FD_MACH_ONLY,
aTinfo_CplusplusTests, apzTinfo_CplusplusPatch }, aTinfo_CplusplusTests, apzTinfo_CplusplusPatch },
{ zUltrix_Fix_FixprotoName, zUltrix_Fix_FixprotoList,
apzUltrix_Fix_FixprotoMachs,
ULTRIX_FIX_FIXPROTO_TEST_CT, FD_MACH_ONLY,
aUltrix_Fix_FixprotoTests, apzUltrix_Fix_FixprotoPatch },
{ zUltrix_Atof_ParamName, zUltrix_Atof_ParamList, { zUltrix_Atof_ParamName, zUltrix_Atof_ParamList,
apzUltrix_Atof_ParamMachs, apzUltrix_Atof_ParamMachs,
ULTRIX_ATOF_PARAM_TEST_CT, FD_MACH_ONLY, ULTRIX_ATOF_PARAM_TEST_CT, FD_MACH_ONLY,
...@@ -5214,16 +5273,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -5214,16 +5273,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ULTRIX_CONST_TEST_CT, FD_MACH_ONLY, ULTRIX_CONST_TEST_CT, FD_MACH_ONLY,
aUltrix_ConstTests, apzUltrix_ConstPatch }, aUltrix_ConstTests, apzUltrix_ConstPatch },
{ zUltrix_Fix_FixprotoName, zUltrix_Fix_FixprotoList,
apzUltrix_Fix_FixprotoMachs,
ULTRIX_FIX_FIXPROTO_TEST_CT, FD_MACH_ONLY,
aUltrix_Fix_FixprotoTests, apzUltrix_Fix_FixprotoPatch },
{ zUltrix_IfdefName, zUltrix_IfdefList, { zUltrix_IfdefName, zUltrix_IfdefList,
apzUltrix_IfdefMachs, apzUltrix_IfdefMachs,
ULTRIX_IFDEF_TEST_CT, FD_MACH_ONLY, ULTRIX_IFDEF_TEST_CT, FD_MACH_ONLY,
aUltrix_IfdefTests, apzUltrix_IfdefPatch }, aUltrix_IfdefTests, apzUltrix_IfdefPatch },
{ zUltrix_Nested_CmntName, zUltrix_Nested_CmntList,
apzUltrix_Nested_CmntMachs,
ULTRIX_NESTED_CMNT_TEST_CT, FD_MACH_ONLY,
aUltrix_Nested_CmntTests, apzUltrix_Nested_CmntPatch },
{ zUltrix_StaticName, zUltrix_StaticList, { zUltrix_StaticName, zUltrix_StaticList,
apzUltrix_StaticMachs, apzUltrix_StaticMachs,
ULTRIX_STATIC_TEST_CT, FD_MACH_ONLY, ULTRIX_STATIC_TEST_CT, FD_MACH_ONLY,
......
...@@ -685,31 +685,6 @@ fix = { ...@@ -685,31 +685,6 @@ fix = {
/* /*
* Fix `typedef struct term;' on hppa1.1-hp-hpux9.
*/
fix = {
hackname = bad_struct_term;
files = curses.h;
select = "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;";
sed = "s/^[ \t]*typedef[ \t][ \t]*"
"\\(struct[ \t][ \t]*term[ \t]*;[ \t]*\\)$/\\1/";
test_text = 'typedef struct term;';
};
/*
* Fix one other error in this file:
* a mismatched quote not inside a C comment.
*/
fix = {
hackname = badquote;
files = sundev/vuid_event.h;
sed = "s/doesn't/does not/";
test_text = "/* doesn't have matched single quotes */";
};
/*
* Fix #defines under Alpha OSF/1: * Fix #defines under Alpha OSF/1:
* The following files contain '#pragma extern_prefix "_FOO"' followed by * The following files contain '#pragma extern_prefix "_FOO"' followed by
* a '#define something(x,y,z) _FOOsomething(x,y,z)'. The intent of these * a '#define something(x,y,z) _FOOsomething(x,y,z)'. The intent of these
...@@ -749,6 +724,31 @@ fix = { ...@@ -749,6 +724,31 @@ fix = {
/* /*
* Fix `typedef struct term;' on hppa1.1-hp-hpux9.
*/
fix = {
hackname = bad_struct_term;
files = curses.h;
select = "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;";
sed = "s/^[ \t]*typedef[ \t][ \t]*"
"\\(struct[ \t][ \t]*term[ \t]*;[ \t]*\\)$/\\1/";
test_text = 'typedef struct term;';
};
/*
* Fix one other error in this file:
* a mismatched quote not inside a C comment.
*/
fix = {
hackname = badquote;
files = sundev/vuid_event.h;
sed = "s/doesn't/does not/";
test_text = "/* doesn't have matched single quotes */";
};
/*
* check for broken assert.h that needs stdio.h * check for broken assert.h that needs stdio.h
*/ */
fix = { fix = {
...@@ -797,6 +797,66 @@ fix = { ...@@ -797,6 +797,66 @@ fix = {
/* /*
* Fix various macros used to define ioctl numbers.
* The traditional syntax was:
*
* #define _CTRL(n, x) (('n'<<8)+x)
* #define TCTRLCFOO _CTRL(T, 1)
*
* but this does not work with the C standard, which disallows macro
* expansion inside strings. We have to rewrite it thus:
*
* #define _CTRL(n, x) ((n<<8)+x)
* #define TCTRLCFOO _CTRL('T', 1)
*
* The select expressions match too much, but the c_fix code is cautious.
*
* CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ...
*/
fix = {
hackname = ctrl_quotes_def;
select = "define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
c_fix = char_macro_def;
c_fix_arg = "CTRL";
test_text = "#define BSD43_CTRL(n, x) (('n'<<8)+x)";
};
fix = {
hackname = ctrl_quotes_use;
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
c_fix = char_macro_use;
c_fix_arg = "CTRL";
test_text = "#define TIOCFOO BSD43_CTRL(T, 1)";
};
/*
* sys/mman.h on HP/UX is not C++ ready,
* even though NO_IMPLICIT_EXTERN_C is defined on HP/UX.
*
* rpc/types.h on OSF1/2.0 is not C++ ready, even though NO_IMPLICIT_EXTERN_C
* is defined for the alpha. The problem is the declaration of malloc.
*/
fix = {
hackname = cxx_unready;
files = sys/mman.h;
files = rpc/types.h;
select = '[^#]+malloc.*;'; /* Catch any form of declaration
not within a macro. */
bypass = '"C"|__BEGIN_DECLS';
c_fix = wrap;
c_fix_arg = "#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n";
c_fix_arg = "#ifdef __cplusplus\n"
"}\n"
"#endif\n";
test_text = "extern void* malloc( size_t );";
};
/*
* Fix <c_asm.h> on Digital UNIX V4.0: * Fix <c_asm.h> on Digital UNIX V4.0:
* It contains a prototype for a DEC C internal asm() function, * It contains a prototype for a DEC C internal asm() function,
* clashing with gcc's asm keyword. So protect this with __DECC. * clashing with gcc's asm keyword. So protect this with __DECC.
...@@ -827,6 +887,22 @@ fix = { ...@@ -827,6 +887,22 @@ fix = {
/* /*
* fix-header doesn't fix fabs' prototype, and I have no idea why.
*/
fix = {
hackname = fix_header_breakage;
mach = "m88k-motorola-sysv3*";
files = "math.h";
select = 'extern double floor\(\), ceil\(\), fmod\(\), fabs\(\);';
c_fix = format;
c_fix_arg =
'extern double floor(), ceil(), fmod(), fabs _PARAMS((double));';
test_text = 'extern double floor(), ceil(), fmod(), fabs();';
};
/*
* Fix HP's use of ../machine/inline.h to refer to * Fix HP's use of ../machine/inline.h to refer to
* /usr/include/machine/inline.h * /usr/include/machine/inline.h
*/ */
...@@ -855,70 +931,19 @@ fix = { ...@@ -855,70 +931,19 @@ fix = {
/* /*
* sys/mman.h on HP/UX is not C++ ready,
* even though NO_IMPLICIT_EXTERN_C is defined on HP/UX.
*
* rpc/types.h on OSF1/2.0 is not C++ ready, even though NO_IMPLICIT_EXTERN_C
* is defined for the alpha. The problem is the declaration of malloc.
*/
fix = {
hackname = cxx_unready;
files = sys/mman.h;
files = rpc/types.h;
select = '[^#]+malloc.*;'; /* Catch any form of declaration
not within a macro. */
bypass = '"C"|__BEGIN_DECLS';
c_fix = wrap;
c_fix_arg = "#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n";
c_fix_arg = "#ifdef __cplusplus\n"
"}\n"
"#endif\n";
test_text = "extern void* malloc( size_t );";
};
/*
* HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
*/
fix = {
hackname = hpux_maxint;
files = sys/param.h;
select = "^#[ \t]*define[ \t]*MAXINT[ \t]";
sed = "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n"
"#ifndef MAXINT\n";
sed = "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n"
"#endif\n";
test_text = '#define MAXINT 0x7FFFFFFF';
};
/*
* Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
*/
fix = {
hackname = hpux_systime;
files = sys/time.h;
select = "^extern struct sigevent;";
sed = "s/^extern struct sigevent;/struct sigevent;/";
test_text = 'extern struct sigevent;';
};
/*
* get rid of bogus inline definitions in HP-UX 8.0 * get rid of bogus inline definitions in HP-UX 8.0
*/ */
fix = { fix = {
hackname = hpux8_bogus_inlines; hackname = hpux8_bogus_inlines;
files = math.h; files = math.h;
select = inline; select = inline;
sed = "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@"; 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 double abs(double [a-z][a-z]*) {.*}@@";
sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@"; sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@"; sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n"
"inline double sqr(double v) { return v**0.5; }";
}; };
...@@ -937,14 +962,16 @@ fix = { ...@@ -937,14 +962,16 @@ fix = {
* A more specific solution, the one used here, is to change the UINT32_C * A more specific solution, the one used here, is to change the UINT32_C
* macro to not used macros in the arguments to __CONCAT__. * macro to not used macros in the arguments to __CONCAT__.
*/ */
fix = { fix = {
hackname = hpux11_uint32_c; hackname = hpux11_uint32_c;
files = inttypes.h; files = inttypes.h;
select = "^#define UINT32_C\\(__c\\)[ \t]*" select = "^#define UINT32_C\\(__c\\)[ \t]*"
"__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)"; "__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)";
sed = "s/^#define UINT32_C(__c)\\([ \t]*\\)__CONCAT__(__CONCAT_U__(__c),l)/#define UINT32_C(__c)\\1__CONCAT__(__c,ul)/"; c_fix = format;
c_fix_arg = '#define UINT32_C(__c) __CONCAT__(__c,ul)'; c_fix_arg = '#define UINT32_C(__c) __CONCAT__(__c,ul)';
test_text =
"#define CONCAT_U__(__c)\t__CONCAT__(__c,u)\n"
"#define UINT32_C(__c)\t__CONCAT__(__CONCAT_U__(__c),l)";
}; };
/* /*
...@@ -956,17 +983,16 @@ fix = { ...@@ -956,17 +983,16 @@ fix = {
fix = { fix = {
hackname = isc_omits_with_stdc; hackname = isc_omits_with_stdc;
files = "stdio.h"; files = "stdio.h";
files = "math.h"; files = "math.h";
files = "ctype.h"; files = "ctype.h";
files = "sys/limits.h"; files = "sys/limits.h";
files = "sys/fcntl.h"; files = "sys/fcntl.h";
files = "sys/dirent.h"; files = "sys/dirent.h";
select = '!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)';
sed = "s/!defined(__STDC__) && !defined(_POSIX_SOURCE)/" select = '!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)';
"!defined(_POSIX_SOURCE)/"; c_fix = format;
c_fix_arg = '!defined(_POSIX_SOURCE)';
test_text = "#if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */" test_text = "#if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */"
"\nint foo;\n#endif"; "\nint foo;\n#endif";
}; };
...@@ -1004,88 +1030,50 @@ fix = { ...@@ -1004,88 +1030,50 @@ fix = {
c_fix_arg = "IO"; c_fix_arg = "IO";
test_text = "#define TIOCFOO BSD43__IOWR(T, 1)"; test_text = "#define TIOCFOO BSD43__IOWR(T, 1)";
}; };
/*
* Fix various macros used to define ioctl numbers.
* The traditional syntax was:
*
* #define _CTRL(n, x) (('n'<<8)+x)
* #define TCTRLCFOO _CTRL(T, 1)
*
* but this does not work with the C standard, which disallows macro
* expansion inside strings. We have to rewrite it thus:
*
* #define _CTRL(n, x) ((n<<8)+x)
* #define TCTRLCFOO _CTRL('T', 1)
*
* The select expressions match too much, but the c_fix code is cautious.
*
* CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ...
*/
fix = {
hackname = ctrl_quotes_def;
select = "define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
c_fix = char_macro_def;
c_fix_arg = "CTRL";
test_text = "#define BSD43_CTRL(n, x) (('n'<<8)+x)";
};
fix = {
hackname = ctrl_quotes_use;
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
c_fix = char_macro_use;
c_fix_arg = "CTRL";
test_text = "#define TIOCFOO BSD43_CTRL(T, 1)";
};
/* /*
* Check for missing ';' in struct * HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
*/
fix = {
hackname = ip_missing_semi;
files = netinet/ip.h;
select = "}$";
sed = "/^struct/,/^};/s/}$/};/";
};
/*
* Some IRIX header files contain the string "//"
*/ */
fix = { fix = {
hackname = irix_multiline_cmnt; hackname = hpux_maxint;
files = sys/types.h; files = sys/param.h;
select = "^#[ \t]*define[ \t]*MAXINT[ \t]";
sed = "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n"
"#ifndef MAXINT\n";
sed = "s@type of the result@type of the result */@"; sed = "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n"
sed = "s@of the sizeof@/* of the sizeof@"; "#endif\n";
test_text = '#define MAXINT 0x7FFFFFFF';
}; };
/* /*
* IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr * Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
* in prototype without previous definition.
*/ */
fix = { fix = {
hackname = irix_sockaddr; hackname = hpux_systime;
files = rpc/auth.h; files = sys/time.h;
select = "authdes_create.*struct sockaddr"; select = "^extern struct sigevent;";
bypass = "<sys/socket\.h>"; sed = "s/^extern struct sigevent;/struct sigevent;/";
sed = "/authdes_create.*struct sockaddr/i\\\n" test_text = 'extern struct sigevent;';
"struct sockaddr;\n";
}; };
/* /*
* IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s * Check for missing ';' in struct
* in prototype without previous definition.
*/ */
fix = { fix = {
hackname = irix_struct__file; hackname = ip_missing_semi;
files = rpc/xdr.h; files = netinet/ip.h;
sed = "/xdrstdio_create.*struct __file_s/i\\\n" select = "}$";
"struct __file_s;\n"; sed = "/^struct/,/^};/s/}$/};/";
test_text=
"struct mumble {\n"
" union {\n"
" int x;\n"
" }\n"
"}; /* mumbled struct */\n";
}; };
...@@ -1095,49 +1083,42 @@ fix = { ...@@ -1095,49 +1083,42 @@ fix = {
* unterminated character constant. * unterminated character constant.
*/ */
fix = { fix = {
hackname = irix_asm_apostrophe; hackname = irix_asm_apostrophe;
files = sys/asm.h; files = sys/asm.h;
select = "^[ \t]*#.*[Ww]e're"; select = "^[ \t]*#.*[Ww]e're";
sed = "/^[ \t]*#/s/\\([Ww]e\\)'re/\\1 are/"; c_fix = format;
c_fix_arg = "%1 are";
c_fix_arg = "^([ \t]*#.*[Ww]e)'re";
test_text = "\t# and we're on vacation";
}; };
/* /*
* Fixing ISC fmod declaration * Some IRIX header files contain the string "//"
*/ */
fix = { fix = {
hackname = isc_fmod; hackname = irix_multiline_cmnt;
files = math.h; files = sys/types.h;
select = 'fmod\(double\)';
sed = "s/fmod(double)/fmod(double, double)/";
};
sed = "s@type of the result@type of the result */@";
/* sed = "s@of the sizeof@/* of the sizeof@";
* Fix nested comments in Motorola's <limits.h> and <sys/limits.h> test_text =
*/ "/* we check the type of the result\n"
fix = { "// of the sizeof something. This is a bad test :-( */";
hackname = motorola_nested;
mach = "m68k-motorola-sysv*";
files = limits.h;
files = sys/limits.h;
sed = "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*"
"/\\* max # bytes atomic in write to a\\)$@\\1 */@";
sed = "s@\\(/\\*#define\tHUGE_VAL\t3.40282346638528860e+38 \\)"
"\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@";
}; };
/* /*
* Fixing nested comments in ISC <sys/limits.h> * Fixing ISC fmod declaration
*/ */
fix = { fix = {
hackname = isc_sys_limits; hackname = isc_fmod;
files = sys/limits.h; files = math.h;
select = CHILD_MAX; select = 'fmod\(double\)';
sed = "/CHILD_MAX/s,/\\* Max, Max,"; c_fix = format;
sed = "/OPEN_MAX/s,/\\* Max, Max,"; c_fix_arg = "fmod(double, double)";
test_text = "extern double fmod(double);";
}; };
...@@ -1166,7 +1147,9 @@ fix = { ...@@ -1166,7 +1147,9 @@ fix = {
files = "Xm.acorn/XmP.h"; files = "Xm.acorn/XmP.h";
files = bsd43/bsd43_.h; files = bsd43/bsd43_.h;
select = '/\*\*/'; select = '/\*\*/';
sed = 's|/\*\*/|##|g'; c_fix = format;
c_fix_arg = '##';
test_text = "#define __CONCAT__(a,b) a/**/b";
}; };
...@@ -1178,7 +1161,6 @@ fix = { ...@@ -1178,7 +1161,6 @@ fix = {
* comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if * comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if
* we find a #ifndef FLT_MIN we assume that all the required #ifndefs * we find a #ifndef FLT_MIN we assume that all the required #ifndefs
* are there, and we do not add them ourselves. * are there, and we do not add them ourselves.
* Also fix a nested comment problem in sys/limits.h on Motorola sysV68 R3V7.1
*/ */
fix = { fix = {
hackname = limits_ifndefs; hackname = limits_ifndefs;
...@@ -1186,19 +1168,12 @@ fix = { ...@@ -1186,19 +1168,12 @@ fix = {
files = "sys/limits.h"; files = "sys/limits.h";
bypass = "ifndef[ \t]+FLT_MIN"; bypass = "ifndef[ \t]+FLT_MIN";
sed = "/[ \t]FLT_MIN[ \t]/i\\\n#ifndef FLT_MIN\n"; c_fix = format;
sed = "/[ \t]FLT_MIN[ \t]/a\\\n#endif\n"; c_fix_arg = "#ifndef %1\n%0#endif\n";
sed = "/[ \t]FLT_MAX[ \t]/i\\\n#ifndef FLT_MAX\n"; c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+"
sed = "/[ \t]FLT_MAX[ \t]/a\\\n#endif\n"; "((FLT|DBL)_(MIN|MAX|DIG))"
sed = "/[ \t]FLT_DIG[ \t]/i\\\n#ifndef FLT_DIG\n"; "[ \t][^\n]*\n";
sed = "/[ \t]FLT_DIG[ \t]/a\\\n#endif\n"; test_text = " #\tdefine\tDBL_DIG \t 0 /* somthin' */";
sed = "/[ \t]DBL_MIN[ \t]/i\\\n#ifndef DBL_MIN\n";
sed = "/[ \t]DBL_MIN[ \t]/a\\\n#endif\n";
sed = "/[ \t]DBL_MAX[ \t]/i\\\n#ifndef DBL_MAX\n";
sed = "/[ \t]DBL_MAX[ \t]/a\\\n#endif\n";
sed = "/[ \t]DBL_DIG[ \t]/i\\\n#ifndef DBL_DIG\n";
sed = "/[ \t]DBL_DIG[ \t]/a\\\n#endif\n";
sed = "/^\\(\\/\\*#define\tHUGE_VAL\t3\\.[0-9e+]* *\\)\\/\\*/s//\\1/";
}; };
...@@ -1206,10 +1181,12 @@ fix = { ...@@ -1206,10 +1181,12 @@ fix = {
* Delete the '#define void int' line from curses.h on Lynx * Delete the '#define void int' line from curses.h on Lynx
*/ */
fix = { fix = {
hackname = lynx_void_int; hackname = lynx_void_int;
files = curses.h; files = curses.h;
select = "#[ \t]*define[ \t]+void[ \t]+int"; select = "#[ \t]*define[ \t]+void[ \t]+int[ \t]*";
sed = "/#[ \t]*define[ \t][ \t]*void[ \t]int/d"; c_fix = format;
c_fix_arg = "";
test_text = "# define\tvoid\tint \t/* curses foiled again */";
}; };
...@@ -1217,40 +1194,41 @@ fix = { ...@@ -1217,40 +1194,41 @@ fix = {
* Fix fcntl prototype in fcntl.h on LynxOS. * Fix fcntl prototype in fcntl.h on LynxOS.
*/ */
fix = { fix = {
hackname = lynxos_fcntl_proto; hackname = lynxos_fcntl_proto;
files = fcntl.h; files = fcntl.h;
select = 'fcntl.*\(int, int, int\)'; select = "fcntl[ \t]*" '\(int, int, int\)';
sed = 's/\(fcntl.*(int, int, \)int)/\1...)/'; c_fix = format;
c_fix_arg = '%1...)';
c_fix_arg = "(fcntl[ \t]*" '\(int, int, )int\)';
test_text = "extern int fcntl(int, int, int);";
}; };
/* /*
* libm.a on m88k-motorola-sysv3 contains a stupid optimization for * libm.a on m88k-motorola-sysv3 contains a stupid optimization for
* function hypot(), which returns the second argument without even * function hypot(), which returns the second argument without even
* looking at its value, if the other is 0.0. Another drawback is * looking at its value, if the other is 0.0.
* that fix-header doesn't fix fabs' prototype, and I have no idea why.
*/ */
fix = { fix = {
hackname = m88k_bad_hypot_opt; hackname = m88k_bad_hypot_opt;
mach = "m88k-motorola-sysv3*"; mach = "m88k-motorola-sysv3*";
files = "math.h"; files = "math.h";
select = "^extern double hypot\\(\\);\n";
sed = "s/extern double floor(), ceil(), fmod(), fabs();/" c_fix = format;
"extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/"; c_fix_arg = "%0"
"/* Workaround a stupid Motorola optimization if one\n"
sed = "/^extern double hypot();$/a\\\n" " of x or y is 0.0 and the other is negative! */\n"
"\\/* Workaround a stupid Motorola optimization if one\\\n" "#ifdef __STDC__\n"
" of x or y is 0.0 and the other is negative! *\\/\\\n" "static __inline__ double fake_hypot (double x, double y)\n"
"#ifdef __STDC__\\\n" "#else\n"
"static __inline__ double fake_hypot (double x, double y)\\\n" "static __inline__ double fake_hypot (x, y)\n"
"#else\\\n" "\tdouble x, y;\n"
"static __inline__ double fake_hypot (x, y)\\\n" "#endif\n"
"\tdouble x, y;\\\n" "{\n"
"#endif\\\n" "\treturn fabs (hypot (x, y));\n"
"{\\\n" "}\n"
"\treturn fabs (hypot (x, y));\\\n"
"}\\\n"
"#define hypot\tfake_hypot\n"; "#define hypot\tfake_hypot\n";
test_text = "extern double hypot();";
}; };
...@@ -1261,15 +1239,15 @@ fix = { ...@@ -1261,15 +1239,15 @@ fix = {
hackname = m88k_bad_s_if; hackname = m88k_bad_s_if;
mach = "m88k-*-sysv3*"; mach = "m88k-*-sysv3*";
files = sys/stat.h; files = sys/stat.h;
select = "#define[ \t]+S_IS[A-Z]*(m)[ \t]"; select = "#define[ \t]+S_IS[A-Z]+\\(m\\)[ \t]+\\(m[ \t]*&";
sed = "s/^\\(#define[ \t]*S_IS[A-Z]*(m)\\)[ \t]*" c_fix = format;
"(m[ \t]*&[ \t]*\\(S_IF[A-Z][A-Z][A-Z][A-Z]*\\)[ \t]*)/" c_fix_arg = '#define %1(m) (((m) & S_IFMT) == %2)';
"\\1 (((m)\\&S_IFMT)==\\2)/"; c_fix_arg = "#define[ \t]+(S_IS[A-Z]+)\\(m\\)[ \t]+"
"\\(m[ \t]*&[ \t]*"
sed = "s/^\\(#define[ \t]*S_IS[A-Z]*(m)\\)[ \t]*" "(S_IF[A-Z][A-Z][A-Z]+|0[0-9]+)"
"(m[ \t]*&[ \t]*\\(0[0-9]*\\)[ \t]*)/" "[ \t]*\\)";
"\\1 (((m)\\&S_IFMT)==\\2)/"; test_text = '#define S_ISREG(m) (m & S_IFREG) /* is regular? */';
}; };
...@@ -1382,13 +1360,55 @@ fix = { ...@@ -1382,13 +1360,55 @@ fix = {
sed = "/define[ \t]HUGE_VAL[ \t]/a\\\n#endif\n"; sed = "/define[ \t]HUGE_VAL[ \t]/a\\\n#endif\n";
}; };
/*
* Fix nested comments in Motorola's <limits.h> and <sys/limits.h>
*/
fix = {
hackname = nested_motorola;
mach = "m68k-motorola-sysv*";
files = limits.h;
files = sys/limits.h;
sed = "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*"
"/\\* max # bytes atomic in write to a\\)$@\\1 */@";
sed = "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)"
"\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@";
};
/*
* Fixing nested comments in ISC <sys/limits.h>
*/
fix = {
hackname = nested_sys_limits;
files = sys/limits.h;
select = CHILD_MAX;
sed = "/CHILD_MAX/s,/\\* Max, Max,";
sed = "/OPEN_MAX/s,/\\* Max, Max,";
test_text = "/*\n#define CHILD_MAX 20 /* Max, Max, ... */ /*\n"
"#define OPEN_MAX 20 /* Max, Max, ... */\n";
};
/* /*
* nested comment * nested comment
*/ */
fix = { fix = {
hackname = nested_comment; hackname = nested_auth_des;
files = rpc/rpc.h; files = rpc/rpc.h;
sed = 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\1*/ /*@'; select = '(/\*.*rpc/auth_des\.h>.*)/\*';
c_fix = format;
c_fix_arg = "%1*/ /*";
test_text = "/*#include <rpc/auth_des.h> /* skip this */";
};
/*
* Avoid nested comments on Ultrix 4.3.
*/
fix = {
hackname = nested_ultrix;
files = rpc/svc.h;
sed = "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@";
}; };
...@@ -1579,17 +1599,6 @@ fix = { ...@@ -1579,17 +1599,6 @@ fix = {
/* /*
* "!__STDC__" is "!defined( __STRICT_ANSI__ )"
*/
fix = {
hackname = sco_strict_ansi;
mach = "i?86-*-sco3.2*";
select = "^[ \t]*#[ \t]*if.*!__STDC__";
sed = 's/!__STDC__/!defined(__STRICT_ANSI__)/g';
};
/*
* The static functions lstat() and fchmod() in <sys/stat.h> * The static functions lstat() and fchmod() in <sys/stat.h>
* cause G++ grief since they're not wrapped in "if __cplusplus". * cause G++ grief since they're not wrapped in "if __cplusplus".
* *
...@@ -1615,6 +1624,17 @@ fix = { ...@@ -1615,6 +1624,17 @@ fix = {
/* /*
* "!__STDC__" is "!defined( __STRICT_ANSI__ )"
*/
fix = {
hackname = sco_strict_ansi;
mach = "i?86-*-sco3.2*";
select = "^[ \t]*#[ \t]*if.*!__STDC__";
sed = 's/!__STDC__/!defined(__STRICT_ANSI__)/g';
};
/*
* Fix prototype declaration of utime in sys/times.h. * Fix prototype declaration of utime in sys/times.h.
* In 3.2v4.0 the const is missing. * In 3.2v4.0 the const is missing.
*/ */
...@@ -1764,6 +1784,35 @@ fix = { ...@@ -1764,6 +1784,35 @@ fix = {
/* /*
* IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s
* in prototype without previous definition.
*/
fix = {
hackname = struct_file;
files = rpc/xdr.h;
select = '^.*xdrstdio_create.*struct __file_s';
c_fix = format;
c_fix_arg = "struct __file_s;\n%0";
test_text = "extern void xdrstdio_create( struct __file_s* );";
};
/*
* IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
* in prototype without previous definition.
*/
fix = {
hackname = struct_sockaddr;
files = rpc/auth.h;
select = "^.*authdes_create.*struct sockaddr";
bypass = "<sys/socket\.h>";
c_fix = format;
c_fix_arg = "struct sockaddr;\n%0";
test_text = "extern AUTH* authdes_create( struct sockaddr* );";
};
/*
* Apply fix this to all OSs since this problem seems to effect * Apply fix this to all OSs since this problem seems to effect
* more than just SunOS. * more than just SunOS.
*/ */
...@@ -2395,19 +2444,6 @@ fix = { ...@@ -2395,19 +2444,6 @@ fix = {
/* /*
* Ultrix V4.[35] puts the declaration of uname before the definition
* of struct utsname, so the prototype (added by fixproto) causes havoc.
*/
fix = {
hackname = ultrix_fix_fixproto;
files = sys/utsname.h;
select = ULTRIX;
sed = "/^[ \t]*extern[ \t]*int[ \t]*uname();$/i\\\n"
"struct utsname;\n";
};
/*
* parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R. * parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R.
*/ */
fix = { fix = {
...@@ -2442,23 +2478,26 @@ fix = { ...@@ -2442,23 +2478,26 @@ fix = {
/* /*
* Check for bad #ifdef line (in Ultrix 4.1) * Ultrix V4.[35] puts the declaration of uname before the definition
* of struct utsname, so the prototype (added by fixproto) causes havoc.
*/ */
fix = { fix = {
hackname = ultrix_ifdef; hackname = ultrix_fix_fixproto;
select = "#ifdef KERNEL[ \t]*[^ \t]"; files = sys/utsname.h;
files = sys/file.h; select = ULTRIX;
sed = "s/#ifdef KERNEL/#if defined(KERNEL)/"; sed = "/^[ \t]*extern[ \t]*int[ \t]*uname();$/i\\\n"
"struct utsname;\n";
}; };
/* /*
* Avoid nested comments on Ultrix 4.3. * Check for bad #ifdef line (in Ultrix 4.1)
*/ */
fix = { fix = {
hackname = ultrix_nested_cmnt; hackname = ultrix_ifdef;
files = rpc/svc.h; select = "#ifdef KERNEL[ \t]*[^ \t]";
sed = "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@"; files = sys/file.h;
sed = "s/#ifdef KERNEL/#if defined(KERNEL)/";
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment