Commit b5639a49 by Bruce Korb Committed by Bruce Korb

accommodate __STDC__ == 0 tests in UW 2.1.2 Remove all the fix suppression...

accommodate __STDC__ == 0 tests in UW 2.1.2
Remove all the fix suppression "fixes"
adjust sample results for changes in fixes

From-SVN: r48193
parent 871c5f6b
2001-12-19 Bruce Korb <bkorb@gnu.org>
* gcc/fixinc/inclhack.def: Remove all the fix suppression "fixes".
(strict_ansi_not_ctd): accommodate __STDC__ == 0 tests in UW 2.1.2
* gcc/fixinc/mkfixinc.sh(i?86-*-sysv4.2uw2*): now uses fixincl program
* gcc/fixinc/base/...: adjust for changes in fixes
2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk> 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
* po/gcc.pot: Regenerate. * po/gcc.pot: Regenerate.
......
...@@ -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 145 fixup descriptions. * This file contains 138 fixup descriptions.
* *
* See README for more information. * See README for more information.
* *
...@@ -32,229 +32,6 @@ ...@@ -32,229 +32,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Aaa_Bad_Fixes fix
*/
tSCC zAaa_Bad_FixesName[] =
"AAA_bad_fixes";
/*
* File name selection pattern
*/
tSCC zAaa_Bad_FixesList[] =
"|sundev/ipi_error.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_Bad_FixesMachs (const char**)NULL
#define AAA_BAD_FIXES_TEST_CT 0
#define aAaa_Bad_FixesTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Aaa_Bad_Fixes
*/
static const char* apzAaa_Bad_FixesPatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aaa_Ki fix
*/
tSCC zAaa_KiName[] =
"AAA_ki";
/*
* File name selection pattern
*/
tSCC zAaa_KiList[] =
"|sys/ki.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_KiMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAaa_KiSelect0[] =
"11.00 HP-UX LP64";
#define AAA_KI_TEST_CT 1
static tTestDesc aAaa_KiTests[] = {
{ TT_EGREP, zAaa_KiSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aaa_Ki
*/
static const char* apzAaa_KiPatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aaa_Ki_Calls fix
*/
tSCC zAaa_Ki_CallsName[] =
"AAA_ki_calls";
/*
* File name selection pattern
*/
tSCC zAaa_Ki_CallsList[] =
"|sys/ki_calls.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_Ki_CallsMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAaa_Ki_CallsSelect0[] =
"kthread_create_caller_t";
#define AAA_KI_CALLS_TEST_CT 1
static tTestDesc aAaa_Ki_CallsTests[] = {
{ TT_EGREP, zAaa_Ki_CallsSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aaa_Ki_Calls
*/
static const char* apzAaa_Ki_CallsPatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aaa_Ki_Defs fix
*/
tSCC zAaa_Ki_DefsName[] =
"AAA_ki_defs";
/*
* File name selection pattern
*/
tSCC zAaa_Ki_DefsList[] =
"|sys/ki_defs.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_Ki_DefsMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAaa_Ki_DefsSelect0[] =
"Kernel Instrumentation Definitions";
#define AAA_KI_DEFS_TEST_CT 1
static tTestDesc aAaa_Ki_DefsTests[] = {
{ TT_EGREP, zAaa_Ki_DefsSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aaa_Ki_Defs
*/
static const char* apzAaa_Ki_DefsPatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aaa_Ki_Iface fix
*/
tSCC zAaa_Ki_IfaceName[] =
"AAA_ki_iface";
/*
* File name selection pattern
*/
tSCC zAaa_Ki_IfaceList[] =
"|sys/ki_iface.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_Ki_IfaceMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAaa_Ki_IfaceSelect0[] =
"These definitions are for HP Internal developers";
#define AAA_KI_IFACE_TEST_CT 1
static tTestDesc aAaa_Ki_IfaceTests[] = {
{ TT_EGREP, zAaa_Ki_IfaceSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aaa_Ki_Iface
*/
static const char* apzAaa_Ki_IfacePatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aaa_Standards fix
*/
tSCC zAaa_StandardsName[] =
"AAA_standards";
/*
* File name selection pattern
*/
tSCC zAaa_StandardsList[] =
"|standards.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_StandardsMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAaa_StandardsSelect0[] =
"GNU and MIPS C compilers define __STDC__ differently";
#define AAA_STANDARDS_TEST_CT 1
static tTestDesc aAaa_StandardsTests[] = {
{ TT_EGREP, zAaa_StandardsSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aaa_Standards
*/
static const char* apzAaa_StandardsPatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aaa_Time fix
*/
tSCC zAaa_TimeName[] =
"AAA_time";
/*
* File name selection pattern
*/
tSCC zAaa_TimeList[] =
"|sys/time.h|";
/*
* Machine/OS name selection pattern
*/
#define apzAaa_TimeMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAaa_TimeSelect0[] =
"11.0 and later representation of ki time";
#define AAA_TIME_TEST_CT 1
static tTestDesc aAaa_TimeTests[] = {
{ TT_EGREP, zAaa_TimeSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aaa_Time
*/
static const char* apzAaa_TimePatch[] = {
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aab_Dgux_Int_Varargs fix * Description of Aab_Dgux_Int_Varargs fix
*/ */
tSCC zAab_Dgux_Int_VarargsName[] = tSCC zAab_Dgux_Int_VarargsName[] =
...@@ -278,9 +55,9 @@ tSCC zAab_Dgux_Int_VarargsList[] = ...@@ -278,9 +55,9 @@ tSCC zAab_Dgux_Int_VarargsList[] =
static const char* apzAab_Dgux_Int_VarargsPatch[] = { static const char* apzAab_Dgux_Int_VarargsPatch[] = {
"#ifndef __INT_VARARGS_H\n\ "#ifndef __INT_VARARGS_H\n\
#define __INT_VARARGS_H\n\n\ #define __INT_VARARGS_H\n\n\
/************************************************************************/\n\ /********************************************************/\n\
/* _INT_VARARGS.H - Define the common stuff for varargs/stdarg/stdio. */\n\ /* Define the common stuff for varargs/stdarg/stdio. */\n\
/************************************************************************/\n\n\ /********************************************************/\n\n\
/*\n\ /*\n\
** This file is a DG internal header. Never include this\n\ ** This file is a DG internal header. Never include this\n\
** file directly.\n\ ** file directly.\n\
...@@ -321,7 +98,7 @@ typedef char * va_list;\n\ ...@@ -321,7 +98,7 @@ typedef char * va_list;\n\
#endif /* _IX86_ANY */\n\n\ #endif /* _IX86_ANY */\n\n\
#endif /* __LINT__ */\n\ #endif /* __LINT__ */\n\
#endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */\n\ #endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */\n\
#endif /* #ifndef __INT_VARARGS_H */\n", #endif /* #ifndef __INT_VARARGS_H */",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2081,14 +1858,14 @@ tSCC zHpux11_Size_TName[] = ...@@ -2081,14 +1858,14 @@ tSCC zHpux11_Size_TName[] =
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
tSCC* apzHpux11_Size_TMachs[] = { tSCC* apzHpux11_Size_TMachs[] = {
"*-hp-hpux*", "*-hp-hpux11*",
(const char*)NULL }; (const char*)NULL };
/* /*
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zHpux11_Size_TSelect0[] = tSCC zHpux11_Size_TSelect0[] =
"^#define __size_t size_t"; "__size_t";
#define HPUX11_SIZE_T_TEST_CT 1 #define HPUX11_SIZE_T_TEST_CT 1
static tTestDesc aHpux11_Size_TTests[] = { static tTestDesc aHpux11_Size_TTests[] = {
...@@ -2100,7 +1877,6 @@ static tTestDesc aHpux11_Size_TTests[] = { ...@@ -2100,7 +1877,6 @@ static tTestDesc aHpux11_Size_TTests[] = {
static const char* apzHpux11_Size_TPatch[] = { static const char* apzHpux11_Size_TPatch[] = {
"format", "format",
"_hpux_size_t", "_hpux_size_t",
"__size_t",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2159,7 +1935,7 @@ tSCC zHpux11_VsnprintfList[] = ...@@ -2159,7 +1935,7 @@ tSCC zHpux11_VsnprintfList[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zHpux11_VsnprintfSelect0[] = tSCC zHpux11_VsnprintfSelect0[] =
"extern int vsnprintf\\(char \\*, __size_t, const char \\*, __va__list\\);"; "(extern int vsnprintf\\(char \\*, _[hpux]*_size_t, const char \\*,) __va__list\\);";
#define HPUX11_VSNPRINTF_TEST_CT 1 #define HPUX11_VSNPRINTF_TEST_CT 1
static tTestDesc aHpux11_VsnprintfTests[] = { static tTestDesc aHpux11_VsnprintfTests[] = {
...@@ -2170,7 +1946,7 @@ static tTestDesc aHpux11_VsnprintfTests[] = { ...@@ -2170,7 +1946,7 @@ static tTestDesc aHpux11_VsnprintfTests[] = {
*/ */
static const char* apzHpux11_VsnprintfPatch[] = { static const char* apzHpux11_VsnprintfPatch[] = {
"format", "format",
"extern int vsnprintf(char *, __size_t, const char *, __va_list);", "%1 __va_list);",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -3985,7 +3761,7 @@ tSCC zStrict_Ansi_NotName[] = ...@@ -3985,7 +3761,7 @@ tSCC zStrict_Ansi_NotName[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zStrict_Ansi_NotSelect0[] = tSCC zStrict_Ansi_NotSelect0[] =
"^([ \t]*#[ \t]*if.*)(!__STDC__|__STDC__[ \t]*==[ \t]*0|__STDC__[ \t]*!=[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)(.*)"; "^([ \t]*#[ \t]*if.*)(!__STDC__|__STDC__[ \t]*==[ \t]*0|__STDC__[ \t]*!=[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)";
/* /*
* perform the C function call test * perform the C function call test
...@@ -4002,7 +3778,7 @@ static tTestDesc aStrict_Ansi_NotTests[] = { ...@@ -4002,7 +3778,7 @@ static tTestDesc aStrict_Ansi_NotTests[] = {
*/ */
static const char* apzStrict_Ansi_NotPatch[] = { static const char* apzStrict_Ansi_NotPatch[] = {
"format", "format",
"%1 !defined(__STRICT_ANSI__)%3", "%1 !defined(__STRICT_ANSI__)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -4016,7 +3792,7 @@ tSCC zStrict_Ansi_Not_CtdName[] = ...@@ -4016,7 +3792,7 @@ tSCC zStrict_Ansi_Not_CtdName[] =
* File name selection pattern * File name selection pattern
*/ */
tSCC zStrict_Ansi_Not_CtdList[] = tSCC zStrict_Ansi_Not_CtdList[] =
"|math.h|limits.h|stdio.h|signal.h|stdlib.h|time.h|"; "|math.h|limits.h|stdio.h|signal.h|stdlib.h|sys/signal.h|time.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
...@@ -4026,7 +3802,7 @@ tSCC zStrict_Ansi_Not_CtdList[] = ...@@ -4026,7 +3802,7 @@ tSCC zStrict_Ansi_Not_CtdList[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zStrict_Ansi_Not_CtdSelect0[] = tSCC zStrict_Ansi_Not_CtdSelect0[] =
"^([ \t]*[|&][|&][ \t(]*)(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)(.*)"; "^([ \t]*(\\(|&&|\\|\\|)([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*[ \t(]*)(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)";
/* /*
* perform the C function call test * perform the C function call test
...@@ -4043,7 +3819,7 @@ static tTestDesc aStrict_Ansi_Not_CtdTests[] = { ...@@ -4043,7 +3819,7 @@ static tTestDesc aStrict_Ansi_Not_CtdTests[] = {
*/ */
static const char* apzStrict_Ansi_Not_CtdPatch[] = { static const char* apzStrict_Ansi_Not_CtdPatch[] = {
"format", "format",
"%1 !defined(__STRICT_ANSI__)%3", "%1 !defined(__STRICT_ANSI__)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -4066,7 +3842,7 @@ tSCC zStrict_Ansi_OnlyName[] = ...@@ -4066,7 +3842,7 @@ tSCC zStrict_Ansi_OnlyName[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zStrict_Ansi_OnlySelect0[] = tSCC zStrict_Ansi_OnlySelect0[] =
"^([ \t]*#[ \t]*if.*)(__STDC__[ \t]*!=[ \t]*0|__STDC__[ \t]*==[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0)(.*)"; "^([ \t]*#[ \t]*if.*)(__STDC__[ \t]*!=[ \t]*0|__STDC__[ \t]*==[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0)";
/* /*
* perform the C function call test * perform the C function call test
...@@ -4083,7 +3859,7 @@ static tTestDesc aStrict_Ansi_OnlyTests[] = { ...@@ -4083,7 +3859,7 @@ static tTestDesc aStrict_Ansi_OnlyTests[] = {
*/ */
static const char* apzStrict_Ansi_OnlyPatch[] = { static const char* apzStrict_Ansi_OnlyPatch[] = {
"format", "format",
"%1 defined(__STRICT_ANSI__)%3", "%1 defined(__STRICT_ANSI__)",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -5652,21 +5428,14 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -5652,21 +5428,14 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 152 #define REGEX_COUNT 146
#define MACH_LIST_SIZE_LIMIT 279 #define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 145 #define FIX_COUNT 138
/* /*
* Enumerate the fixes * Enumerate the fixes
*/ */
typedef enum { typedef enum {
AAA_BAD_FIXES_FIXIDX,
AAA_KI_FIXIDX,
AAA_KI_CALLS_FIXIDX,
AAA_KI_DEFS_FIXIDX,
AAA_KI_IFACE_FIXIDX,
AAA_STANDARDS_FIXIDX,
AAA_TIME_FIXIDX,
AAB_DGUX_INT_VARARGS_FIXIDX, AAB_DGUX_INT_VARARGS_FIXIDX,
AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX,
AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, AAB_FD_ZERO_GNU_TYPES_H_FIXIDX,
...@@ -5808,41 +5577,6 @@ typedef enum { ...@@ -5808,41 +5577,6 @@ typedef enum {
} t_fixinc_idx; } t_fixinc_idx;
tFixDesc fixDescList[ FIX_COUNT ] = { tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Bad_FixesName, zAaa_Bad_FixesList,
apzAaa_Bad_FixesMachs,
AAA_BAD_FIXES_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_Bad_FixesTests, apzAaa_Bad_FixesPatch, 0 },
{ zAaa_KiName, zAaa_KiList,
apzAaa_KiMachs,
AAA_KI_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_KiTests, apzAaa_KiPatch, 0 },
{ zAaa_Ki_CallsName, zAaa_Ki_CallsList,
apzAaa_Ki_CallsMachs,
AAA_KI_CALLS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_Ki_CallsTests, apzAaa_Ki_CallsPatch, 0 },
{ zAaa_Ki_DefsName, zAaa_Ki_DefsList,
apzAaa_Ki_DefsMachs,
AAA_KI_DEFS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_Ki_DefsTests, apzAaa_Ki_DefsPatch, 0 },
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
apzAaa_Ki_IfaceMachs,
AAA_KI_IFACE_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_Ki_IfaceTests, apzAaa_Ki_IfacePatch, 0 },
{ zAaa_StandardsName, zAaa_StandardsList,
apzAaa_StandardsMachs,
AAA_STANDARDS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_StandardsTests, apzAaa_StandardsPatch, 0 },
{ zAaa_TimeName, zAaa_TimeList,
apzAaa_TimeMachs,
AAA_TIME_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAaa_TimeTests, apzAaa_TimePatch, 0 },
{ zAab_Dgux_Int_VarargsName, zAab_Dgux_Int_VarargsList, { zAab_Dgux_Int_VarargsName, zAab_Dgux_Int_VarargsList,
apzAab_Dgux_Int_VarargsMachs, apzAab_Dgux_Int_VarargsMachs,
AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
......
...@@ -10,7 +10,7 @@ autogen definitions fixincl; ...@@ -10,7 +10,7 @@ autogen definitions fixincl;
blocksort output=XXX \ blocksort output=XXX \
pattern='^/\*$' \ pattern='^/\*$' \
start='DO +NOT +DO +BROKEN +FIXES' \ start='== REPLACEMENT FIXES ==' \
trailer='^/\*EOF\*[/]' \ trailer='^/\*EOF\*[/]' \
input=inclhack.def \ input=inclhack.def \
key='hackname[ ]*=[ ]*(.*);' key='hackname[ ]*=[ ]*(.*);'
...@@ -22,89 +22,7 @@ autogen definitions fixincl; ...@@ -22,89 +22,7 @@ autogen definitions fixincl;
FIXINC_DEBUG = yes; FIXINC_DEBUG = yes;
#endif #endif
/* DO NOT DO BROKEN FIXES (empty replacement fixes) */ /* == REPLACEMENT FIXES == */
/*
* This file on SunOS 4 has a very large macro. When the sed loop
* tries pull it in, it overflows the pattern space size of the SunOS
* sed (GNU sed does not have this problem). Since the file does not
* require fixing, we remove it from the fixed directory.
*/
fix = {
hackname = AAA_bad_fixes;
files = sundev/ipi_error.h;
/* shouldn't there be a select expression here??? */
replace; /* empty replacement -> no fixing the file */
};
/*
* Purge some HP-UX 11 files that are only broken after they are "fixed".
*/
fix = {
hackname = AAA_ki;
files = sys/ki.h;
select = '11.00 HP-UX LP64';
replace; /* empty replacement -> no fixing the file */
};
/*
* Purge some HP-UX 11 files that are only broken after they are "fixed".
*/
fix = {
hackname = AAA_ki_calls;
files = sys/ki_calls.h;
select = 'kthread_create_caller_t';
replace; /* empty replacement -> no fixing the file */
};
/*
* Purge some HP-UX 11 files that are only broken after they are "fixed".
*/
fix = {
hackname = AAA_ki_defs;
files = sys/ki_defs.h;
select = 'Kernel Instrumentation Definitions';
replace; /* empty replacement -> no fixing the file */
};
/*
* Purge some HP-UX 11 files that are only broken after they are "fixed".
*/
fix = {
hackname = AAA_ki_iface;
files = sys/ki_iface.h;
select = 'These definitions are for HP Internal developers';
replace; /* empty replacement -> no fixing the file */
};
/*
* Tru64 UNIX V4.0F/V5.1 <standards.h> defines _NO_PROTO and _NONSTD_TYPES
* correctly for GCC, but strict_ansi_not breaks it.
*/
fix = {
hackname = AAA_standards;
files = standards.h;
select = 'GNU and MIPS C compilers define __STDC__ differently';
replace; /* empty replacement -> no fixing the file */
};
/*
* Purge some HP-UX 11 files that are only broken after they are "fixed".
*/
fix = {
hackname = AAA_time;
files = sys/time.h;
select = '11.0 and later representation of ki time';
replace; /* empty replacement -> no fixing the file */
};
/* And now, the real fixes, replacement text fixes first: */
/* /*
* Completely replace <_int_varargs.h> with a file that includes gcc's * Completely replace <_int_varargs.h> with a file that includes gcc's
...@@ -113,69 +31,70 @@ fix = { ...@@ -113,69 +31,70 @@ fix = {
fix = { fix = {
hackname = AAB_dgux_int_varargs; hackname = AAB_dgux_int_varargs;
files = _int_varargs.h; files = _int_varargs.h;
replace = replace = <<- _EOF_
"#ifndef __INT_VARARGS_H #ifndef __INT_VARARGS_H
\#define __INT_VARARGS_H #define __INT_VARARGS_H
/************************************************************************/ /********************************************************/
/* _INT_VARARGS.H - Define the common stuff for varargs/stdarg/stdio. */ /* Define the common stuff for varargs/stdarg/stdio. */
/************************************************************************/ /********************************************************/
/*" " /*
** This file is a DG internal header. Never include this ** This file is a DG internal header. Never include this
** file directly. ** file directly.
*/ */
\#ifndef ___int_features_h #ifndef ___int_features_h
\#include <sys/_int_features.h> #include <sys/_int_features.h>
\#endif #endif
\#if !(defined(_VA_LIST) || defined(_VA_LIST_)) #if !(defined(_VA_LIST) || defined(_VA_LIST_))
\#define _VA_LIST #define _VA_LIST
\#define _VA_LIST_ #define _VA_LIST_
\#ifdef __LINT__ #ifdef __LINT__
\#ifdef __STDC__ #ifdef __STDC__
typedef void * va_list; typedef void * va_list;
\#else #else
typedef char * va_list; typedef char * va_list;
\#endif #endif
\#else #else
\#if _M88K_ANY #if _M88K_ANY
\#if defined(__DCC__) #if defined(__DCC__)
typedef struct { typedef struct {
int next_arg; int next_arg;
int *mem_ptr; int *mem_ptr;
int *reg_ptr; int *reg_ptr;
} va_list; } va_list;
\#else /* ! defined(__DCC__) */ #else /* ! defined(__DCC__) */
typedef struct { typedef struct {
int __va_arg; /* argument number */ int __va_arg; /* argument number */
int *__va_stk; /* start of args passed on stack */ int *__va_stk; /* start of args passed on stack */
int *__va_reg; /* start of args passed in regs */ int *__va_reg; /* start of args passed in regs */
} va_list; } va_list;
\#endif /* ! defined(__DCC__) */ #endif /* ! defined(__DCC__) */
\#elif _IX86_ANY #elif _IX86_ANY
\#if defined(__GNUC__) || defined(__STDC__) #if defined(__GNUC__) || defined(__STDC__)
typedef void * va_list; typedef void * va_list;
\#else #else
typedef char * va_list; typedef char * va_list;
\#endif #endif
\#endif /* _IX86_ANY */ #endif /* _IX86_ANY */
\#endif /* __LINT__ */ #endif /* __LINT__ */
\#endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */ #endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */
\#endif /* #ifndef __INT_VARARGS_H */\n"; #endif /* #ifndef __INT_VARARGS_H */
_EOF_;
}; };
...@@ -194,29 +113,28 @@ fix = { ...@@ -194,29 +113,28 @@ fix = {
* the wrapper, this will follow the #include_next chain until * the wrapper, this will follow the #include_next chain until
* we arrive at the real <asm/posix_types.h>. * we arrive at the real <asm/posix_types.h>.
*/ */
replace = replace = <<- _EOF_
/* This file fixes a bug in the __FD_ZERO macro
'/* This file fixes a bug in the __FD_ZERO macro for older versions of the Linux kernel. */
for older versions of the Linux kernel. */ #ifndef _POSIX_TYPES_H_WRAPPER
\#ifndef _POSIX_TYPES_H_WRAPPER #include <features.h>
\#include <features.h> #include_next <asm/posix_types.h>
\#include_next <asm/posix_types.h>
#if defined(__FD_ZERO) && !defined(__GLIBC__)
\#if defined(__FD_ZERO) && !defined(__GLIBC__) #undef __FD_ZERO
\#undef __FD_ZERO #define __FD_ZERO(fdsetp) \
\#define __FD_ZERO(fdsetp) \\ do { \
do { \\ int __d0, __d1; \
int __d0, __d1; \\ __asm__ __volatile__("cld ; rep ; stosl" \
__asm__ __volatile__("cld ; rep ; stosl" \\ : "=&c" (__d0), "=&D" (__d1) \
: "=&c" (__d0), "=&D" (__d1) \\ : "a" (0), "0" (__FDSET_LONGS), \
: "a" (0), "0" (__FDSET_LONGS), \\ "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
"1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \\ } while (0)
} while (0) #endif
\#endif
#define _POSIX_TYPES_H_WRAPPER
\#define _POSIX_TYPES_H_WRAPPER #endif /* _POSIX_TYPES_H_WRAPPER */
\#endif /* _POSIX_TYPES_H_WRAPPER */ _EOF_;
';
}; };
...@@ -1222,12 +1140,11 @@ fix = { ...@@ -1222,12 +1140,11 @@ fix = {
*/ */
fix = { fix = {
hackname = hpux11_size_t; hackname = hpux11_size_t;
mach = "*-hp-hpux*"; mach = "*-hp-hpux11*";
select = "^#define __size_t size_t"; select = "__size_t";
c_fix = format; c_fix = format;
c_fix_arg = "_hpux_size_t"; c_fix_arg = "_hpux_size_t";
c_fix_arg = "__size_t";
test_text = test_text =
"#define __size_t size_t\n" "#define __size_t size_t\n"
...@@ -1269,14 +1186,12 @@ fix = { ...@@ -1269,14 +1186,12 @@ fix = {
fix = { fix = {
hackname = hpux11_vsnprintf; hackname = hpux11_vsnprintf;
files = stdio.h; files = stdio.h;
select = 'extern int vsnprintf\(char \*, __size_t, const char \*,' select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, '
' __va__list\);'; 'const char \*,) __va__list\);';
c_fix = format; c_fix = format;
c_fix_arg = "extern int vsnprintf(char *, __size_t, const char *," c_fix_arg = "%1 __va_list);";
" __va_list);";
test_text = 'extern int vsnprintf(char *, __size_t, const char *,' test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,'
' __va__list);'; ' __va__list);';
}; };
...@@ -2257,12 +2172,11 @@ fix = { ...@@ -2257,12 +2172,11 @@ fix = {
"(!__STDC__" "(!__STDC__"
"|__STDC__[ \t]*==[ \t]*0" "|__STDC__[ \t]*==[ \t]*0"
"|__STDC__[ \t]*!=[ \t]*1" "|__STDC__[ \t]*!=[ \t]*1"
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0" "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)";
")(.*)";
c_test = stdc_0_in_system_headers; c_test = stdc_0_in_system_headers;
c_fix = format; c_fix = format;
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3"; c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
test_text = "#if !__STDC__ \n" test_text = "#if !__STDC__ \n"
"#if __STDC__ == 0\n" "#if __STDC__ == 0\n"
...@@ -2278,19 +2192,34 @@ fix = { ...@@ -2278,19 +2192,34 @@ fix = {
*/ */
fix = { fix = {
hackname = strict_ansi_not_ctd; hackname = strict_ansi_not_ctd;
files = math.h, limits.h, stdio.h, signal.h, stdlib.h, time.h; files = math.h, limits.h, stdio.h, signal.h,
select = "^([ \t]*[|&][|&][ \t(]*)" stdlib.h, sys/signal.h, time.h;
"(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0" /*
")(.*)"; * Starting at the beginning of a line, skip white space and
* a leading "(" or "&&" or "||". One of those must be found.
* Then, zero, one or more copies of a "defined(_FOO_BAR_) &&"
* expression. If these are nested, then they must accumulate
* because we won't match any closing parentheses. Finally,
* after skipping over all that, we must then match our suspect
* phrase: "__STDC__-0==0" with or without white space.
*/
select = "^([ \t]*" '(\(|&&|\|\|)'
"([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*"
"[ \t(]*)"
"(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)";
c_test = stdc_0_in_system_headers; c_test = stdc_0_in_system_headers;
c_fix = format; c_fix = format;
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3"; c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
test_text = "#if 1\\\n" test_text = "#if 1 && \\\\\n"
"|| __STDC__ - 0 == 0 /* not std C */\nint foo;\n#endif"; "&& defined(mumbling) |& (__STDC__ - 0 == 0) \\\\\n"
"( __STDC__ == 0 && !defined(_XOPEN_SOURCE) \\\\\n"
"|| __STDC__ - 0 == 0 ) /* not std C */\n"
"int foo;\n#endif";
}; };
/* /*
* "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1" * "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1"
* is "defined( __STRICT_ANSI__ )" * is "defined( __STRICT_ANSI__ )"
...@@ -2301,12 +2230,11 @@ fix = { ...@@ -2301,12 +2230,11 @@ fix = {
"(__STDC__[ \t]*!=[ \t]*0" "(__STDC__[ \t]*!=[ \t]*0"
"|__STDC__[ \t]*==[ \t]*1" "|__STDC__[ \t]*==[ \t]*1"
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1" "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1"
"|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0" "|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0)";
")(.*)";
c_test = stdc_0_in_system_headers; c_test = stdc_0_in_system_headers;
c_fix = format; c_fix = format;
c_fix_arg = "%1 defined(__STRICT_ANSI__)%3"; c_fix_arg = "%1 defined(__STRICT_ANSI__)";
test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif"; test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif";
}; };
......
...@@ -14,7 +14,7 @@ echo constructing ${target} for $machine to run on $build ...@@ -14,7 +14,7 @@ echo constructing ${target} for $machine to run on $build
fixincludes="${machine}" fixincludes="${machine}"
# Choose one or two-process fix methodology. Systems that cannot handle # Choose one or two-process fix methodology. Systems that cannot handle
# bi-directional pipes must use the twoprocess method. # bi-directional pipes must use the two process method.
# #
case $build in case $build in
i?86-*-msdosdjgpp* | \ i?86-*-msdosdjgpp* | \
...@@ -35,55 +35,66 @@ esac ...@@ -35,55 +35,66 @@ esac
# Check for special fix rules for particular targets # Check for special fix rules for particular targets
case $machine in case $machine in
*-*-sysv4* ) i?86-*-sysv4.2uw2* )
fixincludes=fixinc.svr4 ;;
;;
*-*-sysv4* )
i?86-*-interix* | \ fixincludes=fixinc.svr4
alpha-*-interix*) ;;
fixincludes=fixinc.interix
;; i?86-*-interix* | \
alpha-*-interix*)
i?86-*-openbsd*) fixincludes=fixinc.interix
fixincludes=fixinc.wrap ;;
;;
i?86-*-openbsd*)
alpha*-*-winnt* | \ fixincludes=fixinc.wrap
i?86-*-winnt3*) ;;
fixincludes=fixinc.winnt
;; alpha*-*-winnt* | \
i?86-*-winnt3*)
i?86-sequent-ptx* | i?86-sequent-sysv[34]*) fixincludes=fixinc.winnt
fixincludes=fixinc.ptx ;;
;;
i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
alpha*-dec-*vms* | \ fixincludes=fixinc.ptx
arm-semi-aout | armel-semi-aout | \ ;;
arm-semi-aof | armel-semi-aof | \
c*-convex-* | \ alpha*-dec-vms* | \
hppa1.1-*-osf* | \ arm-semi-aout | \
hppa1.0-*-osf* | \ armel-semi-aout | \
hppa1.1-*-bsd* | \ arm-semi-aof | \
hppa1.0-*-bsd* | \ armel-semi-aof | \
hppa*-*-lites* | \ c*-convex-* | \
i?86-moss-msdos* | i?86-*-moss* | \ hppa1.1-*-osf* | \
i?86-*-osf1* | \ hppa1.0-*-osf* | \
i?86-*-win32 | \ hppa1.1-*-bsd* | \
i?86-*-pe | i?86-*-cygwin* | \ hppa1.0-*-bsd* | \
i?86-*-mingw32* | \ hppa*-*-lites* | \
i?86-*-uwin* | \ i?86-moss-msdos* | \
mips-sgi-irix5cross64 | \ i?86-*-moss* | \
powerpc-*-eabiaix* | \ i?86-*-osf1* | \
powerpc-*-eabisim* | \ i?86-*-win32 | \
powerpc-*-eabi* | \ i?86-*-pe | \
powerpc-*-rtems* | \ i?86-*-cygwin* | \
powerpcle-*-eabisim* | \ i?86-*-mingw32* | \
powerpcle-*-eabi* | \ i?86-*-uwin* | \
powerpcle-*-winnt* | \ mips-sgi-irix5cross64 | \
powerpcle-*-pe | powerpcle-*-cygwin* | \ powerpc-*-eabiaix* | \
thumb-*-coff* | thumbel-*-coff* ) powerpc-*-eabisim* | \
fixincludes= powerpc-*-eabi* | \
;; powerpc-*-rtems* | \
powerpcle-*-eabisim* | \
powerpcle-*-eabi* | \
powerpcle-*-winnt* | \
powerpcle-*-pe | \
powerpcle-*-cygwin* | \
thumb-*-coff* | \
thumbel-*-coff* )
# Don't do any fixing.
#
fixincludes=
;;
esac esac
# IF there is no include fixing, # IF there is no include fixing,
......
...@@ -9,6 +9,11 @@ ...@@ -9,6 +9,11 @@
#if defined( HPUX10_CPP_POW_INLINE_CHECK )
#endif /* HPUX10_CPP_POW_INLINE_CHECK */
#if defined( IRIX_LIMITS_CONST_CHECK ) #if defined( IRIX_LIMITS_CONST_CHECK )
extern __const char limit; /* test limits */ extern __const char limit; /* test limits */
#endif /* IRIX_LIMITS_CONST_CHECK */ #endif /* IRIX_LIMITS_CONST_CHECK */
...@@ -35,11 +35,6 @@ extern double floor(), ceil(), fmod(), fabs _PARAMS((double)); ...@@ -35,11 +35,6 @@ extern double floor(), ceil(), fmod(), fabs _PARAMS((double));
#endif /* FIX_HEADER_BREAKAGE_CHECK */ #endif /* FIX_HEADER_BREAKAGE_CHECK */
#if defined( HPUX10_CPP_POW_INLINE_CHECK )
#endif /* HPUX10_CPP_POW_INLINE_CHECK */
#if defined( HPUX11_CPP_POW_INLINE_CHECK ) #if defined( HPUX11_CPP_POW_INLINE_CHECK )
#endif /* HPUX11_CPP_POW_INLINE_CHECK */ #endif /* HPUX11_CPP_POW_INLINE_CHECK */
...@@ -47,8 +42,10 @@ extern double floor(), ceil(), fmod(), fabs _PARAMS((double)); ...@@ -47,8 +42,10 @@ extern double floor(), ceil(), fmod(), fabs _PARAMS((double));
#if defined( HPUX11_FABSF_CHECK ) #if defined( HPUX11_FABSF_CHECK )
#ifdef _PA_RISC #ifdef _PA_RISC
#ifndef __cplusplus
# define fabsf(x) ((float)fabs((double)(float)(x))) # define fabsf(x) ((float)fabs((double)(float)(x)))
#endif #endif
#endif
#endif /* HPUX11_FABSF_CHECK */ #endif /* HPUX11_FABSF_CHECK */
...@@ -108,7 +105,10 @@ extern int class(); ...@@ -108,7 +105,10 @@ extern int class();
#if defined( STRICT_ANSI_NOT_CTD_CHECK ) #if defined( STRICT_ANSI_NOT_CTD_CHECK )
#if 1|| !defined(__STRICT_ANSI__) /* not std C */ #if 1 && \
&& defined(mumbling) |& ( !defined(__STRICT_ANSI__)) \
( !defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE) \
|| !defined(__STRICT_ANSI__) ) /* not std C */
int foo; int foo;
#endif #endif
#endif /* STRICT_ANSI_NOT_CTD_CHECK */ #endif /* STRICT_ANSI_NOT_CTD_CHECK */
......
...@@ -20,7 +20,7 @@ extern int getopt(int, char *const[], const char *); ...@@ -20,7 +20,7 @@ extern int getopt(int, char *const[], const char *);
#if defined( HPUX11_VSNPRINTF_CHECK ) #if defined( HPUX11_VSNPRINTF_CHECK )
extern int vsnprintf(char *, __size_t, const char *, __gnuc_va_list); extern int vsnprintf(char *, _hpux_size_t, const char *, __gnuc_va_list);
#endif /* HPUX11_VSNPRINTF_CHECK */ #endif /* HPUX11_VSNPRINTF_CHECK */
...@@ -75,4 +75,9 @@ extern char *tempnam( const char *, const char *); ...@@ -75,4 +75,9 @@ extern char *tempnam( const char *, const char *);
#endif /* ULTRIX_CONST2_CHECK */ #endif /* ULTRIX_CONST2_CHECK */
#if defined( UNICOSMK_RESTRICT_CHECK )
void f (char * __restrict__ x);
#endif /* UNICOSMK_RESTRICT_CHECK */
#endif /* FIXINC_STDIO_STDARG_H_CHECK */ #endif /* FIXINC_STDIO_STDARG_H_CHECK */
...@@ -36,6 +36,13 @@ extern __DJ_wint_t x; ...@@ -36,6 +36,13 @@ extern __DJ_wint_t x;
#endif /* DJGPP_WCHAR_H_CHECK */ #endif /* DJGPP_WCHAR_H_CHECK */
#if defined( HPUX11_SIZE_T_CHECK )
#define _hpux_size_t size_t
extern int getpwuid_r( char *, _hpux_size_t, struct passwd **);
#endif /* HPUX11_SIZE_T_CHECK */
#if defined( IO_QUOTES_DEF_CHECK ) #if defined( IO_QUOTES_DEF_CHECK )
#define BSD43__IOWR(n, x) ((n<<8)+x) #define BSD43__IOWR(n, x) ((n<<8)+x)
#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) #define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y)
......
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