public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-modules] Fix missing SCNuMAX defines in inttypes.h on hpux11.[01]*
@ 2020-01-31 17:40 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2020-01-31 17:40 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:10be08aa276916b4dc286abc269ed0a175f033dd

commit 10be08aa276916b4dc286abc269ed0a175f033dd
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Sat Jan 25 12:20:24 2020 -0500

    Fix missing SCNuMAX defines in inttypes.h on hpux11.[01]*
    
    	2020-01-25  John David Anglin  <danglin@gcc.gnu.org>
    
    	* inclhack.def (hpux_c99_inttypes4): New, add missing SCNuMAX defines.
    	* fixincl.x: Regenerate.
    	* tests/base/inttypes.h: Update for above fix.

Diff:
---
 fixincludes/ChangeLog             |  6 ++++++
 fixincludes/fixincl.x             | 45 +++++++++++++++++++++++++++++++++++----
 fixincludes/inclhack.def          | 15 +++++++++++++
 fixincludes/tests/base/inttypes.h |  9 ++++++++
 4 files changed, 71 insertions(+), 4 deletions(-)

diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index c0abf7c..c5c8582 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-25  John David Anglin  <danglin@gcc.gnu.org>
+
+	* inclhack.def (hpux_c99_inttypes4): New, add missing SCNuMAX defines.
+	* fixincl.x: Regenerate.
+	* tests/base/inttypes.h: Update for above fix.
+
 2019-12-30  John David Anglin  <danglin@gcc.gnu.org>
 
 	PR libgomp/93066
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 8b9b547..b881399 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  December 30, 2019 at 03:30:20 PM by AutoGen 5.18.16
+ * It has been AutoGen-ed  January 25, 2020 at 12:15:43 PM by AutoGen 5.18.16
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Dec 30 15:30:20 EST 2019
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jan 25 12:15:43 EST 2020
  *
  * 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 257 fixup descriptions.
+ * This file contains 258 fixup descriptions.
  *
  * See README for more information.
  *
@@ -5198,6 +5198,37 @@ static const char* apzHpux_C99_Inttypes3Patch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Hpux_C99_Inttypes4 fix
+ */
+tSCC zHpux_C99_Inttypes4Name[] =
+     "hpux_c99_inttypes4";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zHpux_C99_Inttypes4List[] =
+  "inttypes.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzHpux_C99_Inttypes4Machs[] = {
+        "hppa*-hp-hpux11.[01]*",
+        (const char*)NULL };
+#define HPUX_C99_INTTYPES4_TEST_CT  0
+#define aHpux_C99_Inttypes4Tests   (tTestDesc*)NULL
+
+/*
+ *  Fix Command Arguments for Hpux_C99_Inttypes4
+ */
+static const char* apzHpux_C99_Inttypes4Patch[] = { sed_cmd_z,
+    "-e", "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx64/a\\\n\
+#define SCNuMAX \t SCNu64\n",
+    "-e", "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx32/a\\\n\
+#define SCNuMAX \t SCNu32\n",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Hpux_Ctype_Macros fix
  */
 tSCC zHpux_Ctype_MacrosName[] =
@@ -10447,7 +10478,7 @@ static const char* apzX11_SprintfPatch[] = {
  */
 #define REGEX_COUNT          296
 #define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT            257
+#define FIX_COUNT            258
 
 /*
  *  Enumerate the fixes
@@ -10577,6 +10608,7 @@ typedef enum {
     HPUX_C99_INTTYPES_FIXIDX,
     HPUX_C99_INTTYPES2_FIXIDX,
     HPUX_C99_INTTYPES3_FIXIDX,
+    HPUX_C99_INTTYPES4_FIXIDX,
     HPUX_CTYPE_MACROS_FIXIDX,
     HPUX_EXTERN_ERRNO_FIXIDX,
     HPUX_HTONL_FIXIDX,
@@ -11333,6 +11365,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      HPUX_C99_INTTYPES3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aHpux_C99_Inttypes3Tests,   apzHpux_C99_Inttypes3Patch, 0 },
 
+  {  zHpux_C99_Inttypes4Name,    zHpux_C99_Inttypes4List,
+     apzHpux_C99_Inttypes4Machs,
+     HPUX_C99_INTTYPES4_TEST_CT, FD_MACH_ONLY,
+     aHpux_C99_Inttypes4Tests,   apzHpux_C99_Inttypes4Patch, 0 },
+
   {  zHpux_Ctype_MacrosName,    zHpux_Ctype_MacrosList,
      apzHpux_Ctype_MacrosMachs,
      HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index bf136fd..f58e777 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2614,6 +2614,21 @@ fix = {
 };
 
 /*
+ * Fix missing SCNuMAX defines in inttypes.h
+ */
+fix = {
+    hackname  = hpux_c99_inttypes4;
+    mach      = "hppa*-hp-hpux11.[01]*";
+    files     = inttypes.h;
+    sed       = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx64/a\\\n"
+		"#define SCNuMAX \t SCNu64\n";
+    sed       = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx32/a\\\n"
+		"#define SCNuMAX \t SCNu32\n";
+    test_text = "#define SCNxMAX SCNx64\n"
+		"#define SCNxMAX SCNx32\n";
+};
+
+/*
  *  Fix hpux broken ctype macros
  */
 fix = {
diff --git a/fixincludes/tests/base/inttypes.h b/fixincludes/tests/base/inttypes.h
index e221683..144ea65 100644
--- a/fixincludes/tests/base/inttypes.h
+++ b/fixincludes/tests/base/inttypes.h
@@ -33,3 +33,12 @@
 #endif
 
 #endif  /* HPUX_C99_INTTYPES3_CHECK */
+
+
+#if defined( HPUX_C99_INTTYPES4_CHECK )
+#define SCNxMAX SCNx64
+#define SCNuMAX 	 SCNu64
+#define SCNxMAX SCNx32
+#define SCNuMAX 	 SCNu32
+
+#endif  /* HPUX_C99_INTTYPES4_CHECK */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-31 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 17:40 [gcc/devel/c++-modules] Fix missing SCNuMAX defines in inttypes.h on hpux11.[01]* Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).