]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/68741 (FAIL: tr1/8_c_compatibility/cstdio/functions.cc (test for excess...
authorJohn David Anglin <danglin@gcc.gnu.org>
Mon, 1 Feb 2016 20:27:47 +0000 (20:27 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 1 Feb 2016 20:27:47 +0000 (20:27 +0000)
PR target/68741
* inclhack.def (hpux_vsscanf): New fix.
* fixincl.x: Regenerated.
* tests/base/stdio.h [HPUX_VSSCANF_CHECK]: New test.

From-SVN: r233049

fixincludes/ChangeLog
fixincludes/fixincl.x
fixincludes/inclhack.def
fixincludes/tests/base/stdio.h

index f98e3694a98ace6b4bb5b266d8dfe62bc9d32f65..f9da55d4cfd839aa51a46eed9ef19ccf993f604a 100644 (file)
@@ -1,3 +1,10 @@
+2016-02-01  John David Anglin  <danglin@gcc.gnu.org>
+
+       PR target/68741
+       * inclhack.def (hpux_vsscanf): New fix.
+       * fixincl.x: Regenerated.
+       * tests/base/stdio.h [HPUX_VSSCANF_CHECK]: New test.
+
 2015-06-26  Release Manager
 
        * GCC 4.9.3 released.
index 10b4061f30a48934d9c2d9f93af47f53e39a88c0..88a0f3f125f8402e366ee3d968e8c8411b945f7f 100644 (file)
@@ -1,12 +1,12 @@
 /*  -*- buffer-read-only: t -*- vi: set ro:
- *
+ * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
- *
- * It has been AutoGen-ed  December  8, 2013 at 12:24:14 PM by AutoGen 5.18.2
+ * 
+ * It has been AutoGen-ed  Monday February  1, 2016 at 03:26:15 PM EST
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Dec  8 12:24:14 PST 2013
+/* DO NOT SVN-MERGE THIS FILE, EITHER Mon  1 Feb 2016 15:26:15 EST
  *
  * 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 229 fixup descriptions.
+ * This file contains 230 fixup descriptions.
  *
  * See README for more information.
  *
@@ -4117,6 +4117,43 @@ static const char* apzHpux11_VsnprintfPatch[] = {
     "%1 __va_list);",
     (char*)NULL };
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Hpux_Vsscanf fix
+ */
+tSCC zHpux_VsscanfName[] =
+     "hpux_vsscanf";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zHpux_VsscanfList[] =
+  "stdio.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzHpux_VsscanfMachs[] = {
+        "*-*-hpux*",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zHpux_VsscanfSelect0[] =
+       "(extern int vsscanf\\()char";
+
+#define    HPUX_VSSCANF_TEST_CT  1
+static tTestDesc aHpux_VsscanfTests[] = {
+  { TT_EGREP,    zHpux_VsscanfSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Hpux_Vsscanf
+ */
+static const char* apzHpux_VsscanfPatch[] = {
+    "format",
+    "%1const char",
+    (char*)NULL };
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Hpux8_Bogus_Inlines fix
@@ -9403,9 +9440,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          268
+#define REGEX_COUNT          269
 #define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT            229
+#define FIX_COUNT            230
 
 /*
  *  Enumerate the fixes
@@ -9506,6 +9543,7 @@ typedef enum {
     HPUX11_SIZE_T_FIXIDX,
     HPUX11_SNPRINTF_FIXIDX,
     HPUX11_VSNPRINTF_FIXIDX,
+    HPUX_VSSCANF_FIXIDX,
     HPUX8_BOGUS_INLINES_FIXIDX,
     HPUX_C99_INTPTR_FIXIDX,
     HPUX_C99_INTTYPES_FIXIDX,
@@ -10118,6 +10156,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      HPUX11_VSNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aHpux11_VsnprintfTests,   apzHpux11_VsnprintfPatch, 0 },
 
+  {  zHpux_VsscanfName,    zHpux_VsscanfList,
+     apzHpux_VsscanfMachs,
+     HPUX_VSSCANF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aHpux_VsscanfTests,   apzHpux_VsscanfPatch, 0 },
+
   {  zHpux8_Bogus_InlinesName,    zHpux8_Bogus_InlinesList,
      apzHpux8_Bogus_InlinesMachs,
      HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY,
index 411300fb2e0f9015cc09b6ee5be5b4d3c6acfc70..fc45a4c80a91ba7ab049ade3899b2e1546fc6dd1 100644 (file)
@@ -2185,6 +2185,20 @@ fix = {
                                      ' __va__list);';
 };
 
+/*
+ *  Fix missing const in hpux vsscanf declaration
+ */
+fix = {
+    hackname = hpux_vsscanf;
+    mach    = "*-*-hpux*";
+    files   = stdio.h;
+    select  = '(extern int vsscanf\()char';
+    c_fix   = format;
+    c_fix_arg = "%1const char";
+
+    test_text = 'extern int vsscanf(char *, const char *, __va_list);';
+};
+
 /*
  *  get rid of bogus inline definitions in HP-UX 8.0
  */
index 975d0a52168d2d02243c20824c9ab4837fb733ef..e2cbe5defe3aa47a1d8704540f1b0f31912fef87 100644 (file)
@@ -49,6 +49,11 @@ extern int vsnprintf(char *, _hpux_size_t, const char *, __gnuc_va_list);
 #endif  /* HPUX11_VSNPRINTF_CHECK */
 
 
+#if defined( HPUX_VSSCANF_CHECK )
+extern int vsscanf(const char *, const char *, __gnuc_va_list);
+#endif  /* HPUX_VSSCANF_CHECK */
+
+
 #if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
 extern int printf( const char *, __gnuc_va_list );
 #endif  /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */