inclhack.def (hpux_maxint, [...]): Remove.

* inclhack.def (hpux_maxint, limits_ifndefs, math_huge_val_ifndef,
	svr4__p, undefine_null): Remove.
	* fixincl.x: Regenerate.
	* tests/base/AvailabilityMacros.h, tests/base/com_err.h: New.
	* tests/base/sys/param.h: Remove.
	* tests/base/curses.h, tests/base/math.h, tests/base/testing.h,
	tests/base/sys/limits.h: Update.

From-SVN: r90594
This commit is contained in:
Joseph Myers 2004-11-13 20:41:01 +00:00 committed by Joseph Myers
parent ae8cacc6fd
commit 68f674e990
9 changed files with 34 additions and 394 deletions

View File

@ -1,3 +1,13 @@
2004-11-13 Joseph S. Myers <joseph@codesourcery.com>
* inclhack.def (hpux_maxint, limits_ifndefs, math_huge_val_ifndef,
svr4__p, undefine_null): Remove.
* fixincl.x: Regenerate.
* tests/base/AvailabilityMacros.h, tests/base/com_err.h: New.
* tests/base/sys/param.h: Remove.
* tests/base/curses.h, tests/base/math.h, tests/base/testing.h,
tests/base/sys/limits.h: Update.
2004-11-12 Mike Stump <mrs@apple.com>
* Makefile.in (html): Add html generation support.

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Friday November 12, 2004 at 10:24:50 PM UTC
* It has been AutoGen-ed Saturday November 13, 2004 at 08:30:08 PM UTC
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Nov 12 22:24:50 UTC 2004
/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Nov 13 20:30:09 UTC 2004
*
* You must regenerate it. Use the ./genfixes script.
*
@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
* This file contains 181 fixup descriptions.
* This file contains 176 fixup descriptions.
*
* See README for more information.
*
@ -2645,58 +2645,6 @@ static const char* apzHpux_Long_DoublePatch[] = { "sed",
"-e", "s/long_double/long double/g",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux_Maxint fix
*/
tSCC zHpux_MaxintName[] =
"hpux_maxint";
/*
* File name selection pattern
*/
tSCC zHpux_MaxintList[] =
"|sys/param.h|values.h|";
/*
* Machine/OS name selection pattern
*/
#define apzHpux_MaxintMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux_MaxintSelect0[] =
"^#[ \t]*define[ \t]+MAXINT[ \t]";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zHpux_MaxintBypass0[] =
"^#[ \t]*ifndef[ \t]+MAXINT";
/*
* perform the 'test' shell command - do fix on success
*/
tSCC zHpux_MaxintTest0[] =
"-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
#define HPUX_MAXINT_TEST_CT 3
static tTestDesc aHpux_MaxintTests[] = {
{ TT_TEST, zHpux_MaxintTest0, 0 /* unused */ },
{ TT_NEGREP, zHpux_MaxintBypass0, (regex_t*)NULL },
{ TT_EGREP, zHpux_MaxintSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hpux_Maxint
*/
static const char* apzHpux_MaxintPatch[] = {
"format",
"#ifndef MAXINT\n\
%0\n\
#endif",
"^#[ \t]*define[ \t]+MAXINT[ \t].*",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux_Systime fix
@ -3375,50 +3323,6 @@ extern [a-z_]+ mem.*(\n\
#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Limits_Ifndefs fix
*/
tSCC zLimits_IfndefsName[] =
"limits_ifndefs";
/*
* File name selection pattern
*/
tSCC zLimits_IfndefsList[] =
"|sys/limits.h|limits.h|";
/*
* Machine/OS name selection pattern
*/
#define apzLimits_IfndefsMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zLimits_IfndefsSelect0[] =
"^[ \t]*#[ \t]*define[ \t]+((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zLimits_IfndefsBypass0[] =
"ifndef[ \t]+FLT_(MIN|MAX)";
#define LIMITS_IFNDEFS_TEST_CT 2
static tTestDesc aLimits_IfndefsTests[] = {
{ TT_NEGREP, zLimits_IfndefsBypass0, (regex_t*)NULL },
{ TT_EGREP, zLimits_IfndefsSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Limits_Ifndefs
*/
static const char* apzLimits_IfndefsPatch[] = {
"format",
"#ifndef %1\n\
%0\n\
#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Linux_Ia64_Ucontext fix
@ -3703,44 +3607,6 @@ static const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c",
\tfi",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Math_Huge_Val_Ifndef fix
*/
tSCC zMath_Huge_Val_IfndefName[] =
"math_huge_val_ifndef";
/*
* File name selection pattern
*/
tSCC zMath_Huge_Val_IfndefList[] =
"|math.h|math/math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzMath_Huge_Val_IfndefMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zMath_Huge_Val_IfndefSelect0[] =
"define[ \t]+HUGE_VAL";
#define MATH_HUGE_VAL_IFNDEF_TEST_CT 1
static tTestDesc aMath_Huge_Val_IfndefTests[] = {
{ TT_EGREP, zMath_Huge_Val_IfndefSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Math_Huge_Val_Ifndef
*/
static const char* apzMath_Huge_Val_IfndefPatch[] = {
"format",
"#ifndef HUGE_VAL\n\
%0\n\
#endif",
"^[ \t]*#[ \t]*define[ \t]+HUGE_VAL[ \t].*",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Nested_Auth_Des fix
@ -5503,43 +5369,6 @@ static const char* apzSunos_StrlenPatch[] = {
"__SIZE_TYPE__ strlen();%1",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Svr4__P fix
*/
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
static tTestDesc aSvr4__PTests[] = {
{ TT_EGREP, zSvr4__PSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Svr4__P
*/
static const char* apzSvr4__PPatch[] = {
"format",
"#ifndef __P\n\
%0\n\
#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Svr4_Disable_Opt fix
@ -6595,51 +6424,6 @@ static const char* apzUltrix_UnistdPatch[] = { "sed",
\tvfork(),\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Undefine_Null fix
*/
tSCC zUndefine_NullName[] =
"undefine_null";
/*
* File name selection pattern
*/
#define zUndefine_NullList (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzUndefine_NullMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zUndefine_NullSelect0[] =
"^#[ \t]*define[ \t]+NULL[ \t]";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zUndefine_NullBypass0[] =
"#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])";
#define UNDEFINE_NULL_TEST_CT 2
static tTestDesc aUndefine_NullTests[] = {
{ TT_NEGREP, zUndefine_NullBypass0, (regex_t*)NULL },
{ TT_EGREP, zUndefine_NullSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Undefine_Null
*/
static const char* apzUndefine_NullPatch[] = {
"format",
"#ifndef NULL\n\
#define NULL%1\n\
#endif\n",
"^#[ \t]*define[ \t]+NULL([^\r\n\
]+)[\r]*\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Unicosmk_Restrict fix
@ -7247,9 +7031,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 213
#define REGEX_COUNT 205
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 181
#define FIX_COUNT 176
/*
* Enumerate the fixes
@ -7318,7 +7102,6 @@ typedef enum {
HPUX8_BOGUS_INLINES_FIXIDX,
HPUX_CTYPE_MACROS_FIXIDX,
HPUX_LONG_DOUBLE_FIXIDX,
HPUX_MAXINT_FIXIDX,
HPUX_SYSTIME_FIXIDX,
INT_ABORT_FREE_AND_EXIT_FIXIDX,
IO_QUOTES_DEF_FIXIDX,
@ -7337,7 +7120,6 @@ typedef enum {
KANDR_CONCAT_FIXIDX,
LIBC1_G_VA_LIST_FIXIDX,
LIBC1_IFDEFD_MEMX_FIXIDX,
LIMITS_IFNDEFS_FIXIDX,
LINUX_IA64_UCONTEXT_FIXIDX,
LYNXOS_NO_WARNING_IN_SYS_TIME_H_FIXIDX,
LYNXOS_MISSING_PUTENV_FIXIDX,
@ -7345,7 +7127,6 @@ typedef enum {
MACHINE_NAME_FIXIDX,
MATH_EXCEPTION_FIXIDX,
MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX,
MATH_HUGE_VAL_IFNDEF_FIXIDX,
NESTED_AUTH_DES_FIXIDX,
NESTED_MOTOROLA_FIXIDX,
NESTED_SYS_LIMITS_FIXIDX,
@ -7391,7 +7172,6 @@ typedef enum {
SUN_RUSERS_SEMI_FIXIDX,
SUN_SIGNAL_FIXIDX,
SUNOS_STRLEN_FIXIDX,
SVR4__P_FIXIDX,
SVR4_DISABLE_OPT_FIXIDX,
SVR4_GETCWD_FIXIDX,
SVR4_KRNL_FIXIDX,
@ -7420,7 +7200,6 @@ typedef enum {
ULTRIX_STRINGS2_FIXIDX,
ULTRIX_SYS_TIME_FIXIDX,
ULTRIX_UNISTD_FIXIDX,
UNDEFINE_NULL_FIXIDX,
UNICOSMK_RESTRICT_FIXIDX,
UW7_BYTEORDER_FIX_FIXIDX,
VA_I960_MACRO_FIXIDX,
@ -7754,11 +7533,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_LONG_DOUBLE_TEST_CT, FD_MACH_ONLY,
aHpux_Long_DoubleTests, apzHpux_Long_DoublePatch, 0 },
{ zHpux_MaxintName, zHpux_MaxintList,
apzHpux_MaxintMachs,
HPUX_MAXINT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_MaxintTests, apzHpux_MaxintPatch, 0 },
{ zHpux_SystimeName, zHpux_SystimeList,
apzHpux_SystimeMachs,
HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@ -7849,11 +7623,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
LIBC1_IFDEFD_MEMX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aLibc1_Ifdefd_MemxTests, apzLibc1_Ifdefd_MemxPatch, 0 },
{ zLimits_IfndefsName, zLimits_IfndefsList,
apzLimits_IfndefsMachs,
LIMITS_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aLimits_IfndefsTests, apzLimits_IfndefsPatch, 0 },
{ zLinux_Ia64_UcontextName, zLinux_Ia64_UcontextList,
apzLinux_Ia64_UcontextMachs,
LINUX_IA64_UCONTEXT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@ -7889,11 +7658,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT,
aMath_Huge_Val_From_Dbl_MaxTests, apzMath_Huge_Val_From_Dbl_MaxPatch, 0 },
{ zMath_Huge_Val_IfndefName, zMath_Huge_Val_IfndefList,
apzMath_Huge_Val_IfndefMachs,
MATH_HUGE_VAL_IFNDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aMath_Huge_Val_IfndefTests, apzMath_Huge_Val_IfndefPatch, 0 },
{ zNested_Auth_DesName, zNested_Auth_DesList,
apzNested_Auth_DesMachs,
NESTED_AUTH_DES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@ -8119,11 +7883,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSunos_StrlenTests, apzSunos_StrlenPatch, 0 },
{ zSvr4__PName, zSvr4__PList,
apzSvr4__PMachs,
SVR4__P_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSvr4__PTests, apzSvr4__PPatch, 0 },
{ zSvr4_Disable_OptName, zSvr4_Disable_OptList,
apzSvr4_Disable_OptMachs,
SVR4_DISABLE_OPT_TEST_CT, FD_MACH_ONLY,
@ -8264,11 +8023,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ULTRIX_UNISTD_TEST_CT, FD_MACH_ONLY,
aUltrix_UnistdTests, apzUltrix_UnistdPatch, 0 },
{ zUndefine_NullName, zUndefine_NullList,
apzUndefine_NullMachs,
UNDEFINE_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aUndefine_NullTests, apzUndefine_NullPatch, 0 },
{ zUnicosmk_RestrictName, zUnicosmk_RestrictList,
apzUnicosmk_RestrictMachs,
UNICOSMK_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,

View File

@ -1480,26 +1480,6 @@ fix = {
};
/*
* HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
*/
fix = {
hackname = hpux_maxint;
files = sys/param.h;
files = values.h;
select = "^#[ \t]*define[ \t]+MAXINT[ \t]";
bypass = "^#[ \t]*ifndef[ \t]+MAXINT";
test =
"-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
c_fix = format;
c_fix_arg = "#ifndef MAXINT\n%0\n#endif";
c_fix_arg = "^#[ \t]*define[ \t]+MAXINT[ \t].*";
test_text = '#define MAXINT 0x7FFFFFFF';
};
/*
* Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
*/
@ -1863,34 +1843,6 @@ fix = {
};
/*
* In limits.h, put #ifndefs around things that are supposed to be defined
* in float.h to avoid redefinition errors if float.h is included first.
* On HP/UX this patch does not work, because on HP/UX limits.h uses
* multi line comments and the inserted #endif winds up inside the
* comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if
* we find a #ifndef FLT_MIN we assume that all the required #ifndefs
* are there, and we do not add them ourselves.
*
* QNX Software Systems also guards the defines, but doesn't define
* FLT_MIN. Therefore, bypass the fix for *either* guarded FLT_MIN
* or guarded FLT_MAX.
*/
fix = {
hackname = limits_ifndefs;
files = "sys/limits.h";
files = "limits.h";
select = "^[ \t]*#[ \t]*define[ \t]+"
"((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
bypass = "ifndef[ \t]+FLT_(MIN|MAX)";
c_fix = format;
c_fix_arg = "#ifndef %1\n%0\n#endif";
/* Second arg is select expression */
test_text = " #\tdefine\tDBL_DIG \t 0 /* somthin' */";
};
/* The /usr/include/sys/ucontext.h on ia64-*linux-gnu systems defines
* an _SC_GR0_OFFSET macro using an idiom that isn't a compile time
* constant on recent versions of g++.
@ -2059,23 +2011,6 @@ fix = {
};
/*
* In any case, put #ifndef .. #endif around #define HUGE_VAL in math.h.
*/
fix = {
hackname = math_huge_val_ifndef;
files = math.h;
files = math/math.h;
select = "define[ \t]+HUGE_VAL";
c_fix = format;
c_fix_arg = "#ifndef HUGE_VAL\n%0\n#endif";
c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+HUGE_VAL[ \t].*";
test_text = "# define\tHUGE_VAL 3.4e+40";
};
/*
* nested comment
*/
@ -3036,23 +2971,6 @@ fix = {
};
/*
* Solaris math.h and floatingpoint.h define __P without protection,
* which conflicts with the fixproto definition. The fixproto
* definition and the Solaris definition are used the same way.
*/
fix = {
hackname = svr4__p;
files = math.h;
files = floatingpoint.h;
select = "^#define[ \t]+__P.*";
c_fix = format;
c_fix_arg = "#ifndef __P\n%0\n#endif";
test_text = "#define __P(a) a";
};
/*
* Disable apparent native compiler optimization cruft in SVR4.2 <string.h>
* that is visible to any ANSI compiler using this include. Simply
@ -3907,25 +3825,6 @@ fix = {
};
/*
* Fix multiple defines for NULL. Sometimes, we stumble into \r\n
* terminated lines, so accommodate these. Test both ways.
* Don't bother to reproduce the \r\n termination, as GCC has to
* recognize \n termination anyway.
*/
fix = {
hackname = undefine_null;
select = "^#[ \t]*define[ \t]+NULL[ \t]";
bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])";
c_fix = format;
c_fix_arg = "#ifndef NULL\n#define NULL%1\n#endif\n";
c_fix_arg = "^#[ \t]*define[ \t]+NULL([^\r\n]+)[\r]*\n";
test_text = "#define NULL 0UL\r\n"
"#define NULL\t((void*)0)\n";
};
/*
* On Cray Unicos/Mk some standard headers use the C99 keyword "restrict"
* which must be replaced by __restrict__ for GCC.

View File

@ -0,0 +1,15 @@
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/AvailabilityMacros.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#if defined( DARWIN_GCC4_BREAKAGE_CHECK )
#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#endif /* DARWIN_GCC4_BREAKAGE_CHECK */

View File

@ -2,15 +2,13 @@
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/sys/param.h"
"fixinc/tests/inc/com_err.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#if defined( HPUX_MAXINT_CHECK )
#ifndef MAXINT
#define MAXINT 0x7FFFFFFF
#endif
#endif /* HPUX_MAXINT_CHECK */
#if defined( STDIO_DUMMY_VA_LIST_CLIENTS_CHECK )
extern void mumble( __gnuc_va_list);
#endif /* STDIO_DUMMY_VA_LIST_CLIENTS_CHECK */

View File

@ -31,7 +31,5 @@ struct term;
#if defined( VOID_NULL_CHECK )
#ifndef NULL
#define NULL 0 /* typed NULL */
#endif
#endif /* VOID_NULL_CHECK */

View File

@ -68,19 +68,10 @@ typedef struct exception t_math_exception;
#if defined( MATH_HUGE_VAL_FROM_DBL_MAX_CHECK )
#ifndef HUGE_VAL
#define HUGE_VAL 3.1415e+9 /* really big */
#endif
#endif /* MATH_HUGE_VAL_FROM_DBL_MAX_CHECK */
#if defined( MATH_HUGE_VAL_IFNDEF_CHECK )
#ifndef HUGE_VAL
# define HUGE_VAL 3.4e+40
#endif
#endif /* MATH_HUGE_VAL_IFNDEF_CHECK */
#if defined( RS6000_DOUBLE_CHECK )
#ifndef __cplusplus
extern int class();
@ -105,13 +96,6 @@ int foo;
#endif /* STRICT_ANSI_NOT_CTD_CHECK */
#if defined( SVR4__P_CHECK )
#ifndef __P
#define __P(a) a
#endif
#endif /* SVR4__P_CHECK */
#if defined( ULTRIX_ATOF_PARAM_CHECK )
extern double atof(const char *__nptr);

View File

@ -9,13 +9,6 @@
#if defined( LIMITS_IFNDEFS_CHECK )
#ifndef DBL_DIG
# define DBL_DIG 0 /* somthin' */
#endif
#endif /* LIMITS_IFNDEFS_CHECK */
#if defined( NESTED_MOTOROLA_CHECK )
#undef PIPE_BUF /* max # bytes atomic in write to a */
/* PIPE */

View File

@ -129,17 +129,6 @@ extern size_t
#endif /* SYSV68_STRING_CHECK */
#if defined( UNDEFINE_NULL_CHECK )
#ifndef NULL
#define NULL 0UL
#endif
#ifndef NULL
#define NULL ((void*)0)
#endif
#endif /* UNDEFINE_NULL_CHECK */
#if defined( WINDISS_VALIST_CHECK )
#include <stdarg.h>
#endif /* WINDISS_VALIST_CHECK */