summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fixincludes/ChangeLog14
-rw-r--r--fixincludes/README5
-rw-r--r--fixincludes/fixincl.x142
-rw-r--r--fixincludes/inclhack.def45
-rw-r--r--fixincludes/tests/base/stdint.h20
-rw-r--r--fixincludes/tests/base/sys/_inttypes.h7
6 files changed, 70 insertions, 163 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 3a4ae1ec143..c274bead675 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,17 @@
+2009-08-28 Bruce Korb <bkorb@gnu.org>
+ Steve Ellcey <sje@cup.hp.com>
+
+ * README (files): Describe files entry.
+ * inclhack.def (hpux_stdint_least): Remove.
+ (hpux_stdint_fast): Remove.
+ (hpux_stdint_fast): Remove.
+ (hpux_stdint_least_fast): New.
+ (hpux_inttype_int_least8_t): Remove.
+ (hpux_inttype_int8_t): Modify.
+ * fixincl.x: Regenerate.
+ * tests/base/stdint.h: Update.
+ * tests/base/sys/_inttypes.h: Update.
+
2009-08-28 Steve Ellcey <sje@cup.hp.com>
* inclhack.def (hpux_imaginary_i): Remove spaces.
diff --git a/fixincludes/README b/fixincludes/README
index 50f408f9eca..e9e46546636 100644
--- a/fixincludes/README
+++ b/fixincludes/README
@@ -89,6 +89,11 @@ MAKING CHANGES TO INCLHACK.DEF
* c-test - call a function in fixtests.c. See that file.
+ * files - the "fnmatch" pattern of the file(s) to examine for
+ the issue. There may be several copies of this attribute.
+ If the header lives in a /usr/include subdirectory, be
+ sure to include that subdirectory in the name. e.g. net/if.h
+
* mach - Match the output of config.conf against a series of fnmatch
patterns. It must match at least one of the patterns, unless
"not-machine" has also been specified. In that case, the
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 0beb33b5af5..8b3422ad286 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Friday August 28, 2009 at 10:41:05 AM PDT
+ * It has been AutoGen-ed Friday August 28, 2009 at 10:55:38 AM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Aug 28 10:41:05 PDT 2009
+/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Aug 28 10:55:38 PDT 2009
*
* 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 206 fixup descriptions.
+ * This file contains 204 fixup descriptions.
*
* See README for more information.
*
@@ -4028,121 +4028,43 @@ static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z,
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Hpux_Stdint_Least fix
+ * Description of Hpux_Stdint_Least_Fast fix
*/
-tSCC zHpux_Stdint_LeastName[] =
- "hpux_stdint_least";
+tSCC zHpux_Stdint_Least_FastName[] =
+ "hpux_stdint_least_fast";
/*
* File name selection pattern
*/
-tSCC zHpux_Stdint_LeastList[] =
+tSCC zHpux_Stdint_Least_FastList[] =
"stdint.h\0";
/*
* Machine/OS name selection pattern
*/
-tSCC* apzHpux_Stdint_LeastMachs[] = {
+tSCC* apzHpux_Stdint_Least_FastMachs[] = {
"*-hp-hpux11.2*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
-tSCC zHpux_Stdint_LeastSelect0[] =
- "^[ \t]*#[ \t]*define[ \t]*UINT_LEAST64_MAX[ \t]*ULLONG_MAX";
+tSCC zHpux_Stdint_Least_FastSelect0[] =
+ "^[ \t]*#[ \t]*define[ \t]+UINT_(LEAST|FAST)64_MAX[ \t]+ULLONG_MAX";
-#define HPUX_STDINT_LEAST_TEST_CT 1
-static tTestDesc aHpux_Stdint_LeastTests[] = {
- { TT_EGREP, zHpux_Stdint_LeastSelect0, (regex_t*)NULL }, };
+#define HPUX_STDINT_LEAST_FAST_TEST_CT 1
+static tTestDesc aHpux_Stdint_Least_FastTests[] = {
+ { TT_EGREP, zHpux_Stdint_Least_FastSelect0, (regex_t*)NULL }, };
/*
- * Fix Command Arguments for Hpux_Stdint_Least
+ * Fix Command Arguments for Hpux_Stdint_Least_Fast
*/
-static const char* apzHpux_Stdint_LeastPatch[] = {
+static const char* apzHpux_Stdint_Least_FastPatch[] = {
"format",
"#ifdef __LP64__\n\
-# define\tUINT_LEAST64_MAX\tULONG_MAX\n\
+# define\tUINT_%164_MAX\tULONG_MAX\n\
#else\n\
%0\n\
-#endif\n",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description of Hpux_Stdint_Fast fix
- */
-tSCC zHpux_Stdint_FastName[] =
- "hpux_stdint_fast";
-
-/*
- * File name selection pattern
- */
-tSCC zHpux_Stdint_FastList[] =
- "stdint.h\0";
-/*
- * Machine/OS name selection pattern
- */
-tSCC* apzHpux_Stdint_FastMachs[] = {
- "*-hp-hpux11.2*",
- (const char*)NULL };
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zHpux_Stdint_FastSelect0[] =
- "^[ \t]*#[ \t]*define[ \t]*UINT_FAST64_MAX[ \t]*ULLONG_MAX";
-
-#define HPUX_STDINT_FAST_TEST_CT 1
-static tTestDesc aHpux_Stdint_FastTests[] = {
- { TT_EGREP, zHpux_Stdint_FastSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Hpux_Stdint_Fast
- */
-static const char* apzHpux_Stdint_FastPatch[] = {
- "format",
- "#ifdef __LP64__\n\
-# define\tUINT_FAST64_MAX\t\tULONG_MAX\n\
-#else\n\
-%0\n\
-#endif\n",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description of Hpux_Inttype_Int_Least8_T fix
- */
-tSCC zHpux_Inttype_Int_Least8_TName[] =
- "hpux_inttype_int_least8_t";
-
-/*
- * File name selection pattern
- */
-tSCC zHpux_Inttype_Int_Least8_TList[] =
- "sys/_inttypes.h\0";
-/*
- * Machine/OS name selection pattern
- */
-tSCC* apzHpux_Inttype_Int_Least8_TMachs[] = {
- "*-hp-hpux1[01].*",
- (const char*)NULL };
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zHpux_Inttype_Int_Least8_TSelect0[] =
- "^[ \t]*typedef[ \t]*char[ \t]*int_least8_t.*";
-
-#define HPUX_INTTYPE_INT_LEAST8_T_TEST_CT 1
-static tTestDesc aHpux_Inttype_Int_Least8_TTests[] = {
- { TT_EGREP, zHpux_Inttype_Int_Least8_TSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Hpux_Inttype_Int_Least8_T
- */
-static const char* apzHpux_Inttype_Int_Least8_TPatch[] = {
- "format",
- "typedef signed char int_least8_t;",
+#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -4168,7 +4090,7 @@ tSCC* apzHpux_Inttype_Int8_TMachs[] = {
* content selection pattern - do fix if pattern found
*/
tSCC zHpux_Inttype_Int8_TSelect0[] =
- "^[ \t]*typedef[ \t]*char[ \t]*int8_t.*";
+ "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*";
#define HPUX_INTTYPE_INT8_T_TEST_CT 1
static tTestDesc aHpux_Inttype_Int8_TTests[] = {
@@ -4179,7 +4101,7 @@ static tTestDesc aHpux_Inttype_Int8_TTests[] = {
*/
static const char* apzHpux_Inttype_Int8_TPatch[] = {
"format",
- "typedef signed char int8_t;",
+ "typedef signed char int%18_t;",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -8380,9 +8302,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 249
+#define REGEX_COUNT 247
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 206
+#define FIX_COUNT 204
/*
* Enumerate the fixes
@@ -8485,9 +8407,7 @@ typedef enum {
HPUX_C99_INTPTR_FIXIDX,
HPUX_C99_INTTYPES_FIXIDX,
HPUX_C99_INTTYPES2_FIXIDX,
- HPUX_STDINT_LEAST_FIXIDX,
- HPUX_STDINT_FAST_FIXIDX,
- HPUX_INTTYPE_INT_LEAST8_T_FIXIDX,
+ HPUX_STDINT_LEAST_FAST_FIXIDX,
HPUX_INTTYPE_INT8_T_FIXIDX,
HPUX_IMAGINARY_I_FIXIDX,
HUGE_VAL_HEX_FIXIDX,
@@ -9082,20 +9002,10 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY,
aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 },
- { zHpux_Stdint_LeastName, zHpux_Stdint_LeastList,
- apzHpux_Stdint_LeastMachs,
- HPUX_STDINT_LEAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aHpux_Stdint_LeastTests, apzHpux_Stdint_LeastPatch, 0 },
-
- { zHpux_Stdint_FastName, zHpux_Stdint_FastList,
- apzHpux_Stdint_FastMachs,
- HPUX_STDINT_FAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aHpux_Stdint_FastTests, apzHpux_Stdint_FastPatch, 0 },
-
- { zHpux_Inttype_Int_Least8_TName, zHpux_Inttype_Int_Least8_TList,
- apzHpux_Inttype_Int_Least8_TMachs,
- HPUX_INTTYPE_INT_LEAST8_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aHpux_Inttype_Int_Least8_TTests, apzHpux_Inttype_Int_Least8_TPatch, 0 },
+ { zHpux_Stdint_Least_FastName, zHpux_Stdint_Least_FastList,
+ apzHpux_Stdint_Least_FastMachs,
+ HPUX_STDINT_LEAST_FAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aHpux_Stdint_Least_FastTests, apzHpux_Stdint_Least_FastPatch, 0 },
{ zHpux_Inttype_Int8_TName, zHpux_Inttype_Int8_TList,
apzHpux_Inttype_Int8_TMachs,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index c43ac852c47..f118260f2ca 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2190,43 +2190,34 @@ fix = {
};
fix = {
- hackname = hpux_stdint_least;
+ hackname = hpux_stdint_least_fast;
mach = "*-hp-hpux11.2*";
files = stdint.h;
- select = "^[ \t]*#[ \t]*define[ \t]*UINT_LEAST64_MAX[ \t]*ULLONG_MAX";
- c_fix = format;
- c_fix_arg = "#ifdef __LP64__\n# define UINT_LEAST64_MAX ULONG_MAX\n#else\n%0\n#endif\n";
- test_text ="# define UINT_LEAST64_MAX ULLONG_MAX\n";
-};
-
-fix = {
- hackname = hpux_stdint_fast;
- mach = "*-hp-hpux11.2*";
- files = stdint.h;
- select = "^[ \t]*#[ \t]*define[ \t]*UINT_FAST64_MAX[ \t]*ULLONG_MAX";
- c_fix = format;
- c_fix_arg = "#ifdef __LP64__\n# define UINT_FAST64_MAX ULONG_MAX\n#else\n%0\n#endif\n";
- test_text ="# define UINT_FAST64_MAX ULLONG_MAX\n";
-};
-
-fix = {
- hackname = hpux_inttype_int_least8_t;
- mach = "*-hp-hpux1[01].*";
- files = sys/_inttypes.h;
- select = "^[ \t]*typedef[ \t]*char[ \t]*int_least8_t.*";
+ select =
+ "^[ \t]*#[ \t]*define[ \t]+UINT_(LEAST|FAST)64_MAX[ \t]+ULLONG_MAX";
c_fix = format;
- c_fix_arg = "typedef signed char int_least8_t;";
- test_text ="typedef char int_least8_t;\n";
+ c-fix-arg = <<- _EOFix_
+ #ifdef __LP64__
+ # define UINT_%164_MAX ULONG_MAX
+ #else
+ %0
+ #endif
+ _EOFix_;
+ test-text = <<- _EOFix_
+ # define UINT_FAST64_MAX ULLONG_MAX
+ # define UINT_LEAST64_MAX ULLONG_MAX
+ _EOFix_;
};
fix = {
hackname = hpux_inttype_int8_t;
mach = "*-hp-hpux1[01].*";
files = sys/_inttypes.h;
- select = "^[ \t]*typedef[ \t]*char[ \t]*int8_t.*";
+ select = "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*";
c_fix = format;
- c_fix_arg = "typedef signed char int8_t;";
- test_text ="typedef char int8_t;\n";
+ c_fix_arg = "typedef signed char int%18_t;";
+ test_text = "typedef char int_least8_t;\n"
+ "typedef char int8_t;\n";
};
fix = {
diff --git a/fixincludes/tests/base/stdint.h b/fixincludes/tests/base/stdint.h
index 8be61a9718d..1c59442182f 100644
--- a/fixincludes/tests/base/stdint.h
+++ b/fixincludes/tests/base/stdint.h
@@ -145,26 +145,18 @@
#endif /* HPUX_C99_INTTYPES2_CHECK */
-#if defined( HPUX_STDINT_LEAST_CHECK )
+#if defined( HPUX_STDINT_LEAST_FAST_CHECK )
#ifdef __LP64__
-# define UINT_LEAST64_MAX ULONG_MAX
+# define UINT_FAST64_MAX ULONG_MAX
#else
-# define UINT_LEAST64_MAX ULLONG_MAX
+# define UINT_FAST64_MAX ULLONG_MAX
#endif
-
-
-#endif /* HPUX_STDINT_LEAST_CHECK */
-
-
-#if defined( HPUX_STDINT_FAST_CHECK )
#ifdef __LP64__
-# define UINT_FAST64_MAX ULONG_MAX
+# define UINT_LEAST64_MAX ULONG_MAX
#else
-# define UINT_FAST64_MAX ULLONG_MAX
+# define UINT_LEAST64_MAX ULLONG_MAX
#endif
-
-
-#endif /* HPUX_STDINT_FAST_CHECK */
+#endif /* HPUX_STDINT_LEAST_FAST_CHECK */
#if defined( IRIX_STDINT_C99_CHECK )
diff --git a/fixincludes/tests/base/sys/_inttypes.h b/fixincludes/tests/base/sys/_inttypes.h
index 6773ab834c9..dab8961f605 100644
--- a/fixincludes/tests/base/sys/_inttypes.h
+++ b/fixincludes/tests/base/sys/_inttypes.h
@@ -9,13 +9,8 @@
-#if defined( HPUX_INTTYPE_INT_LEAST8_T_CHECK )
-typedef signed char int_least8_t;
-
-#endif /* HPUX_INTTYPE_INT_LEAST8_T_CHECK */
-
-
#if defined( HPUX_INTTYPE_INT8_T_CHECK )
+typedef signed char int_least8_t;
typedef signed char int8_t;
#endif /* HPUX_INTTYPE_INT8_T_CHECK */
OpenPOWER on IntegriCloud