aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorBruce Korb <bkorb@gnu.org>2001-12-20 04:09:40 +0000
committerBruce Korb <korbb@gcc.gnu.org>2001-12-20 04:09:40 +0000
commitb5639a499ea9d3749f44bbd28328e7ff8a43010c (patch)
treea56a1573afcca0b9d7e88ad679d3abce35ba80ec /gcc/fixinc
parent871c5f6b1df9f0366aa8cbad57db9c98dd85dd06 (diff)
downloadgcc-b5639a499ea9d3749f44bbd28328e7ff8a43010c.zip
gcc-b5639a499ea9d3749f44bbd28328e7ff8a43010c.tar.gz
gcc-b5639a499ea9d3749f44bbd28328e7ff8a43010c.tar.bz2
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
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x302
-rw-r--r--gcc/fixinc/inclhack.def312
-rwxr-xr-xgcc/fixinc/mkfixinc.sh111
-rw-r--r--gcc/fixinc/tests/base/fixinc-test-limits.h5
-rw-r--r--gcc/fixinc/tests/base/math.h12
-rw-r--r--gcc/fixinc/tests/base/stdio.h7
-rw-r--r--gcc/fixinc/tests/base/testing.h7
7 files changed, 223 insertions, 533 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 1b8f23f..93eb51e 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
- * This file contains 145 fixup descriptions.
+ * This file contains 138 fixup descriptions.
*
* See README for more information.
*
@@ -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
*/
tSCC zAab_Dgux_Int_VarargsName[] =
@@ -278,9 +55,9 @@ tSCC zAab_Dgux_Int_VarargsList[] =
static const char* apzAab_Dgux_Int_VarargsPatch[] = {
"#ifndef __INT_VARARGS_H\n\
#define __INT_VARARGS_H\n\n\
-/************************************************************************/\n\
-/* _INT_VARARGS.H - Define the common stuff for varargs/stdarg/stdio. */\n\
-/************************************************************************/\n\n\
+/********************************************************/\n\
+/* Define the common stuff for varargs/stdarg/stdio. */\n\
+/********************************************************/\n\n\
/*\n\
** This file is a DG internal header. Never include this\n\
** file directly.\n\
@@ -321,7 +98,7 @@ typedef char * va_list;\n\
#endif /* _IX86_ANY */\n\n\
#endif /* __LINT__ */\n\
#endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */\n\
-#endif /* #ifndef __INT_VARARGS_H */\n",
+#endif /* #ifndef __INT_VARARGS_H */",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2081,14 +1858,14 @@ tSCC zHpux11_Size_TName[] =
* Machine/OS name selection pattern
*/
tSCC* apzHpux11_Size_TMachs[] = {
- "*-hp-hpux*",
+ "*-hp-hpux11*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux11_Size_TSelect0[] =
- "^#define __size_t size_t";
+ "__size_t";
#define HPUX11_SIZE_T_TEST_CT 1
static tTestDesc aHpux11_Size_TTests[] = {
@@ -2100,7 +1877,6 @@ static tTestDesc aHpux11_Size_TTests[] = {
static const char* apzHpux11_Size_TPatch[] = {
"format",
"_hpux_size_t",
- "__size_t",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -2159,7 +1935,7 @@ tSCC zHpux11_VsnprintfList[] =
* content selection pattern - do fix if pattern found
*/
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
static tTestDesc aHpux11_VsnprintfTests[] = {
@@ -2170,7 +1946,7 @@ static tTestDesc aHpux11_VsnprintfTests[] = {
*/
static const char* apzHpux11_VsnprintfPatch[] = {
"format",
- "extern int vsnprintf(char *, __size_t, const char *, __va_list);",
+ "%1 __va_list);",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -3985,7 +3761,7 @@ tSCC zStrict_Ansi_NotName[] =
* content selection pattern - do fix if pattern found
*/
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
@@ -4002,7 +3778,7 @@ static tTestDesc aStrict_Ansi_NotTests[] = {
*/
static const char* apzStrict_Ansi_NotPatch[] = {
"format",
- "%1 !defined(__STRICT_ANSI__)%3",
+ "%1 !defined(__STRICT_ANSI__)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -4016,7 +3792,7 @@ tSCC zStrict_Ansi_Not_CtdName[] =
* File name selection pattern
*/
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
*/
@@ -4026,7 +3802,7 @@ tSCC zStrict_Ansi_Not_CtdList[] =
* content selection pattern - do fix if pattern found
*/
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
@@ -4043,7 +3819,7 @@ static tTestDesc aStrict_Ansi_Not_CtdTests[] = {
*/
static const char* apzStrict_Ansi_Not_CtdPatch[] = {
"format",
- "%1 !defined(__STRICT_ANSI__)%3",
+ "%1 !defined(__STRICT_ANSI__)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -4066,7 +3842,7 @@ tSCC zStrict_Ansi_OnlyName[] =
* content selection pattern - do fix if pattern found
*/
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
@@ -4083,7 +3859,7 @@ static tTestDesc aStrict_Ansi_OnlyTests[] = {
*/
static const char* apzStrict_Ansi_OnlyPatch[] = {
"format",
- "%1 defined(__STRICT_ANSI__)%3",
+ "%1 defined(__STRICT_ANSI__)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -5652,21 +5428,14 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 152
+#define REGEX_COUNT 146
#define MACH_LIST_SIZE_LIMIT 279
-#define FIX_COUNT 145
+#define FIX_COUNT 138
/*
* Enumerate the fixes
*/
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_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX,
AAB_FD_ZERO_GNU_TYPES_H_FIXIDX,
@@ -5808,41 +5577,6 @@ typedef enum {
} t_fixinc_idx;
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,
apzAab_Dgux_Int_VarargsMachs,
AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index af0d3f4..4e26034 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -10,7 +10,7 @@ autogen definitions fixincl;
blocksort output=XXX \
pattern='^/\*$' \
- start='DO +NOT +DO +BROKEN +FIXES' \
+ start='== REPLACEMENT FIXES ==' \
trailer='^/\*EOF\*[/]' \
input=inclhack.def \
key='hackname[ ]*=[ ]*(.*);'
@@ -22,89 +22,7 @@ autogen definitions fixincl;
FIXINC_DEBUG = yes;
#endif
-/* DO NOT DO BROKEN FIXES (empty 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: */
+/* == REPLACEMENT FIXES == */
/*
* Completely replace <_int_varargs.h> with a file that includes gcc's
@@ -113,69 +31,70 @@ fix = {
fix = {
hackname = AAB_dgux_int_varargs;
files = _int_varargs.h;
- replace =
-"#ifndef __INT_VARARGS_H
-\#define __INT_VARARGS_H
-
-/************************************************************************/
-/* _INT_VARARGS.H - Define the common stuff for varargs/stdarg/stdio. */
-/************************************************************************/
-
-/*" "
-** This file is a DG internal header. Never include this
-** file directly.
-*/
-
-\#ifndef ___int_features_h
-\#include <sys/_int_features.h>
-\#endif
-
-\#if !(defined(_VA_LIST) || defined(_VA_LIST_))
-\#define _VA_LIST
-\#define _VA_LIST_
-
-\#ifdef __LINT__
-
-\#ifdef __STDC__
-typedef void * va_list;
-\#else
-typedef char * va_list;
-\#endif
-
-\#else
-\#if _M88K_ANY
-
-\#if defined(__DCC__)
-
-typedef struct {
- int next_arg;
- int *mem_ptr;
- int *reg_ptr;
-} va_list;
-
-\#else /* ! defined(__DCC__) */
-
-typedef struct {
- int __va_arg; /* argument number */
- int *__va_stk; /* start of args passed on stack */
- int *__va_reg; /* start of args passed in regs */
-} va_list;
-
-\#endif /* ! defined(__DCC__) */
-
-\#elif _IX86_ANY
-
-\#if defined(__GNUC__) || defined(__STDC__)
-typedef void * va_list;
-\#else
-typedef char * va_list;
-\#endif
-
-\#endif /* _IX86_ANY */
-
-\#endif /* __LINT__ */
-\#endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */
-\#endif /* #ifndef __INT_VARARGS_H */\n";
+ replace = <<- _EOF_
+ #ifndef __INT_VARARGS_H
+ #define __INT_VARARGS_H
+
+ /********************************************************/
+ /* Define the common stuff for varargs/stdarg/stdio. */
+ /********************************************************/
+
+ /*
+ ** This file is a DG internal header. Never include this
+ ** file directly.
+ */
+
+ #ifndef ___int_features_h
+ #include <sys/_int_features.h>
+ #endif
+
+ #if !(defined(_VA_LIST) || defined(_VA_LIST_))
+ #define _VA_LIST
+ #define _VA_LIST_
+
+ #ifdef __LINT__
+
+ #ifdef __STDC__
+ typedef void * va_list;
+ #else
+ typedef char * va_list;
+ #endif
+
+ #else
+ #if _M88K_ANY
+
+ #if defined(__DCC__)
+
+ typedef struct {
+ int next_arg;
+ int *mem_ptr;
+ int *reg_ptr;
+ } va_list;
+
+ #else /* ! defined(__DCC__) */
+
+ typedef struct {
+ int __va_arg; /* argument number */
+ int *__va_stk; /* start of args passed on stack */
+ int *__va_reg; /* start of args passed in regs */
+ } va_list;
+
+ #endif /* ! defined(__DCC__) */
+
+ #elif _IX86_ANY
+
+ #if defined(__GNUC__) || defined(__STDC__)
+ typedef void * va_list;
+ #else
+ typedef char * va_list;
+ #endif
+
+ #endif /* _IX86_ANY */
+
+ #endif /* __LINT__ */
+ #endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */
+ #endif /* #ifndef __INT_VARARGS_H */
+ _EOF_;
};
@@ -194,29 +113,28 @@ fix = {
* the wrapper, this will follow the #include_next chain until
* we arrive at the real <asm/posix_types.h>.
*/
- replace =
-
-'/* This file fixes a bug in the __FD_ZERO macro
- for older versions of the Linux kernel. */
-\#ifndef _POSIX_TYPES_H_WRAPPER
-\#include <features.h>
- \#include_next <asm/posix_types.h>
-
-\#if defined(__FD_ZERO) && !defined(__GLIBC__)
-\#undef __FD_ZERO
-\#define __FD_ZERO(fdsetp) \\
- do { \\
- int __d0, __d1; \\
- __asm__ __volatile__("cld ; rep ; stosl" \\
- : "=&c" (__d0), "=&D" (__d1) \\
- : "a" (0), "0" (__FDSET_LONGS), \\
- "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \\
- } while (0)
-\#endif
-
-\#define _POSIX_TYPES_H_WRAPPER
-\#endif /* _POSIX_TYPES_H_WRAPPER */
-';
+ replace = <<- _EOF_
+ /* This file fixes a bug in the __FD_ZERO macro
+ for older versions of the Linux kernel. */
+ #ifndef _POSIX_TYPES_H_WRAPPER
+ #include <features.h>
+ #include_next <asm/posix_types.h>
+
+ #if defined(__FD_ZERO) && !defined(__GLIBC__)
+ #undef __FD_ZERO
+ #define __FD_ZERO(fdsetp) \
+ do { \
+ int __d0, __d1; \
+ __asm__ __volatile__("cld ; rep ; stosl" \
+ : "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "0" (__FDSET_LONGS), \
+ "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
+ } while (0)
+ #endif
+
+ #define _POSIX_TYPES_H_WRAPPER
+ #endif /* _POSIX_TYPES_H_WRAPPER */
+ _EOF_;
};
@@ -1222,12 +1140,11 @@ fix = {
*/
fix = {
hackname = hpux11_size_t;
- mach = "*-hp-hpux*";
- select = "^#define __size_t size_t";
+ mach = "*-hp-hpux11*";
+ select = "__size_t";
c_fix = format;
c_fix_arg = "_hpux_size_t";
- c_fix_arg = "__size_t";
test_text =
"#define __size_t size_t\n"
@@ -1269,14 +1186,12 @@ fix = {
fix = {
hackname = hpux11_vsnprintf;
files = stdio.h;
- select = 'extern int vsnprintf\(char \*, __size_t, const char \*,'
- ' __va__list\);';
-
+ select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, '
+ 'const char \*,) __va__list\);';
c_fix = format;
- c_fix_arg = "extern int vsnprintf(char *, __size_t, const char *,"
- " __va_list);";
+ c_fix_arg = "%1 __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);';
};
@@ -2257,12 +2172,11 @@ fix = {
"(!__STDC__"
"|__STDC__[ \t]*==[ \t]*0"
"|__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_fix = format;
- c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
+ c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
test_text = "#if !__STDC__ \n"
"#if __STDC__ == 0\n"
@@ -2278,19 +2192,34 @@ fix = {
*/
fix = {
hackname = strict_ansi_not_ctd;
- files = math.h, limits.h, stdio.h, signal.h, stdlib.h, time.h;
- select = "^([ \t]*[|&][|&][ \t(]*)"
- "(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
- ")(.*)";
+ files = math.h, limits.h, stdio.h, signal.h,
+ stdlib.h, sys/signal.h, time.h;
+ /*
+ * 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_fix = format;
- c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
+ c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
- test_text = "#if 1\\\n"
- "|| __STDC__ - 0 == 0 /* not std C */\nint foo;\n#endif";
+ test_text = "#if 1 && \\\\\n"
+ "&& 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"
* is "defined( __STRICT_ANSI__ )"
@@ -2301,12 +2230,11 @@ fix = {
"(__STDC__[ \t]*!=[ \t]*0"
"|__STDC__[ \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_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";
};
diff --git a/gcc/fixinc/mkfixinc.sh b/gcc/fixinc/mkfixinc.sh
index 6cf269b..6a74bba 100755
--- a/gcc/fixinc/mkfixinc.sh
+++ b/gcc/fixinc/mkfixinc.sh
@@ -14,7 +14,7 @@ echo constructing ${target} for $machine to run on $build
fixincludes="${machine}"
# 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
i?86-*-msdosdjgpp* | \
@@ -35,55 +35,66 @@ esac
# Check for special fix rules for particular targets
case $machine in
- *-*-sysv4* )
- fixincludes=fixinc.svr4
- ;;
-
- i?86-*-interix* | \
- alpha-*-interix*)
- fixincludes=fixinc.interix
- ;;
-
- i?86-*-openbsd*)
- fixincludes=fixinc.wrap
- ;;
-
- alpha*-*-winnt* | \
- i?86-*-winnt3*)
- fixincludes=fixinc.winnt
- ;;
-
- i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
- fixincludes=fixinc.ptx
- ;;
-
- alpha*-dec-*vms* | \
- arm-semi-aout | armel-semi-aout | \
- arm-semi-aof | armel-semi-aof | \
- c*-convex-* | \
- hppa1.1-*-osf* | \
- hppa1.0-*-osf* | \
- hppa1.1-*-bsd* | \
- hppa1.0-*-bsd* | \
- hppa*-*-lites* | \
- i?86-moss-msdos* | i?86-*-moss* | \
- i?86-*-osf1* | \
- i?86-*-win32 | \
- i?86-*-pe | i?86-*-cygwin* | \
- i?86-*-mingw32* | \
- i?86-*-uwin* | \
- mips-sgi-irix5cross64 | \
- powerpc-*-eabiaix* | \
- powerpc-*-eabisim* | \
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
- powerpcle-*-eabi* | \
- powerpcle-*-winnt* | \
- powerpcle-*-pe | powerpcle-*-cygwin* | \
- thumb-*-coff* | thumbel-*-coff* )
- fixincludes=
- ;;
+ i?86-*-sysv4.2uw2* )
+ ;;
+
+ *-*-sysv4* )
+ fixincludes=fixinc.svr4
+ ;;
+
+ i?86-*-interix* | \
+ alpha-*-interix*)
+ fixincludes=fixinc.interix
+ ;;
+
+ i?86-*-openbsd*)
+ fixincludes=fixinc.wrap
+ ;;
+
+ alpha*-*-winnt* | \
+ i?86-*-winnt3*)
+ fixincludes=fixinc.winnt
+ ;;
+
+ i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
+ fixincludes=fixinc.ptx
+ ;;
+
+ alpha*-dec-vms* | \
+ arm-semi-aout | \
+ armel-semi-aout | \
+ arm-semi-aof | \
+ armel-semi-aof | \
+ c*-convex-* | \
+ hppa1.1-*-osf* | \
+ hppa1.0-*-osf* | \
+ hppa1.1-*-bsd* | \
+ hppa1.0-*-bsd* | \
+ hppa*-*-lites* | \
+ i?86-moss-msdos* | \
+ i?86-*-moss* | \
+ i?86-*-osf1* | \
+ i?86-*-win32 | \
+ i?86-*-pe | \
+ i?86-*-cygwin* | \
+ i?86-*-mingw32* | \
+ i?86-*-uwin* | \
+ mips-sgi-irix5cross64 | \
+ powerpc-*-eabiaix* | \
+ powerpc-*-eabisim* | \
+ 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
# IF there is no include fixing,
diff --git a/gcc/fixinc/tests/base/fixinc-test-limits.h b/gcc/fixinc/tests/base/fixinc-test-limits.h
index 36b058c..0422d09 100644
--- a/gcc/fixinc/tests/base/fixinc-test-limits.h
+++ b/gcc/fixinc/tests/base/fixinc-test-limits.h
@@ -9,6 +9,11 @@
+#if defined( HPUX10_CPP_POW_INLINE_CHECK )
+
+#endif /* HPUX10_CPP_POW_INLINE_CHECK */
+
+
#if defined( IRIX_LIMITS_CONST_CHECK )
extern __const char limit; /* test limits */
#endif /* IRIX_LIMITS_CONST_CHECK */
diff --git a/gcc/fixinc/tests/base/math.h b/gcc/fixinc/tests/base/math.h
index 0ac36c1..8cd8c22 100644
--- a/gcc/fixinc/tests/base/math.h
+++ b/gcc/fixinc/tests/base/math.h
@@ -35,11 +35,6 @@ extern double floor(), ceil(), fmod(), fabs _PARAMS((double));
#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 )
#endif /* HPUX11_CPP_POW_INLINE_CHECK */
@@ -47,8 +42,10 @@ extern double floor(), ceil(), fmod(), fabs _PARAMS((double));
#if defined( HPUX11_FABSF_CHECK )
#ifdef _PA_RISC
+#ifndef __cplusplus
# define fabsf(x) ((float)fabs((double)(float)(x)))
#endif
+#endif
#endif /* HPUX11_FABSF_CHECK */
@@ -108,7 +105,10 @@ extern int class();
#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;
#endif
#endif /* STRICT_ANSI_NOT_CTD_CHECK */
diff --git a/gcc/fixinc/tests/base/stdio.h b/gcc/fixinc/tests/base/stdio.h
index 87145ce..00d3c83 100644
--- a/gcc/fixinc/tests/base/stdio.h
+++ b/gcc/fixinc/tests/base/stdio.h
@@ -20,7 +20,7 @@ extern int getopt(int, char *const[], const char *);
#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 */
@@ -75,4 +75,9 @@ extern char *tempnam( const char *, const char *);
#endif /* ULTRIX_CONST2_CHECK */
+
+#if defined( UNICOSMK_RESTRICT_CHECK )
+void f (char * __restrict__ x);
+#endif /* UNICOSMK_RESTRICT_CHECK */
+
#endif /* FIXINC_STDIO_STDARG_H_CHECK */
diff --git a/gcc/fixinc/tests/base/testing.h b/gcc/fixinc/tests/base/testing.h
index aa7dbb1..d58d611 100644
--- a/gcc/fixinc/tests/base/testing.h
+++ b/gcc/fixinc/tests/base/testing.h
@@ -36,6 +36,13 @@ extern __DJ_wint_t x;
#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 )
#define BSD43__IOWR(n, x) ((n<<8)+x)
#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y)