#if defined( LYNXOS_FCNTL_PROTO_CHECK )
! extern int fcntl(int, int, ...);
#endif /* LYNXOS_FCNTL_PROTO_CHECK */
+*** inc/hsfs/hsfs_spec.h
+--- res/hsfs/hsfs_spec.h
+***************
+*** 1,5 ****
+
+
+ #if defined( SUN_BOGUS_IFDEF_CHECK )
+! #ifdef __i386__ || __vax__ || __sun4c__
+ #endif /* SUN_BOGUS_IFDEF_CHECK */
+--- 1,5 ----
+
+
+ #if defined( SUN_BOGUS_IFDEF_CHECK )
+! #if __i386__ || __vax__ || __sun4c__
+ #endif /* SUN_BOGUS_IFDEF_CHECK */
*** inc/inttypes.h
--- res/inttypes.h
***************
#if defined( MACHINE_ANSI_H_VA_LIST_CHECK )
! # define _BSD_VA_LIST_ __builtin_va_list
#endif /* MACHINE_ANSI_H_VA_LIST_CHECK */
+*** inc/malloc.h
+--- res/malloc.h
+***************
+*** 1,8 ****
+
+
+ #if defined( SUN_MALLOC_CHECK )
+! typedef char * malloc_t;
+! int free();
+! char* malloc();
+! char* realloc();
+ #endif /* SUN_MALLOC_CHECK */
+--- 1,8 ----
+
+
+ #if defined( SUN_MALLOC_CHECK )
+! typedef void * malloc_t;
+! void free();
+! void* malloc();
+! void* realloc();
+ #endif /* SUN_MALLOC_CHECK */
*** inc/math.h
--- res/math.h
***************
#endif /* M88K_BAD_HYPOT_OPT_CHECK */
---- 1,61 ----
+--- 1,65 ----
++ #ifndef FIXINC_SUNOS_MATHERR_DECL_CHECK
++ #define FIXINC_SUNOS_MATHERR_DECL_CHECK 1
++
++ struct exception;
+ #ifndef FIXINC_MATH_EXCEPTION_CHECK
+ #define FIXINC_MATH_EXCEPTION_CHECK 1
+
***************
-*** 45,49 ****
---- 65,76 ----
+*** 45,56 ****
+--- 69,84 ----
#if defined( MATH_HUGE_VAL_IFNDEF_CHECK )
# define HUGE_VAL 3.4e+40
+ #endif
#endif /* MATH_HUGE_VAL_IFNDEF_CHECK */
+
+
+ #if defined( RS6000_DOUBLE_CHECK )
++ #ifndef __cplusplus
+ extern int class();
++ #endif
+ #endif /* RS6000_DOUBLE_CHECK */
+
+
+***************
+*** 60,64 ****
+--- 88,101 ----
+
+
+ #if defined( SVR4__P_CHECK )
++ #ifndef __P
+ #define __P(a) a
++ #endif
+ #endif /* SVR4__P_CHECK */
+ #ifdef __cplusplus
+ #undef exception
+ #endif
+
+ #endif /* FIXINC_MATH_EXCEPTION_CHECK */
++
++ #endif /* FIXINC_SUNOS_MATHERR_DECL_CHECK */
+*** inc/netdnet/dnetdb.h
+--- res/netdnet/dnetdb.h
+***************
+*** 1,5 ****
+
+
+ #if defined( NODEENT_SYNTAX_CHECK )
+! char *na_addr
+ #endif /* NODEENT_SYNTAX_CHECK */
+--- 1,5 ----
+
+
+ #if defined( NODEENT_SYNTAX_CHECK )
+! char *na_addr ;
+ #endif /* NODEENT_SYNTAX_CHECK */
*** inc/netinet/ip.h
--- res/netinet/ip.h
***************
}; /* mumbled struct */
#endif /* IP_MISSING_SEMI_CHECK */
+*** inc/pixrect/memvar.h
+--- res/pixrect/memvar.h
+***************
+*** 1,5 ****
+--- 1,9 ----
+
+
+ #if defined( SUN_CATMACRO_CHECK )
++ #ifdef __STDC__
++ # define CAT(a,b) a##b
++ #else
+ #define CAT(a,b) a/**/b
++ #endif
+ #endif /* SUN_CATMACRO_CHECK */
+*** inc/pthread.h
+--- res/pthread.h
+***************
+*** 1,5 ****
+
+
+ #if defined( PTHREAD_PAGE_SIZE_CHECK )
+! int __page_size;
+ #endif /* PTHREAD_PAGE_SIZE_CHECK */
+--- 1,5 ----
+
+
+ #if defined( PTHREAD_PAGE_SIZE_CHECK )
+! extern int __page_size;
+ #endif /* PTHREAD_PAGE_SIZE_CHECK */
+*** inc/reg_types.h
+--- res/reg_types.h
+***************
+*** 4,11 ****
+ typedef struct {
+ int stuff, mo_suff;
+ } regex_t;
+! extern regex_t re;
+! extern regoff_t ro;
+! extern regmatch_t rm;
+
+ #endif /* OSF_NAMESPACE_A_CHECK */
+--- 4,11 ----
+ typedef struct {
+ int stuff, mo_suff;
+ } regex_t;
+! extern __regex_t re;
+! extern __regoff_t ro;
+! extern __regmatch_t rm;
+
+ #endif /* OSF_NAMESPACE_A_CHECK */
+*** inc/regex.h
+--- res/regex.h
+***************
+*** 2,5 ****
+--- 2,8 ----
+
+ #if defined( OSF_NAMESPACE_C_CHECK )
+ #include <reg_types.h>
++ typedef __regex_t regex_t;
++ typedef __regoff_t regoff_t;
++ typedef __regmatch_t regmatch_t;
+ #endif /* OSF_NAMESPACE_C_CHECK */
*** inc/rpc/auth.h
--- res/rpc/auth.h
***************
-*** 1,5 ****
---- 1,6 ----
+*** 1,12 ****
+--- 1,17 ----
#if defined( STRUCT_SOCKADDR_CHECK )
+ struct sockaddr;
extern AUTH* authdes_create( struct sockaddr* );
#endif /* STRUCT_SOCKADDR_CHECK */
+
+
+ #if defined( SUN_AUTH_PROTO_CHECK )
+ struct auth_t {
++ #ifdef __cplusplus
++ int (*name)(...); /* C++ bad */
++ #else
+ int (*name)(); /* C++ bad */
++ #endif
+ };
+ #endif /* SUN_AUTH_PROTO_CHECK */
*** inc/rpc/rpc.h
--- res/rpc/rpc.h
***************
+ struct __file_s;
extern void xdrstdio_create( struct __file_s* );
#endif /* STRUCT_FILE_CHECK */
+*** inc/rpcsvc/rstat.h
+--- res/rpcsvc/rstat.h
+***************
+*** 2,7 ****
+
+ #if defined( STATSSWTCH_CHECK )
+ struct statswtch {
+! int boottime
+ };
+ #endif /* STATSSWTCH_CHECK */
+--- 2,7 ----
+
+ #if defined( STATSSWTCH_CHECK )
+ struct statswtch {
+! int boottime;
+ };
+ #endif /* STATSSWTCH_CHECK */
+*** inc/rpcsvc/rusers.h
+--- res/rpcsvc/rusers.h
+***************
+*** 2,7 ****
+
+ #if defined( SUN_RUSERS_SEMI_CHECK )
+ struct mumble
+! int _cnt
+ };
+ #endif /* SUN_RUSERS_SEMI_CHECK */
+--- 2,7 ----
+
+ #if defined( SUN_RUSERS_SEMI_CHECK )
+ struct mumble
+! int _cnt;
+ };
+ #endif /* SUN_RUSERS_SEMI_CHECK */
*** inc/sparc/asm_linkage.h
--- res/sparc/asm_linkage.h
***************
*** inc/stdio.h
--- res/stdio.h
***************
-*** 1,12 ****
+*** 1,27 ****
#if defined( ALPHA_GETOPT_CHECK )
int foo;
#endif
#endif /* ISC_OMITS_WITH_STDC_CHECK */
---- 1,17 ----
+
+
+ #if defined( READ_RET_TYPE_CHECK )
+! extern int fclose(), fflush(), fread(), fwrite(), foo();
+ #endif /* READ_RET_TYPE_CHECK */
+
+
+ #if defined( RS6000_PARAM_CHECK )
+! extern int rename(const char *old, const char *new);
+ #endif /* RS6000_PARAM_CHECK */
+
+
+ #if defined( STDIO_STDARG_H_CHECK )
+
+ #endif /* STDIO_STDARG_H_CHECK */
+--- 1,35 ----
+ #ifndef FIXINC_STDIO_STDARG_H_CHECK
+ #define FIXINC_STDIO_STDARG_H_CHECK 1
+
int foo;
#endif
#endif /* ISC_OMITS_WITH_STDC_CHECK */
-***************
-*** 15,17 ****
---- 20,24 ----
+
+
+ #if defined( READ_RET_TYPE_CHECK )
+! extern unsigned int fread(), fwrite();
+! extern int fclose(), fflush(), foo();
+ #endif /* READ_RET_TYPE_CHECK */
+
+
+ #if defined( RS6000_PARAM_CHECK )
+! extern int rename(const char *_old, const char *_new);
+ #endif /* RS6000_PARAM_CHECK */
+
+
#if defined( STDIO_STDARG_H_CHECK )
#endif /* STDIO_STDARG_H_CHECK */
*** inc/stdlib.h
--- res/stdlib.h
***************
-*** 1,12 ****
+*** 1,38 ****
#if defined( ARM_WCHAR_CHECK )
#endif /* ARM_WCHAR_CHECK */
+ #if defined( INT_ABORT_FREE_AND_EXIT_CHECK )
+! extern int abort(int);
+! extern int free(void*);
+! extern int exit(void*);
+ #endif /* INT_ABORT_FREE_AND_EXIT_CHECK */
+
+
#if defined( NEWS_OS_RECURSION_CHECK )
#include <stdlib.h>
#endif /* NEWS_OS_RECURSION_CHECK */
---- 1,14 ----
+
+
+ #if defined( SVR4_GETCWD_CHECK )
+! extern char* getcwd(char *, int);
+ #endif /* SVR4_GETCWD_CHECK */
+
+
+ #if defined( SVR4_PROFIL_CHECK )
+! profil(unsigned short *, unsigned int, unsigned int, unsigned int);
+ #endif /* SVR4_PROFIL_CHECK */
+
+
+ #if defined( SYSZ_STDLIB_FOR_SUN_CHECK )
+! extern char* calloc(size_t);
+! extern char* malloc(size_t);
+! extern char* realloc(void*,size_t);
+! extern char* bsearch(void*,size_t,size_t);
+
+ #endif /* SYSZ_STDLIB_FOR_SUN_CHECK */
+--- 1,40 ----
#if defined( ARM_WCHAR_CHECK )
#endif /* ARM_WCHAR_CHECK */
+ #if defined( INT_ABORT_FREE_AND_EXIT_CHECK )
+! extern void abort(int);
+! extern void free(void*);
+! extern void exit(void*);
+ #endif /* INT_ABORT_FREE_AND_EXIT_CHECK */
+
+
#if defined( NEWS_OS_RECURSION_CHECK )
+ #ifdef BOGUS_RECURSION
#include <stdlib.h>
+ #endif
#endif /* NEWS_OS_RECURSION_CHECK */
+
+
+ #if defined( SVR4_GETCWD_CHECK )
+! extern char* getcwd(char *, size_t);
+ #endif /* SVR4_GETCWD_CHECK */
+
+
+ #if defined( SVR4_PROFIL_CHECK )
+! profil(unsigned short *, size_t, int, unsigned int);
+ #endif /* SVR4_PROFIL_CHECK */
+
+
+ #if defined( SYSZ_STDLIB_FOR_SUN_CHECK )
+! extern void * calloc(size_t);
+! extern void * malloc(size_t);
+! extern void * realloc(void*,size_t);
+! extern void * bsearch(void*,size_t,size_t);
+
+ #endif /* SYSZ_STDLIB_FOR_SUN_CHECK */
+*** inc/strings.h
+--- res/strings.h
+***************
+*** 1,5 ****
+
+
+ #if defined( SUNOS_STRLEN_CHECK )
+! int strlen(); /* string length */
+ #endif /* SUNOS_STRLEN_CHECK */
+--- 1,5 ----
+
+
+ #if defined( SUNOS_STRLEN_CHECK )
+! __SIZE_TYPE__ strlen(); /* string length */
+ #endif /* SUNOS_STRLEN_CHECK */
*** inc/sundev/vuid_event.h
--- res/sundev/vuid_event.h
***************
#if defined( HP_SYSFILE_CHECK )
! extern void foo(struct file *, ...); /* HPUX_SOURCE - bad varargs */
#endif /* HP_SYSFILE_CHECK */
+Only in inc: inc/sys/lc_core.h
*** inc/sys/limits.h
--- res/sys/limits.h
***************
*** inc/sys/signal.h
--- res/sys/signal.h
***************
-*** 1,5 ****
+*** 1,10 ****
#if defined( AIX_VOLATILE_CHECK )
! typedef volatile int sig_atomic_t;
#endif /* AIX_VOLATILE_CHECK */
---- 1,5 ----
+
+
+ #if defined( SUN_SIGNAL_CHECK )
+ void (*signal())();
+ #endif /* SUN_SIGNAL_CHECK */
+--- 1,14 ----
#if defined( AIX_VOLATILE_CHECK )
! typedef int sig_atomic_t;
#endif /* AIX_VOLATILE_CHECK */
+
+
+ #if defined( SUN_SIGNAL_CHECK )
++ #ifdef __cplusplus
++ void (*signal(...))(...);
++ #else
+ void (*signal())();
++ #endif
+ #endif /* SUN_SIGNAL_CHECK */
*** inc/sys/spinlock.h
--- res/sys/spinlock.h
***************
*** inc/sys/stat.h
--- res/sys/stat.h
***************
-*** 1,5 ****
+*** 1,27 ****
#if defined( M88K_BAD_S_IF_CHECK )
! #define S_ISREG(m) (m & S_IFREG) /* is regular? */
#endif /* M88K_BAD_S_IF_CHECK */
---- 1,5 ----
+
+
+ #if defined( RS6000_FCHMOD_CHECK )
+! extern int fchmod(char *, mode_t);
+ #endif /* RS6000_FCHMOD_CHECK */
+
+
+ #if defined( SCO_STATIC_FUNC_CHECK )
+ #ifdef __STDC__
+ static int stat(const char *__f, struct stat *__p) {
+ return __stat32(__f, __p);
+ }
+
+ # else /* !__STDC__ */
+ static int stat(__f, __p)
+ char *__f;
+ struct stat *__p;
+ {
+ return __stat32(__f, __p);
+ }
+ #endif
+ #endif /* SCO_STATIC_FUNC_CHECK */
+--- 1,39 ----
#if defined( M88K_BAD_S_IF_CHECK )
! #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* is regular? */
#endif /* M88K_BAD_S_IF_CHECK */
+
+
+ #if defined( RS6000_FCHMOD_CHECK )
+! extern int fchmod(int, mode_t);
+ #endif /* RS6000_FCHMOD_CHECK */
+
+
+ #if defined( SCO_STATIC_FUNC_CHECK )
+ #ifdef __STDC__
++ #if __cplusplus
++ extern "C" {
++ #endif /* __cplusplus */
+ static int stat(const char *__f, struct stat *__p) {
+ return __stat32(__f, __p);
+ }
++ #if __cplusplus
++ }
++ #endif /* __cplusplus */
+
+ # else /* !__STDC__ */
++ #if __cplusplus
++ extern "C" {
++ #endif /* __cplusplus */
+ static int stat(__f, __p)
+ char *__f;
+ struct stat *__p;
+ {
+ return __stat32(__f, __p);
+ }
++ #if __cplusplus
++ }
++ #endif /* __cplusplus */
+ #endif
+ #endif /* SCO_STATIC_FUNC_CHECK */
*** inc/sys/time.h
--- res/sys/time.h
***************
#if defined( HPUX_SYSTIME_CHECK )
! struct sigevent;
#endif /* HPUX_SYSTIME_CHECK */
+*** inc/sys/times.h
+--- res/sys/times.h
+***************
+*** 1,5 ****
+
+
+ #if defined( SCO_UTIME_CHECK )
+! extern int utime(const char *, struct utimbuf *);
+ #endif /* SCO_UTIME_CHECK */
+--- 1,5 ----
+
+
+ #if defined( SCO_UTIME_CHECK )
+! extern int utime(const char *, const struct utimbuf *);
+ #endif /* SCO_UTIME_CHECK */
*** inc/sys/types.h
--- res/sys/types.h
***************
-*** 1,6 ****
+*** 1,11 ****
#if defined( 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 ----
+
+
+ #if defined( SYSTYPES_STDLIB_SIZE_T_CHECK )
+! typedef unsigned int size_t; /* size of something */
+ #endif /* SYSTYPES_STDLIB_SIZE_T_CHECK */
+--- 1,17 ----
#if defined( 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 */
+
+
+ #if defined( SYSTYPES_STDLIB_SIZE_T_CHECK )
+! #ifndef __SIZE_TYPE__
+! #define __SIZE_TYPE__ long unsigned int
+! #endif
+! #ifndef _GCC_SIZE_T
+! #define _GCC_SIZE_T
+! typedef __SIZE_TYPE__ size_t; /* size of something */
+! #endif
+ #endif /* SYSTYPES_STDLIB_SIZE_T_CHECK */
*** inc/sys/wait.h
--- res/sys/wait.h
***************
-*** 2,7 ****
---- 2,8 ----
+*** 2,12 ****
+
+ #if defined( AIX_SYSWAIT_CHECK )
+ /* bos325, */
+ extern pid_t wait3();
+ /* pid_t wait3(int *, int, struct rusage *); */
+ #endif /* AIX_SYSWAIT_CHECK */
+
+
+ #if defined( NEXT_WAIT_UNION_CHECK )
+! extern pid_d wait(union wait*);
+ #endif /* NEXT_WAIT_UNION_CHECK */
+--- 2,13 ----
#if defined( AIX_SYSWAIT_CHECK )
/* bos325, */
extern pid_t wait3();
/* pid_t wait3(int *, int, struct rusage *); */
#endif /* AIX_SYSWAIT_CHECK */
+
+
+ #if defined( NEXT_WAIT_UNION_CHECK )
+! extern pid_d wait(void*);
+ #endif /* NEXT_WAIT_UNION_CHECK */
*** inc/testing.h
--- res/testing.h
***************
-*** 1,36 ****
+*** 1,43 ****
#if defined( CTRL_QUOTES_DEF_CHECK )
#endif /* MACHINE_NAME_CHECK */
+ #if defined( SCO_STRICT_ANSI_CHECK )
+! #if !__STDC__ /* not standard C */
+ int foo;
+ #endif
+ #endif /* SCO_STRICT_ANSI_CHECK */
+
+
#if defined( UNDEFINE_NULL_CHECK )
#define NULL 0UL\r
#define NULL ((void*)0)
#endif /* UNDEFINE_NULL_CHECK */
---- 1,40 ----
+--- 1,47 ----
#if defined( CTRL_QUOTES_DEF_CHECK )
#endif /* MACHINE_NAME_CHECK */
+ #if defined( SCO_STRICT_ANSI_CHECK )
+! #if !defined(__STRICT_ANSI__) /* not standard C */
+ int foo;
+ #endif
+ #endif /* SCO_STRICT_ANSI_CHECK */
+
+
#if defined( UNDEFINE_NULL_CHECK )
+ #ifndef NULL\r
#define NULL 0UL\r
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
- * This file contains 121 fixup descriptions.
+ * This file contains 122 fixup descriptions.
*
* See README-fixinc for more information.
*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Int_Abort_Free_And_Exit fix
+ */
+#define INT_ABORT_FREE_AND_EXIT_FIXIDX 40
+tSCC zInt_Abort_Free_And_ExitName[] =
+ "int_abort_free_and_exit";
+
+/*
+ * File name selection pattern
+ */
+tSCC zInt_Abort_Free_And_ExitList[] =
+ "|stdlib.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzInt_Abort_Free_And_ExitMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zInt_Abort_Free_And_ExitSelect0[] =
+ "int[ \t]+(abort|free|exit)[ \t]*\\(";
+
+#define INT_ABORT_FREE_AND_EXIT_TEST_CT 1
+tTestDesc aInt_Abort_Free_And_ExitTests[] = {
+ { TT_EGREP, zInt_Abort_Free_And_ExitSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Int_Abort_Free_And_Exit
+ */
+const char* apzInt_Abort_Free_And_ExitPatch[] = {
+ "format",
+ "void\t%1(",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Isc_Omits_With_Stdc fix
*/
-#define ISC_OMITS_WITH_STDC_FIXIDX 40
+#define ISC_OMITS_WITH_STDC_FIXIDX 41
tSCC zIsc_Omits_With_StdcName[] =
"isc_omits_with_stdc";
*
* Description of Io_Quotes_Def fix
*/
-#define IO_QUOTES_DEF_FIXIDX 41
+#define IO_QUOTES_DEF_FIXIDX 42
tSCC zIo_Quotes_DefName[] =
"io_quotes_def";
*
* Description of Io_Quotes_Use fix
*/
-#define IO_QUOTES_USE_FIXIDX 42
+#define IO_QUOTES_USE_FIXIDX 43
tSCC zIo_Quotes_UseName[] =
"io_quotes_use";
*
* Description of Hpux_Maxint fix
*/
-#define HPUX_MAXINT_FIXIDX 43
+#define HPUX_MAXINT_FIXIDX 44
tSCC zHpux_MaxintName[] =
"hpux_maxint";
*
* Description of Hpux_Systime fix
*/
-#define HPUX_SYSTIME_FIXIDX 44
+#define HPUX_SYSTIME_FIXIDX 45
tSCC zHpux_SystimeName[] =
"hpux_systime";
*
* Description of Ip_Missing_Semi fix
*/
-#define IP_MISSING_SEMI_FIXIDX 45
+#define IP_MISSING_SEMI_FIXIDX 46
tSCC zIp_Missing_SemiName[] =
"ip_missing_semi";
*
* Description of Irix_Asm_Apostrophe fix
*/
-#define IRIX_ASM_APOSTROPHE_FIXIDX 46
+#define IRIX_ASM_APOSTROPHE_FIXIDX 47
tSCC zIrix_Asm_ApostropheName[] =
"irix_asm_apostrophe";
*
* Description of Irix_Multiline_Cmnt fix
*/
-#define IRIX_MULTILINE_CMNT_FIXIDX 47
+#define IRIX_MULTILINE_CMNT_FIXIDX 48
tSCC zIrix_Multiline_CmntName[] =
"irix_multiline_cmnt";
*
* Description of Isc_Fmod fix
*/
-#define ISC_FMOD_FIXIDX 48
+#define ISC_FMOD_FIXIDX 49
tSCC zIsc_FmodName[] =
"isc_fmod";
*
* Description of Kandr_Concat fix
*/
-#define KANDR_CONCAT_FIXIDX 49
+#define KANDR_CONCAT_FIXIDX 50
tSCC zKandr_ConcatName[] =
"kandr_concat";
*
* Description of Limits_Ifndefs fix
*/
-#define LIMITS_IFNDEFS_FIXIDX 50
+#define LIMITS_IFNDEFS_FIXIDX 51
tSCC zLimits_IfndefsName[] =
"limits_ifndefs";
*
* Description of Lynx_Void_Int fix
*/
-#define LYNX_VOID_INT_FIXIDX 51
+#define LYNX_VOID_INT_FIXIDX 52
tSCC zLynx_Void_IntName[] =
"lynx_void_int";
*
* Description of Lynxos_Fcntl_Proto fix
*/
-#define LYNXOS_FCNTL_PROTO_FIXIDX 52
+#define LYNXOS_FCNTL_PROTO_FIXIDX 53
tSCC zLynxos_Fcntl_ProtoName[] =
"lynxos_fcntl_proto";
*
* Description of M88k_Bad_Hypot_Opt fix
*/
-#define M88K_BAD_HYPOT_OPT_FIXIDX 53
+#define M88K_BAD_HYPOT_OPT_FIXIDX 54
tSCC zM88k_Bad_Hypot_OptName[] =
"m88k_bad_hypot_opt";
*
* Description of M88k_Bad_S_If fix
*/
-#define M88K_BAD_S_IF_FIXIDX 54
+#define M88K_BAD_S_IF_FIXIDX 55
tSCC zM88k_Bad_S_IfName[] =
"m88k_bad_s_if";
*
* Description of M88k_Multi_Incl fix
*/
-#define M88K_MULTI_INCL_FIXIDX 55
+#define M88K_MULTI_INCL_FIXIDX 56
tSCC zM88k_Multi_InclName[] =
"m88k_multi_incl";
*
* Description of Machine_Ansi_H_Va_List fix
*/
-#define MACHINE_ANSI_H_VA_LIST_FIXIDX 56
+#define MACHINE_ANSI_H_VA_LIST_FIXIDX 57
tSCC zMachine_Ansi_H_Va_ListName[] =
"machine_ansi_h_va_list";
*
* Description of Machine_Name fix
*/
-#define MACHINE_NAME_FIXIDX 57
+#define MACHINE_NAME_FIXIDX 58
tSCC zMachine_NameName[] =
"machine_name";
*
* Description of Math_Exception fix
*/
-#define MATH_EXCEPTION_FIXIDX 58
+#define MATH_EXCEPTION_FIXIDX 59
tSCC zMath_ExceptionName[] =
"math_exception";
*
* Description of Math_Huge_Val_From_Dbl_Max fix
*/
-#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 59
+#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX 60
tSCC zMath_Huge_Val_From_Dbl_MaxName[] =
"math_huge_val_from_dbl_max";
*
* Description of Math_Huge_Val_Ifndef fix
*/
-#define MATH_HUGE_VAL_IFNDEF_FIXIDX 60
+#define MATH_HUGE_VAL_IFNDEF_FIXIDX 61
tSCC zMath_Huge_Val_IfndefName[] =
"math_huge_val_ifndef";
*
* Description of Nested_Motorola fix
*/
-#define NESTED_MOTOROLA_FIXIDX 61
+#define NESTED_MOTOROLA_FIXIDX 62
tSCC zNested_MotorolaName[] =
"nested_motorola";
*
* Description of Nested_Sys_Limits fix
*/
-#define NESTED_SYS_LIMITS_FIXIDX 62
+#define NESTED_SYS_LIMITS_FIXIDX 63
tSCC zNested_Sys_LimitsName[] =
"nested_sys_limits";
*
* Description of Nested_Auth_Des fix
*/
-#define NESTED_AUTH_DES_FIXIDX 63
+#define NESTED_AUTH_DES_FIXIDX 64
tSCC zNested_Auth_DesName[] =
"nested_auth_des";
*
* Description of Nested_Ultrix fix
*/
-#define NESTED_ULTRIX_FIXIDX 64
+#define NESTED_ULTRIX_FIXIDX 65
tSCC zNested_UltrixName[] =
"nested_ultrix";
*
* Description of News_Os_Recursion fix
*/
-#define NEWS_OS_RECURSION_FIXIDX 65
+#define NEWS_OS_RECURSION_FIXIDX 66
tSCC zNews_Os_RecursionName[] =
"news_os_recursion";
* content selection pattern - do fix if pattern found
*/
tSCC zNews_Os_RecursionSelect0[] =
- "#include <stdlib\\.h>";
+ "[ \t]*#include <stdlib\\.h>.*";
#define NEWS_OS_RECURSION_TEST_CT 1
tTestDesc aNews_Os_RecursionTests[] = {
*
* Description of Next_Math_Prefix fix
*/
-#define NEXT_MATH_PREFIX_FIXIDX 66
+#define NEXT_MATH_PREFIX_FIXIDX 67
tSCC zNext_Math_PrefixName[] =
"next_math_prefix";
*
* Description of Next_Template fix
*/
-#define NEXT_TEMPLATE_FIXIDX 67
+#define NEXT_TEMPLATE_FIXIDX 68
tSCC zNext_TemplateName[] =
"next_template";
*
* Description of Next_Volitile fix
*/
-#define NEXT_VOLITILE_FIXIDX 68
+#define NEXT_VOLITILE_FIXIDX 69
tSCC zNext_VolitileName[] =
"next_volitile";
*
* Description of Next_Wait_Union fix
*/
-#define NEXT_WAIT_UNION_FIXIDX 69
+#define NEXT_WAIT_UNION_FIXIDX 70
tSCC zNext_Wait_UnionName[] =
"next_wait_union";
/*
* Fix Command Arguments for Next_Wait_Union
*/
-const char* apzNext_Wait_UnionPatch[] = { "sed",
- "-e", "s@wait(union wait@wait(void@",
+const char* apzNext_Wait_UnionPatch[] = {
+ "format",
+ "wait(void",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Nodeent_Syntax fix
*/
-#define NODEENT_SYNTAX_FIXIDX 70
+#define NODEENT_SYNTAX_FIXIDX 71
tSCC zNodeent_SyntaxName[] =
"nodeent_syntax";
* Machine/OS name selection pattern
*/
#define apzNodeent_SyntaxMachs (const char**)NULL
-#define NODEENT_SYNTAX_TEST_CT 0
-#define aNodeent_SyntaxTests (tTestDesc*)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zNodeent_SyntaxSelect0[] =
+ "char[ \t]*\\*na_addr[ \t]*$";
+
+#define NODEENT_SYNTAX_TEST_CT 1
+tTestDesc aNodeent_SyntaxTests[] = {
+ { TT_EGREP, zNodeent_SyntaxSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Nodeent_Syntax
*/
-const char* apzNodeent_SyntaxPatch[] = { "sed",
- "-e", "s/char.*na_addr *$/char *na_addr;/",
+const char* apzNodeent_SyntaxPatch[] = {
+ "format",
+ "%0;",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Osf_Namespace_A fix
*/
-#define OSF_NAMESPACE_A_FIXIDX 71
+#define OSF_NAMESPACE_A_FIXIDX 72
tSCC zOsf_Namespace_AName[] =
"osf_namespace_a";
/*
* Fix Command Arguments for Osf_Namespace_A
*/
-const char* apzOsf_Namespace_APatch[] = { "sed",
- "-e", "s/regex_t/__regex_t/g",
- "-e", "s/regoff_t/__regoff_t/g",
- "-e", "s/regmatch_t/__regmatch_t/g",
+const char* apzOsf_Namespace_APatch[] = {
+ "format",
+ "__%0",
+ "reg(ex|off|match)_t[^;]",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Osf_Namespace_B fix
+ * Description of Osf_Namespace_C fix
*/
-#define OSF_NAMESPACE_B_FIXIDX 72
-tSCC zOsf_Namespace_BName[] =
- "osf_namespace_b";
+#define OSF_NAMESPACE_C_FIXIDX 73
+tSCC zOsf_Namespace_CName[] =
+ "osf_namespace_c";
/*
* File name selection pattern
*/
-tSCC zOsf_Namespace_BList[] =
+tSCC zOsf_Namespace_CList[] =
"|regex.h|";
/*
* Machine/OS name selection pattern
*/
-#define apzOsf_Namespace_BMachs (const char**)NULL
+#define apzOsf_Namespace_CMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zOsf_Namespace_CSelect0[] =
+ "#include <reg_types.h>.*";
/*
* perform the 'test' shell command - do fix on success
*/
-tSCC zOsf_Namespace_BTest0[] =
+tSCC zOsf_Namespace_CTest0[] =
" -r reg_types.h";
-tSCC zOsf_Namespace_BTest1[] =
+tSCC zOsf_Namespace_CTest1[] =
" -r sys/lc_core.h";
-tSCC zOsf_Namespace_BTest2[] =
+tSCC zOsf_Namespace_CTest2[] =
" -n \"`grep '} regex_t;' reg_types.h`\"";
-tSCC zOsf_Namespace_BTest3[] =
+tSCC zOsf_Namespace_CTest3[] =
" -z \"`grep __regex_t regex.h`\"";
-#define OSF_NAMESPACE_B_TEST_CT 4
-tTestDesc aOsf_Namespace_BTests[] = {
- { TT_TEST, zOsf_Namespace_BTest0, 0 /* unused */ },
- { TT_TEST, zOsf_Namespace_BTest1, 0 /* unused */ },
- { TT_TEST, zOsf_Namespace_BTest2, 0 /* unused */ },
- { TT_TEST, zOsf_Namespace_BTest3, 0 /* unused */ }, };
+#define OSF_NAMESPACE_C_TEST_CT 5
+tTestDesc aOsf_Namespace_CTests[] = {
+ { TT_TEST, zOsf_Namespace_CTest0, 0 /* unused */ },
+ { TT_TEST, zOsf_Namespace_CTest1, 0 /* unused */ },
+ { TT_TEST, zOsf_Namespace_CTest2, 0 /* unused */ },
+ { TT_TEST, zOsf_Namespace_CTest3, 0 /* unused */ },
+ { TT_EGREP, zOsf_Namespace_CSelect0, (regex_t*)NULL }, };
/*
- * Fix Command Arguments for Osf_Namespace_B
+ * Fix Command Arguments for Osf_Namespace_C
*/
-const char* apzOsf_Namespace_BPatch[] = { "sed",
- "-e", "/#include <reg_types.h>/a\\\n\
-typedef __regex_t\tregex_t;\\\n\
-typedef __regoff_t\tregoff_t;\\\n\
-typedef __regmatch_t\tregmatch_t;\n",
+const char* apzOsf_Namespace_CPatch[] = {
+ "format",
+ "%0\n\
+typedef __regex_t\tregex_t;\n\
+typedef __regoff_t\tregoff_t;\n\
+typedef __regmatch_t\tregmatch_t;",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Pthread_Page_Size fix
*/
-#define PTHREAD_PAGE_SIZE_FIXIDX 73
+#define PTHREAD_PAGE_SIZE_FIXIDX 74
tSCC zPthread_Page_SizeName[] =
"pthread_page_size";
/*
* Fix Command Arguments for Pthread_Page_Size
*/
-const char* apzPthread_Page_SizePatch[] = { "sed",
- "-e", "s/^int __page_size/extern int __page_size/",
+const char* apzPthread_Page_SizePatch[] = {
+ "format",
+ "extern %0",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Read_Ret_Type fix
*/
-#define READ_RET_TYPE_FIXIDX 74
+#define READ_RET_TYPE_FIXIDX 75
tSCC zRead_Ret_TypeName[] =
"read_ret_type";
/*
* Fix Command Arguments for Read_Ret_Type
*/
-const char* apzRead_Ret_TypePatch[] = { "sed",
- "-e", "s/^\\(extern int\tfclose(), fflush()\\), \\(fread(), fwrite()\\)\\(.*\\)$/extern unsigned int\t\\2;\\\n\
-\\1\\3/",
+const char* apzRead_Ret_TypePatch[] = {
+ "format",
+ "extern unsigned int fread(), fwrite();\n\
+%1%2",
+ "(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Rs6000_Double fix
*/
-#define RS6000_DOUBLE_FIXIDX 75
+#define RS6000_DOUBLE_FIXIDX 76
tSCC zRs6000_DoubleName[] =
"rs6000_double";
/*
* Fix Command Arguments for Rs6000_Double
*/
-const char* apzRs6000_DoublePatch[] = { "sed",
- "-e", "/class[(]/i\\\n\
-#ifndef __cplusplus\n",
- "-e", "/class[(]/a\\\n\
-#endif\n",
+const char* apzRs6000_DoublePatch[] = {
+ "format",
+ "#ifndef __cplusplus\n\
+%0\n\
+#endif",
+ "^.*[^a-zA-Z_]class\\(.*",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Rs6000_Fchmod fix
*/
-#define RS6000_FCHMOD_FIXIDX 76
+#define RS6000_FCHMOD_FIXIDX 77
tSCC zRs6000_FchmodName[] =
"rs6000_fchmod";
* content selection pattern - do fix if pattern found
*/
tSCC zRs6000_FchmodSelect0[] =
- "fchmod\\(char";
+ "fchmod\\(char \\*";
#define RS6000_FCHMOD_TEST_CT 1
tTestDesc aRs6000_FchmodTests[] = {
/*
* Fix Command Arguments for Rs6000_Fchmod
*/
-const char* apzRs6000_FchmodPatch[] = { "sed",
- "-e", "s/fchmod(char \\*/fchmod(int/",
+const char* apzRs6000_FchmodPatch[] = {
+ "format",
+ "fchmod(int",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Rs6000_Param fix
*/
-#define RS6000_PARAM_FIXIDX 77
+#define RS6000_PARAM_FIXIDX 78
tSCC zRs6000_ParamName[] =
"rs6000_param";
* content selection pattern - do fix if pattern found
*/
tSCC zRs6000_ParamSelect0[] =
- "const char new";
+ "rename\\(const char \\*old, const char \\*new\\)";
#define RS6000_PARAM_TEST_CT 1
tTestDesc aRs6000_ParamTests[] = {
/*
* Fix Command Arguments for Rs6000_Param
*/
-const char* apzRs6000_ParamPatch[] = { "sed",
- "-e", "s@rename(const char \\*old, const char \\*new)@rename(const char *_old, const char *_new)@",
+const char* apzRs6000_ParamPatch[] = {
+ "format",
+ "rename(const char *_old, const char *_new)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sco_Static_Func fix
*/
-#define SCO_STATIC_FUNC_FIXIDX 78
+#define SCO_STATIC_FUNC_FIXIDX 79
tSCC zSco_Static_FuncName[] =
"sco_static_func";
*
* Description of Sco_Strict_Ansi fix
*/
-#define SCO_STRICT_ANSI_FIXIDX 79
+#define SCO_STRICT_ANSI_FIXIDX 80
tSCC zSco_Strict_AnsiName[] =
"sco_strict_ansi";
/*
* Fix Command Arguments for Sco_Strict_Ansi
*/
-const char* apzSco_Strict_AnsiPatch[] = { "sed",
- "-e", "s/!__STDC__/!defined(__STRICT_ANSI__)/g",
+const char* apzSco_Strict_AnsiPatch[] = {
+ "format",
+ "%1defined(__STRICT_ANSI__)%2",
+ "^([ \t]*#[ \t]*if[ \t].*!)__STDC__(.*)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sco_Utime fix
*/
-#define SCO_UTIME_FIXIDX 80
+#define SCO_UTIME_FIXIDX 81
tSCC zSco_UtimeName[] =
"sco_utime";
* content selection pattern - do fix if pattern found
*/
tSCC zSco_UtimeSelect0[] =
- "(const char *, struct utimbuf *);";
+ "\\(const char \\*, struct utimbuf \\*\\);";
#define SCO_UTIME_TEST_CT 1
tTestDesc aSco_UtimeTests[] = {
/*
* Fix Command Arguments for Sco_Utime
*/
-const char* apzSco_UtimePatch[] = { "sed",
- "-e", "s/(const char \\*, struct utimbuf \\*);/(const char *, const struct utimbuf *);/",
+const char* apzSco_UtimePatch[] = {
+ "format",
+ "(const char *, const struct utimbuf *);",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sony_Include fix
*/
-#define SONY_INCLUDE_FIXIDX 81
+#define SONY_INCLUDE_FIXIDX 82
tSCC zSony_IncludeName[] =
"sony_include";
*
* Description of Statsswtch fix
*/
-#define STATSSWTCH_FIXIDX 82
+#define STATSSWTCH_FIXIDX 83
tSCC zStatsswtchName[] =
"statsswtch";
/*
* Fix Command Arguments for Statsswtch
*/
-const char* apzStatsswtchPatch[] = { "sed",
- "-e", "s/boottime$/boottime;/",
+const char* apzStatsswtchPatch[] = {
+ "format",
+ "boottime;",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Stdio_Stdarg_H fix
*/
-#define STDIO_STDARG_H_FIXIDX 83
+#define STDIO_STDARG_H_FIXIDX 84
tSCC zStdio_Stdarg_HName[] =
"stdio_stdarg_h";
*
* Description of Stdio_Va_List fix
*/
-#define STDIO_VA_LIST_FIXIDX 84
+#define STDIO_VA_LIST_FIXIDX 85
tSCC zStdio_Va_ListName[] =
"stdio_va_list";
*
* Description of Struct_File fix
*/
-#define STRUCT_FILE_FIXIDX 85
+#define STRUCT_FILE_FIXIDX 86
tSCC zStruct_FileName[] =
"struct_file";
*
* Description of Struct_Sockaddr fix
*/
-#define STRUCT_SOCKADDR_FIXIDX 86
+#define STRUCT_SOCKADDR_FIXIDX 87
tSCC zStruct_SockaddrName[] =
"struct_sockaddr";
*
* Description of Sun_Auth_Proto fix
*/
-#define SUN_AUTH_PROTO_FIXIDX 87
+#define SUN_AUTH_PROTO_FIXIDX 88
tSCC zSun_Auth_ProtoName[] =
"sun_auth_proto";
/*
* Fix Command Arguments for Sun_Auth_Proto
*/
-const char* apzSun_Auth_ProtoPatch[] = { "sed",
- "-e", "s/^\\(.*(\\*[a-z][a-z_]*)(\\)\\();.*\\)/\\\n\
-#ifdef __cplusplus\\\n\
-\\1...\\2\\\n\
-#else\\\n\
-\\1\\2\\\n\
-#endif/",
+const char* apzSun_Auth_ProtoPatch[] = {
+ "format",
+ "#ifdef __cplusplus\n\
+%1(...);%2\n\
+#else\n\
+%1();%2\n\
+#endif",
+ "(.*\\(\\*[a-z][a-z_]*\\))\\(\\);(.*)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sun_Bogus_Ifdef fix
*/
-#define SUN_BOGUS_IFDEF_FIXIDX 88
+#define SUN_BOGUS_IFDEF_FIXIDX 89
tSCC zSun_Bogus_IfdefName[] =
"sun_bogus_ifdef";
* content selection pattern - do fix if pattern found
*/
tSCC zSun_Bogus_IfdefSelect0[] =
- "#ifdef __i386__ || __vax__";
+ "#ifdef(.*\\|\\|.*)";
#define SUN_BOGUS_IFDEF_TEST_CT 1
tTestDesc aSun_Bogus_IfdefTests[] = {
/*
* Fix Command Arguments for Sun_Bogus_Ifdef
*/
-const char* apzSun_Bogus_IfdefPatch[] = { "sed",
- "-e", "s/\\#ifdef __i386__ || __vax__/\\#if __i386__ || __vax__/g",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description of Sun_Bogus_Ifdef_Sun4c fix
- */
-#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 89
-tSCC zSun_Bogus_Ifdef_Sun4cName[] =
- "sun_bogus_ifdef_sun4c";
-
-/*
- * File name selection pattern
- */
-tSCC zSun_Bogus_Ifdef_Sun4cList[] =
- "|hsfs/hsnode.h|";
-/*
- * Machine/OS name selection pattern
- */
-#define apzSun_Bogus_Ifdef_Sun4cMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zSun_Bogus_Ifdef_Sun4cSelect0[] =
- "#ifdef __i386__ || __sun4c__";
-
-#define SUN_BOGUS_IFDEF_SUN4C_TEST_CT 1
-tTestDesc aSun_Bogus_Ifdef_Sun4cTests[] = {
- { TT_EGREP, zSun_Bogus_Ifdef_Sun4cSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Sun_Bogus_Ifdef_Sun4c
- */
-const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
- "-e", "s/\\#ifdef __i386__ || __sun4c__/\\#if __i386__ || __sun4c__/g",
+const char* apzSun_Bogus_IfdefPatch[] = {
+ "format",
+ "#if%1",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
* content selection pattern - do fix if pattern found
*/
tSCC zSun_CatmacroSelect0[] =
- "^#define[ \t]+CAT\\(a,b\\)";
+ "^#define[ \t]+CAT\\(a,b\\).*";
#define SUN_CATMACRO_TEST_CT 1
tTestDesc aSun_CatmacroTests[] = {
/*
* Fix Command Arguments for Sun_Catmacro
*/
-const char* apzSun_CatmacroPatch[] = { "sed",
- "-e", "/^#define[ \t]CAT(a,b)/ i\\\n\
-#ifdef __STDC__ \\\n\
-#define CAT(a,b) a##b\\\n\
-#else\n",
- "-e", "/^#define[ \t]CAT(a,b)/ a\\\n\
-#endif\n",
+const char* apzSun_CatmacroPatch[] = {
+ "format",
+ "#ifdef __STDC__\n\
+# define CAT(a,b) a##b\n\
+#else\n\
+%0\n\
+#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
* content selection pattern - do fix if pattern found
*/
tSCC zSun_SignalSelect0[] =
- "^void\t\\(\\*signal\\(\\)\\)\\(\\);";
+ "^void\t\\(\\*signal\\(\\)\\)\\(\\);.*";
#define SUN_SIGNAL_TEST_CT 1
tTestDesc aSun_SignalTests[] = {
/*
* Fix Command Arguments for Sun_Signal
*/
-const char* apzSun_SignalPatch[] = { "sed",
- "-e", "/^void\t(\\*signal())();$/i\\\n\
-#ifdef __cplusplus\\\n\
-void\t(*signal(...))(...);\\\n\
-#else\n",
- "-e", "/^void\t(\\*signal())();$/a\\\n\
-#endif\n",
+const char* apzSun_SignalPatch[] = {
+ "format",
+ "#ifdef __cplusplus\n\
+void\t(*signal(...))(...);\n\
+#else\n\
+%0\n\
+#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
#define apzSunos_Matherr_DeclMachs (const char**)NULL
/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSunos_Matherr_DeclSelect0[] =
+ "matherr";
+
+/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zSunos_Matherr_DeclBypass0[] =
"matherr.*struct exception";
-#define SUNOS_MATHERR_DECL_TEST_CT 1
+#define SUNOS_MATHERR_DECL_TEST_CT 2
tTestDesc aSunos_Matherr_DeclTests[] = {
- { TT_NEGREP, zSunos_Matherr_DeclBypass0, (regex_t*)NULL }, };
+ { TT_NEGREP, zSunos_Matherr_DeclBypass0, (regex_t*)NULL },
+ { TT_EGREP, zSunos_Matherr_DeclSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sunos_Matherr_Decl
*/
-const char* apzSunos_Matherr_DeclPatch[] = { "sed",
- "-e", "/^struct exception/,$b",
- "-e", "/matherr/i\\\n\
-struct exception;\n",
+const char* apzSunos_Matherr_DeclPatch[] = {
+ "wrap",
+ "struct exception;\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
* content selection pattern - do fix if pattern found
*/
tSCC zSunos_StrlenSelect0[] =
- "int[ \t]*strlen";
+ "int[ \t]*strlen\\(\\);(.*)";
#define SUNOS_STRLEN_TEST_CT 1
tTestDesc aSunos_StrlenTests[] = {
/*
* Fix Command Arguments for Sunos_Strlen
*/
-const char* apzSunos_StrlenPatch[] = { "sed",
- "-e", "s/int[ \t]*strlen();/__SIZE_TYPE__ strlen();/",
+const char* apzSunos_StrlenPatch[] = {
+ "format",
+ "__SIZE_TYPE__ strlen();%1",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Svr4__P fix
+ */
+#define SVR4__P_FIXIDX 96
+tSCC zSvr4__PName[] =
+ "svr4__p";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSvr4__PList[] =
+ "|math.h|floatingpoint.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzSvr4__PMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSvr4__PSelect0[] =
+ "^#define[ \t]+__P.*";
+
+#define SVR4__P_TEST_CT 1
+tTestDesc aSvr4__PTests[] = {
+ { TT_EGREP, zSvr4__PSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Svr4__P
+ */
+const char* apzSvr4__PPatch[] = {
+ "format",
+ "#ifndef __P\n\
+%0\n\
+#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Svr4_Getcwd fix
*/
-#define SVR4_GETCWD_FIXIDX 96
+#define SVR4_GETCWD_FIXIDX 97
tSCC zSvr4_GetcwdName[] =
"svr4_getcwd";
/*
* Fix Command Arguments for Svr4_Getcwd
*/
-const char* apzSvr4_GetcwdPatch[] = { "sed",
- "-e", "s/getcwd(char \\*, int)/getcwd(char *, size_t)/",
+const char* apzSvr4_GetcwdPatch[] = {
+ "format",
+ "getcwd(char *, size_t)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Svr4_Profil fix
*/
-#define SVR4_PROFIL_FIXIDX 97
+#define SVR4_PROFIL_FIXIDX 98
tSCC zSvr4_ProfilName[] =
"svr4_profil";
* Machine/OS name selection pattern
*/
#define apzSvr4_ProfilMachs (const char**)NULL
-#define SVR4_PROFIL_TEST_CT 0
-#define aSvr4_ProfilTests (tTestDesc*)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSvr4_ProfilSelect0[] =
+ "profil\\(unsigned short \\*, unsigned int, unsigned int, unsigned int\\)";
+
+#define SVR4_PROFIL_TEST_CT 1
+tTestDesc aSvr4_ProfilTests[] = {
+ { TT_EGREP, zSvr4_ProfilSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Svr4_Profil
*/
-const char* apzSvr4_ProfilPatch[] = { "sed",
- "-e", "s/profil(unsigned short \\*, unsigned int, unsigned int, unsigned int)/profil(unsigned short *, size_t, int, unsigned)/",
+const char* apzSvr4_ProfilPatch[] = {
+ "format",
+ "profil(unsigned short *, size_t, int, unsigned int)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Systypes fix
*/
-#define SYSTYPES_FIXIDX 98
+#define SYSTYPES_FIXIDX 99
tSCC zSystypesName[] =
"systypes";
*
* Description of Systypes_Stdlib_Size_T fix
*/
-#define SYSTYPES_STDLIB_SIZE_T_FIXIDX 99
+#define SYSTYPES_STDLIB_SIZE_T_FIXIDX 100
tSCC zSystypes_Stdlib_Size_TName[] =
"systypes_stdlib_size_t";
* content selection pattern - do fix if pattern found
*/
tSCC zSystypes_Stdlib_Size_TSelect0[] =
- "typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t";
+ "typedef[ \t]+[A-Za-z_][ \tA-Za-z_]*[ \t]size_t.*";
/*
* content bypass pattern - skip fix if pattern found
/*
* Fix Command Arguments for Systypes_Stdlib_Size_T
*/
-const char* apzSystypes_Stdlib_Size_TPatch[] = { "sed",
- "-e", "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/i\\\n\
-#ifndef _GCC_SIZE_T\\\n\
-#define _GCC_SIZE_T\n",
- "-e", "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/a\\\n\
-#endif\n",
+const char* apzSystypes_Stdlib_Size_TPatch[] = {
+ "format",
+ "#ifndef _GCC_SIZE_T\n\
+#define _GCC_SIZE_T\n\
+%0\n\
+#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sysv68_String fix
*/
-#define SYSV68_STRING_FIXIDX 100
+#define SYSV68_STRING_FIXIDX 101
tSCC zSysv68_StringName[] =
"sysv68_string";
*
* Description of Sysz_Stdlib_For_Sun fix
*/
-#define SYSZ_STDLIB_FOR_SUN_FIXIDX 101
+#define SYSZ_STDLIB_FOR_SUN_FIXIDX 102
tSCC zSysz_Stdlib_For_SunName[] =
"sysz_stdlib_for_sun";
* Machine/OS name selection pattern
*/
#define apzSysz_Stdlib_For_SunMachs (const char**)NULL
-#define SYSZ_STDLIB_FOR_SUN_TEST_CT 0
-#define aSysz_Stdlib_For_SunTests (tTestDesc*)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSysz_Stdlib_For_SunSelect0[] =
+ "char[ \t]*\\*[ \t]*(calloc|malloc|realloc|bsearch)[ \t]*\\(";
+
+#define SYSZ_STDLIB_FOR_SUN_TEST_CT 1
+tTestDesc aSysz_Stdlib_For_SunTests[] = {
+ { TT_EGREP, zSysz_Stdlib_For_SunSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sysz_Stdlib_For_Sun
*/
-const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
- "-e", "s/int\tabort/void\tabort/g",
- "-e", "s/int\tfree/void\tfree/g",
- "-e", "s/char[ \t]*\\*[ \t]*calloc/void \\*\tcalloc/g",
- "-e", "s/char[ \t]*\\*[ \t]*malloc/void \\*\tmalloc/g",
- "-e", "s/char[ \t]*\\*[ \t]*realloc/void \\*\trealloc/g",
- "-e", "s/char[ \t]*\\*[ \t]*bsearch/void \\*\tbsearch/g",
- "-e", "s/int[ \t][ \t]*exit/void\texit/g",
+const char* apzSysz_Stdlib_For_SunPatch[] = {
+ "format",
+ "void *\t%1(",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sysz_Stdtypes_For_Sun fix
*/
-#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 102
+#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 103
tSCC zSysz_Stdtypes_For_SunName[] =
"sysz_stdtypes_for_sun";
*
* Description of Tinfo_Cplusplus fix
*/
-#define TINFO_CPLUSPLUS_FIXIDX 103
+#define TINFO_CPLUSPLUS_FIXIDX 104
tSCC zTinfo_CplusplusName[] =
"tinfo_cplusplus";
*
* Description of Ultrix_Atof_Param fix
*/
-#define ULTRIX_ATOF_PARAM_FIXIDX 104
+#define ULTRIX_ATOF_PARAM_FIXIDX 105
tSCC zUltrix_Atof_ParamName[] =
"ultrix_atof_param";
*
* Description of Ultrix_Const fix
*/
-#define ULTRIX_CONST_FIXIDX 105
+#define ULTRIX_CONST_FIXIDX 106
tSCC zUltrix_ConstName[] =
"ultrix_const";
*
* Description of Ultrix_Fix_Fixproto fix
*/
-#define ULTRIX_FIX_FIXPROTO_FIXIDX 106
+#define ULTRIX_FIX_FIXPROTO_FIXIDX 107
tSCC zUltrix_Fix_FixprotoName[] =
"ultrix_fix_fixproto";
*
* Description of Ultrix_Ifdef fix
*/
-#define ULTRIX_IFDEF_FIXIDX 107
+#define ULTRIX_IFDEF_FIXIDX 108
tSCC zUltrix_IfdefName[] =
"ultrix_ifdef";
*
* Description of Ultrix_Static fix
*/
-#define ULTRIX_STATIC_FIXIDX 108
+#define ULTRIX_STATIC_FIXIDX 109
tSCC zUltrix_StaticName[] =
"ultrix_static";
*
* Description of Undefine_Null fix
*/
-#define UNDEFINE_NULL_FIXIDX 109
+#define UNDEFINE_NULL_FIXIDX 110
tSCC zUndefine_NullName[] =
"undefine_null";
*
* Description of Unixware7_Byteorder_Fix fix
*/
-#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 110
+#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 111
tSCC zUnixware7_Byteorder_FixName[] =
"unixware7_byteorder_fix";
*
* Description of Va_I960_Macro fix
*/
-#define VA_I960_MACRO_FIXIDX 111
+#define VA_I960_MACRO_FIXIDX 112
tSCC zVa_I960_MacroName[] =
"va_i960_macro";
*
* Description of Void_Null fix
*/
-#define VOID_NULL_FIXIDX 112
+#define VOID_NULL_FIXIDX 113
tSCC zVoid_NullName[] =
"void_null";
*
* Description of Vxworks_Gcc_Problem fix
*/
-#define VXWORKS_GCC_PROBLEM_FIXIDX 113
+#define VXWORKS_GCC_PROBLEM_FIXIDX 114
tSCC zVxworks_Gcc_ProblemName[] =
"vxworks_gcc_problem";
*
* Description of Vxworks_Needs_Vxtypes fix
*/
-#define VXWORKS_NEEDS_VXTYPES_FIXIDX 114
+#define VXWORKS_NEEDS_VXTYPES_FIXIDX 115
tSCC zVxworks_Needs_VxtypesName[] =
"vxworks_needs_vxtypes";
*
* Description of Vxworks_Needs_Vxworks fix
*/
-#define VXWORKS_NEEDS_VXWORKS_FIXIDX 115
+#define VXWORKS_NEEDS_VXWORKS_FIXIDX 116
tSCC zVxworks_Needs_VxworksName[] =
"vxworks_needs_vxworks";
*
* Description of Vxworks_Time fix
*/
-#define VXWORKS_TIME_FIXIDX 116
+#define VXWORKS_TIME_FIXIDX 117
tSCC zVxworks_TimeName[] =
"vxworks_time";
*
* Description of X11_Class fix
*/
-#define X11_CLASS_FIXIDX 117
+#define X11_CLASS_FIXIDX 118
tSCC zX11_ClassName[] =
"x11_class";
*
* Description of X11_Class_Usage fix
*/
-#define X11_CLASS_USAGE_FIXIDX 118
+#define X11_CLASS_USAGE_FIXIDX 119
tSCC zX11_Class_UsageName[] =
"x11_class_usage";
*
* Description of X11_New fix
*/
-#define X11_NEW_FIXIDX 119
+#define X11_NEW_FIXIDX 120
tSCC zX11_NewName[] =
"x11_new";
*
* Description of X11_Sprintf fix
*/
-#define X11_SPRINTF_FIXIDX 120
+#define X11_SPRINTF_FIXIDX 121
tSCC zX11_SprintfName[] =
"x11_sprintf";
*
* List of all fixes
*/
-#define REGEX_COUNT 115
+#define REGEX_COUNT 121
#define MACH_LIST_SIZE_LIMIT 279
-#define FIX_COUNT 121
+#define FIX_COUNT 122
tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY,
aHpux8_Bogus_InlinesTests, apzHpux8_Bogus_InlinesPatch },
+ { zInt_Abort_Free_And_ExitName, zInt_Abort_Free_And_ExitList,
+ apzInt_Abort_Free_And_ExitMachs,
+ INT_ABORT_FREE_AND_EXIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aInt_Abort_Free_And_ExitTests, apzInt_Abort_Free_And_ExitPatch },
+
{ zIsc_Omits_With_StdcName, zIsc_Omits_With_StdcList,
apzIsc_Omits_With_StdcMachs,
ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
{ zNext_Wait_UnionName, zNext_Wait_UnionList,
apzNext_Wait_UnionMachs,
- NEXT_WAIT_UNION_TEST_CT, FD_MACH_ONLY,
+ NEXT_WAIT_UNION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aNext_Wait_UnionTests, apzNext_Wait_UnionPatch },
{ zNodeent_SyntaxName, zNodeent_SyntaxList,
apzNodeent_SyntaxMachs,
- NODEENT_SYNTAX_TEST_CT, FD_MACH_ONLY,
+ NODEENT_SYNTAX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aNodeent_SyntaxTests, apzNodeent_SyntaxPatch },
{ zOsf_Namespace_AName, zOsf_Namespace_AList,
apzOsf_Namespace_AMachs,
- OSF_NAMESPACE_A_TEST_CT, FD_MACH_ONLY,
+ OSF_NAMESPACE_A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aOsf_Namespace_ATests, apzOsf_Namespace_APatch },
- { zOsf_Namespace_BName, zOsf_Namespace_BList,
- apzOsf_Namespace_BMachs,
- OSF_NAMESPACE_B_TEST_CT, FD_MACH_ONLY,
- aOsf_Namespace_BTests, apzOsf_Namespace_BPatch },
+ { zOsf_Namespace_CName, zOsf_Namespace_CList,
+ apzOsf_Namespace_CMachs,
+ OSF_NAMESPACE_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aOsf_Namespace_CTests, apzOsf_Namespace_CPatch },
{ zPthread_Page_SizeName, zPthread_Page_SizeList,
apzPthread_Page_SizeMachs,
- PTHREAD_PAGE_SIZE_TEST_CT, FD_MACH_ONLY,
+ PTHREAD_PAGE_SIZE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aPthread_Page_SizeTests, apzPthread_Page_SizePatch },
{ zRead_Ret_TypeName, zRead_Ret_TypeList,
apzRead_Ret_TypeMachs,
- READ_RET_TYPE_TEST_CT, FD_MACH_ONLY,
+ READ_RET_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aRead_Ret_TypeTests, apzRead_Ret_TypePatch },
{ zRs6000_DoubleName, zRs6000_DoubleList,
apzRs6000_DoubleMachs,
- RS6000_DOUBLE_TEST_CT, FD_MACH_ONLY,
+ RS6000_DOUBLE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aRs6000_DoubleTests, apzRs6000_DoublePatch },
{ zRs6000_FchmodName, zRs6000_FchmodList,
apzRs6000_FchmodMachs,
- RS6000_FCHMOD_TEST_CT, FD_MACH_ONLY,
+ RS6000_FCHMOD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aRs6000_FchmodTests, apzRs6000_FchmodPatch },
{ zRs6000_ParamName, zRs6000_ParamList,
apzRs6000_ParamMachs,
- RS6000_PARAM_TEST_CT, FD_MACH_ONLY,
+ RS6000_PARAM_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aRs6000_ParamTests, apzRs6000_ParamPatch },
{ zSco_Static_FuncName, zSco_Static_FuncList,
{ zSco_Strict_AnsiName, zSco_Strict_AnsiList,
apzSco_Strict_AnsiMachs,
- SCO_STRICT_ANSI_TEST_CT, FD_MACH_ONLY,
+ SCO_STRICT_ANSI_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSco_Strict_AnsiTests, apzSco_Strict_AnsiPatch },
{ zSco_UtimeName, zSco_UtimeList,
apzSco_UtimeMachs,
- SCO_UTIME_TEST_CT, FD_MACH_ONLY,
+ SCO_UTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSco_UtimeTests, apzSco_UtimePatch },
{ zSony_IncludeName, zSony_IncludeList,
{ zStatsswtchName, zStatsswtchList,
apzStatsswtchMachs,
- STATSSWTCH_TEST_CT, FD_MACH_ONLY,
+ STATSSWTCH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aStatsswtchTests, apzStatsswtchPatch },
{ zStdio_Stdarg_HName, zStdio_Stdarg_HList,
{ zSun_Auth_ProtoName, zSun_Auth_ProtoList,
apzSun_Auth_ProtoMachs,
- SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY,
+ SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSun_Auth_ProtoTests, apzSun_Auth_ProtoPatch },
{ zSun_Bogus_IfdefName, zSun_Bogus_IfdefList,
apzSun_Bogus_IfdefMachs,
- SUN_BOGUS_IFDEF_TEST_CT, FD_MACH_ONLY,
+ SUN_BOGUS_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSun_Bogus_IfdefTests, apzSun_Bogus_IfdefPatch },
- { zSun_Bogus_Ifdef_Sun4cName, zSun_Bogus_Ifdef_Sun4cList,
- apzSun_Bogus_Ifdef_Sun4cMachs,
- SUN_BOGUS_IFDEF_SUN4C_TEST_CT, FD_MACH_ONLY,
- aSun_Bogus_Ifdef_Sun4cTests, apzSun_Bogus_Ifdef_Sun4cPatch },
-
{ zSun_CatmacroName, zSun_CatmacroList,
apzSun_CatmacroMachs,
- SUN_CATMACRO_TEST_CT, FD_MACH_ONLY,
+ SUN_CATMACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSun_CatmacroTests, apzSun_CatmacroPatch },
{ zSun_MallocName, zSun_MallocList,
{ zSun_SignalName, zSun_SignalList,
apzSun_SignalMachs,
- SUN_SIGNAL_TEST_CT, FD_MACH_ONLY,
+ SUN_SIGNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSun_SignalTests, apzSun_SignalPatch },
{ zSunos_Matherr_DeclName, zSunos_Matherr_DeclList,
apzSunos_Matherr_DeclMachs,
- SUNOS_MATHERR_DECL_TEST_CT, FD_MACH_ONLY,
+ SUNOS_MATHERR_DECL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSunos_Matherr_DeclTests, apzSunos_Matherr_DeclPatch },
{ zSunos_StrlenName, zSunos_StrlenList,
apzSunos_StrlenMachs,
- SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY,
+ SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSunos_StrlenTests, apzSunos_StrlenPatch },
+ { zSvr4__PName, zSvr4__PList,
+ apzSvr4__PMachs,
+ SVR4__P_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSvr4__PTests, apzSvr4__PPatch },
+
{ zSvr4_GetcwdName, zSvr4_GetcwdList,
apzSvr4_GetcwdMachs,
- SVR4_GETCWD_TEST_CT, FD_MACH_ONLY,
+ SVR4_GETCWD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSvr4_GetcwdTests, apzSvr4_GetcwdPatch },
{ zSvr4_ProfilName, zSvr4_ProfilList,
apzSvr4_ProfilMachs,
- SVR4_PROFIL_TEST_CT, FD_MACH_ONLY,
+ SVR4_PROFIL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSvr4_ProfilTests, apzSvr4_ProfilPatch },
{ zSystypesName, zSystypesList,
{ zSystypes_Stdlib_Size_TName, zSystypes_Stdlib_Size_TList,
apzSystypes_Stdlib_Size_TMachs,
- SYSTYPES_STDLIB_SIZE_T_TEST_CT, FD_MACH_ONLY,
+ SYSTYPES_STDLIB_SIZE_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSystypes_Stdlib_Size_TTests, apzSystypes_Stdlib_Size_TPatch },
{ zSysv68_StringName, zSysv68_StringList,
{ zSysz_Stdlib_For_SunName, zSysz_Stdlib_For_SunList,
apzSysz_Stdlib_For_SunMachs,
- SYSZ_STDLIB_FOR_SUN_TEST_CT, FD_MACH_ONLY,
+ SYSZ_STDLIB_FOR_SUN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSysz_Stdlib_For_SunTests, apzSysz_Stdlib_For_SunPatch },
{ zSysz_Stdtypes_For_SunName, zSysz_Stdtypes_For_SunList,
/*
+ * Fix return type of abort and free
+ */
+fix = {
+ hackname = int_abort_free_and_exit;
+ files = stdlib.h;
+ select = "int[ \t]+(abort|free|exit)[ \t]*\\(";
+
+ c_fix = format;
+ c_fix_arg = "void\t%1(";
+
+ test_text = "extern int abort(int);\n"
+ "extern int free(void*);\n"
+ "extern int exit(void*);";
+};
+
+
+/*
* On Interactive Unix 2.2, certain traditional Unix definitions
* (notably getc and putc in stdio.h) are omitted if __STDC__ is
* defined, not just if _POSIX_SOURCE is defined. This makes it
hackname = machine_name;
c_test = machine_name;
c_fix = machine_name;
+
test_text = "/* MACH_DIFF: */\n"
- "#if defined( i386 )"
- " || defined( sparc )"
+ "#if defined( i386 ) || defined( sparc ) || defined( vax )"
"\n/* no uniform test, so be careful :-) */";
};
fix = {
hackname = news_os_recursion;
files = stdlib.h;
- select = '#include <stdlib\.h>';
+ select = "[ \t]*#include <stdlib\\.h>.*";
c_fix = format;
c_fix_arg = "#ifdef BOGUS_RECURSION\n%0\n#endif";
* conditional, so it doesn't need this fix. So everything is okay.
*/
fix = {
- hackname = next_wait_union;
- files = sys/wait.h;
-
- select = 'wait\(union wait';
+ hackname = next_wait_union;
+ files = sys/wait.h;
- sed = "s@wait(union wait@wait(void@";
+ select = 'wait\(union wait';
+ c_fix = format;
+ c_fix_arg = "wait(void";
+ test_text = "extern pid_d wait(union wait*);";
};
* a missing semi-colon at the end of the nodeent structure definition.
*/
fix = {
- hackname = nodeent_syntax;
- files = netdnet/dnetdb.h;
- sed = "s/char.*na_addr *$/char *na_addr;/";
+ hackname = nodeent_syntax;
+ files = netdnet/dnetdb.h;
+ select = "char[ \t]*\\*na_addr[ \t]*$";
+ c_fix = format;
+ c_fix_arg = "%0;";
+ test_text = "char *na_addr\t";
};
test = " -n \"`grep '} regex_t;' reg_types.h`\"";
test = " -z \"`grep __regex_t regex.h`\"";
- sed = "s/regex_t/__regex_t/g";
- sed = "s/regoff_t/__regoff_t/g";
- sed = "s/regmatch_t/__regmatch_t/g";
+ c_fix = format;
+ c_fix_arg = "__%0";
+ c_fix_arg = "reg(ex|off|match)_t[^;]";
+
+ test_text = "`touch inc/sys/lc_core.h`"
+ "typedef struct {\n int stuff, mo_suff;\n} regex_t;\n"
+ "extern regex_t re;\n"
+ "extern regoff_t ro;\n"
+ "extern regmatch_t rm;\n";
};
fix = {
- hackname = osf_namespace_b;
+ hackname = osf_namespace_c;
files = regex.h;
test = " -r reg_types.h";
test = " -r sys/lc_core.h";
test = " -n \"`grep '} regex_t;' reg_types.h`\"";
test = " -z \"`grep __regex_t regex.h`\"";
- sed = "/#include <reg_types.h>/a\\\n"
- "typedef __regex_t\tregex_t;\\\n"
- "typedef __regoff_t\tregoff_t;\\\n"
- "typedef __regmatch_t\tregmatch_t;\n";
+ select = "#include <reg_types\.h>.*";
+ c_fix = format;
+ c_fix_arg = "%0\n"
+ "typedef __regex_t\tregex_t;\n"
+ "typedef __regoff_t\tregoff_t;\n"
+ "typedef __regmatch_t\tregmatch_t;";
+
+ test_text = "#include <reg_types.h>";
};
* This is the default for all ANSI standard C++ compilers.
*/
fix = {
- hackname = pthread_page_size;
- files = pthread.h;
- select = "^int __page_size";
- sed = "s/^int __page_size/extern int __page_size/";
+ hackname = pthread_page_size;
+ files = pthread.h;
+ select = "^int __page_size";
+ c_fix = format;
+ c_fix_arg = "extern %0";
+ test_text = "int __page_size;";
};
hackname = read_ret_type;
files = stdio.h;
select = "extern int\t.*, fread\\(\\), fwrite\\(\\)";
- sed = "s/^\\(extern int\tfclose(), fflush()\\), "
- "\\(fread(), fwrite()\\)\\(.*\\)$"
- "/extern unsigned int\t\\2;\\\n\\1\\3/";
+ c_fix = format;
+ c_fix_arg = "extern unsigned int fread(), fwrite();\n%1%2";
+ c_fix_arg = "(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)";
+
+ test_text = "extern int\tfclose(), fflush(), fread(), fwrite(), foo();";
};
* function class(double x) conflicts with C++ keyword on rs/6000
*/
fix = {
- hackname = rs6000_double;
- files = math.h;
- select = '[^a-zA-Z_]class\(';
-
- sed = "/class[(]/i\\\n#ifndef __cplusplus\n";
- sed = "/class[(]/a\\\n#endif\n";
+ hackname = rs6000_double;
+ files = math.h;
+ select = '[^a-zA-Z_]class\(';
+
+ c_fix = format;
+ c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
+ c_fix_arg = '^.*[^a-zA-Z_]class\(.*';
+
+ test_text = "extern int class();";
};
* Wrong fchmod prototype on RS/6000.
*/
fix = {
- hackname = rs6000_fchmod;
- files = sys/stat.h;
- select = 'fchmod\(char';
- sed = 's/fchmod(char \*/fchmod(int/';
+ hackname = rs6000_fchmod;
+ files = sys/stat.h;
+ select = 'fchmod\(char \*';
+ c_fix = format;
+ c_fix_arg = "fchmod(int";
+ test_text = "extern int fchmod(char *, mode_t);";
};
* parameters conflict with C++ new on rs/6000
*/
fix = {
- hackname = rs6000_param;
- files = "stdio.h";
- files = "unistd.h";
- select = 'const char new';
+ hackname = rs6000_param;
+ files = "stdio.h";
+ files = "unistd.h";
- sed = 's@rename(const char \*old, const char \*new)@'
- 'rename(const char *_old, const char *_new)@';
+ select = 'rename\(const char \*old, const char \*new\)';
+ c_fix = format;
+ c_fix_arg = 'rename(const char *_old, const char *_new)';
+
+ test_text = 'extern int rename(const char *old, const char *new);';
};
"#if __cplusplus\\\n"
" }\\\n"
"#endif /* __cplusplus */";
+
+ test_text =
+ "#ifdef __STDC__\n"
+ "static int\tstat(const char *__f, struct stat *__p) {\n"
+ "\treturn __stat32(__f, __p);\n"
+ "}\n\n# else /* !__STDC__ */\n"
+
+ "static int\tstat(__f, __p)\n"
+ "\tchar *__f;\n"
+ "\tstruct stat *__p;\n"
+ "{\n"
+ "\treturn __stat32(__f, __p);\n"
+ "}\n"
+ "#endif";
};
hackname = sco_strict_ansi;
mach = "i?86-*-sco3.2*";
select = "^[ \t]*#[ \t]*if.*!__STDC__";
- sed = 's/!__STDC__/!defined(__STRICT_ANSI__)/g';
+
+ c_fix = format;
+ c_fix_arg = "%1defined(__STRICT_ANSI__)%2";
+ c_fix_arg = "^([ \t]*#[ \t]*if[ \t].*!)__STDC__(.*)";
+
+ test_text = "#if !__STDC__ /* not standard C */\nint foo;\n#endif";
};
* In 3.2v4.0 the const is missing.
*/
fix = {
- hackname = sco_utime;
- files = sys/times.h;
- mach = "i?86-*-sco3.2v4*";
- select = "\(const char \*, struct utimbuf \*\);";
- sed = 's/(const char \*, struct utimbuf \*);/'
- '(const char *, const struct utimbuf *);/';
+ hackname = sco_utime;
+ files = sys/times.h;
+ mach = "i?86-*-sco3.2v4*";
+
+ select = '\(const char \*, struct utimbuf \*\);';
+ c_fix = format;
+ c_fix_arg = '(const char *, const struct utimbuf *);';
+
+ test_text = "extern int utime(const char *, struct utimbuf *);";
};
};
#endif
+
+/*
+ * Sony NEWSOS 5.0 does not support the complete ANSI C standard.
+ */
+#ifdef SONY
+fix = {
+ hackname = sony_stdio;
+ files = stdio.h;
+ test = " -x /bin/sony";
+ test = " ! -z \"`if /bin/sony ; then echo true ; fi`\"";
+ sed = "s/__filbuf/_filbuf/g\n"
+ "s/__flsbuf/_flsbuf/g\n"
+ "s/__iob/_iob/g";
+};
+#endif
+
+
/*
* Incorrect #include in Sony News-OS 3.2.
*/
};
#endif
+
/*
* Add a `static' declaration of `getrnge' into <regexp.h>.
*
* a missing semi-colon at the end of the statsswtch structure definition.
*/
fix = {
- hackname = statsswtch;
- files = rpcsvc/rstat.h;
- select = "boottime$";
- sed = "s/boottime$/boottime;/";
+ hackname = statsswtch;
+ files = rpcsvc/rstat.h;
+ select = "boottime$";
+ c_fix = format;
+ c_fix_arg = "boottime;";
+ test_text = "struct statswtch {\n int boottime\n};";
};
/*
* Select those files containing '(*name)()'.
*/
- select = '\(\*[a-z][a-z_]*\)\(\)';
- sed = 's'
- '/^\(.*(\*[a-z][a-z_]*)(\)' '\();.*\)'
- "/\\\n"
- "#ifdef __cplusplus\\\n"
- '\1...\2' "\\\n"
- "#else\\\n"
- '\1\2' "\\\n"
- "#endif"
- "/";
-};
+ select = '\(\*[a-z][a-z_]*\)\(\)';
+ c_fix = format;
+ c_fix_arg = "#ifdef __cplusplus\n%1(...);%2\n"
+ "#else\n%1();%2\n#endif";
+ c_fix_arg = '(.*\(\*[a-z][a-z_]*\))\(\);(.*)';
-/*
- * Fix bogus #ifdef on SunOS 4.1.
- */
-fix = {
- hackname = sun_bogus_ifdef;
- files = "hsfs/hsfs_spec.h";
- files = "hsfs/iso_spec.h";
- select = '#ifdef __i386__ || __vax__';
- sed = "s/\\#ifdef __i386__ || __vax__/\\#if __i386__ || __vax__/g";
+ test_text =
+ "struct auth_t {\n"
+ " int (*name)(); /* C++ bad */\n"
+ "};";
};
* Fix bogus #ifdef on SunOS 4.1.
*/
fix = {
- hackname = sun_bogus_ifdef_sun4c;
- files = "hsfs/hsnode.h";
- select = '#ifdef __i386__ || __sun4c__';
- sed = "s/\\#ifdef __i386__ || __sun4c__/\\#if __i386__ || __sun4c__/g";
+ hackname = sun_bogus_ifdef;
+ files = "hsfs/hsfs_spec.h";
+ files = "hsfs/iso_spec.h";
+ select = '#ifdef(.*\|\|.*)';
+ c_fix = format;
+ c_fix_arg = "#if%1";
+
+ test_text = "#ifdef __i386__ || __vax__ || __sun4c__";
};
* Fix the CAT macro in SunOS memvar.h.
*/
fix = {
- hackname = sun_catmacro;
- files = pixrect/memvar.h;
- select = "^#define[ \t]+CAT\\(a,b\\)";
- sed = "/^#define[ \t]CAT(a,b)/ i\\\n"
- "#ifdef __STDC__ \\\n"
- "#define CAT(a,b) a##b\\\n"
- "#else\n";
+ hackname = sun_catmacro;
+ files = pixrect/memvar.h;
+ select = "^#define[ \t]+CAT\\(a,b\\).*";
+ c_fix = format;
- sed = "/^#define[ \t]CAT(a,b)/ a\\\n"
- "#endif\n";
+ c_fix_arg =
+ "#ifdef __STDC__\n"
+ "# define CAT(a,b) a##b\n"
+ "#else\n%0\n#endif";
+
+ test_text =
+ "#define CAT(a,b)\ta/**/b";
};
sed = "s/int[ \t][ \t]*free/void\tfree/g";
sed = "s/char\\([ \t]*\\*[ \t]*malloc\\)/void\\1/g";
sed = "s/char\\([ \t]*\\*[ \t]*realloc\\)/void\\1/g";
+
+ test_text =
+ "typedef char *\tmalloc_t;\n"
+ "int \tfree();\n"
+ "char*\tmalloc();\n"
+ "char*\trealloc();";
};
files = rpcsvc/rusers.h;
select = "_cnt$";
sed = "/^struct/,/^};/s/_cnt$/_cnt;/";
+ test_text = "struct mumble\n int _cnt\n};";
};
hackname = sun_signal;
files = sys/signal.h;
files = signal.h;
- select = "^void\t" '\(\*signal\(\)\)\(\);';
+ select = "^void\t" '\(\*signal\(\)\)\(\);.*';
- sed = "/^void\t" '(\*signal())();$/i' "\\\n"
- "#ifdef __cplusplus" "\\\n"
- "void\t(*signal(...))(...);" "\\\n"
- "#else" "\n";
+ c_fix = format;
+ c_fix_arg =
+ "#ifdef __cplusplus\n"
+ "void\t(*signal(...))(...);\n"
+ "#else\n%0\n#endif";
- sed = "/^void\t" '(\*signal())();$/a' "\\\n"
- '#endif' "\n";
+ test_text = "void\t(*signal())();";
};
* of struct exception, so the prototype (added by fixproto) causes havoc.
*/
fix = {
- hackname = sunos_matherr_decl;
- files = math.h;
+ hackname = sunos_matherr_decl;
+ files = math.h;
+
/* If matherr has a prototype already, the header needs no fix. */
- bypass = 'matherr.*struct exception';
- /*
- * Once a declaration for 'struct exception' is found,
- * stop trying to insert a forward reference for it.
- */
- sed = "/^struct exception/,$b";
- sed = "/matherr/i\\\nstruct exception;\n";
+ bypass = 'matherr.*struct exception';
+ select = matherr;
+
+ c_fix = wrap;
+ c_fix_arg = "struct exception;\n";
+
+ test_text = "extern int matherr();";
};
fix = {
hackname = sunos_strlen;
files = strings.h;
- select = "int[ \t]*strlen";
- sed = "s/int[ \t]*strlen();/__SIZE_TYPE__ strlen();/";
+ select = "int[ \t]*strlen\\(\\);(.*)";
+ c_fix = format;
+ c_fix_arg = "__SIZE_TYPE__ strlen();%1";
+ test_text = " int\tstrlen(); /* string length */";
};
* which conflicts with the fixproto definition. The fixproto
* definition and the Solaris definition are used the same way.
*/
-#ifdef SVR4
fix = {
hackname = svr4__p;
files = math.h;
files = floatingpoint.h;
- select = "^#define[ \t]*__P";
- sed = "/^#define[ \t]*__P/i\\\n#ifndef __P\n";
- sed = "/^#define[ \t]*__P/a\\\n#endif\n";
+ select = "^#define[ \t]+__P.*";
+ c_fix = format;
+ c_fix_arg = "#ifndef __P\n%0\n#endif";
+
+ test_text = "#define __P(a) a";
};
-#endif
+
/*
* Disable apparent native compiler optimization cruft in SVR4.2 <string.h>
files = prototypes.h;
select = 'getcwd\(char \*, int\)';
- sed = 's/getcwd(char \*, int)/getcwd(char *, size_t)/';
+ c_fix = format;
+ c_fix_arg = "getcwd(char *, size_t)";
+
+ test_text = "extern char* getcwd(char *, int);";
};
files = sys/mkdev.h;
select = '^static';
- sed = "/^dev_t makedev(/s/^/static /";
- sed = "/^major_t major(/s/^/static /";
- sed = "/^minor_t minor(/s/^/static /";
+ sed = "/^dev_t makedev(/s/^/static /";
+ sed = "/^major_t major(/s/^/static /";
+ sed = "/^minor_t minor(/s/^/static /";
};
#endif /* SVR5 */
files = stdlib.h;
files = unistd.h;
- sed = 's/profil(unsigned short \*, unsigned int, '
- 'unsigned int, unsigned int)'
- '/profil(unsigned short *, size_t, int, unsigned)/';
+ select =
+ 'profil\(unsigned short \*, unsigned int, unsigned int, unsigned int\)';
+ c_fix = format;
+ c_fix_arg = 'profil(unsigned short *, size_t, int, unsigned int)';
+
+ test_text =
+ 'profil(unsigned short *, unsigned int, unsigned int, unsigned int);';
};
hackname = systypes_stdlib_size_t;
files = sys/types.h;
files = stdlib.h;
- select = "typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t";
+ select = "typedef[ \t]+[A-Za-z_][ \tA-Za-z_]*[ \t]size_t.*";
bypass = "_(GCC|BSD)_SIZE_T";
- sed = "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/i\\\n"
- "#ifndef _GCC_SIZE_T\\\n"
- "#define _GCC_SIZE_T\n";
+ c_fix = format;
+ c_fix_arg =
+ "#ifndef _GCC_SIZE_T\n"
+ "#define _GCC_SIZE_T\n%0\n#endif";
- sed = "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/a\\\n"
- "#endif\n";
+ test_text = "typedef unsigned int size_t; /* size of something */";
};
/*
- * Fix return type of exit and abort in <stdlib.h>
+ * Fix return type of calloc, malloc, realloc, bsearch and exit
*/
fix = {
hackname = sysz_stdlib_for_sun;
files = stdlib.h;
- sed = "s/int\tabort/void\tabort/g";
- sed = "s/int\tfree/void\tfree/g";
- sed = "s/char[ \t]*\\*[ \t]*calloc/void \\*\tcalloc/g";
- sed = "s/char[ \t]*\\*[ \t]*malloc/void \\*\tmalloc/g";
- sed = "s/char[ \t]*\\*[ \t]*realloc/void \\*\trealloc/g";
- sed = "s/char[ \t]*\\*[ \t]*bsearch/void \\*\tbsearch/g";
- sed = "s/int[ \t][ \t]*exit/void\texit/g";
+ select = "char[ \t]*\\*[ \t]*(calloc|malloc|realloc|bsearch)[ \t]*\\(";
+ c_fix = format;
+ c_fix_arg = "void *\t%1(";
+
+ test_text =
+ "extern char*\tcalloc(size_t);\n"
+ "extern char*\tmalloc(size_t);\n"
+ "extern char*\trealloc(void*,size_t);\n"
+ "extern char*\tbsearch(void*,size_t,size_t);\n";
};