summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2016-08-13 18:08:15 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2016-08-13 18:08:15 +0000
commitdffe3cc511f8c616fc8fc05816d865264bffbeb3 (patch)
tree7c02c9d6248a58b93c31716bbfdf76982ffd6aa4 /fixincludes
parent30c8821b37f20d584c0c11618d5d1787d44961c8 (diff)
inclhack.def (hpux_longjmp): New fix.
* inclhack.def (hpux_longjmp): New fix. * fixincl.x: Regenerate. * tests/base/setjmp.h: New test file. From-SVN: r239446
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog6
-rw-r--r--fixincludes/fixincl.x57
-rw-r--r--fixincludes/inclhack.def15
-rw-r--r--fixincludes/tests/base/setjmp.h14
4 files changed, 85 insertions, 7 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index b9430b71d4a..01488f76756 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-13 John David Anglin <danglin@gcc.gnu.org>
+
+ * inclhack.def (hpux_longjmp): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/setjmp.h: New test file.
+
2016-08-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR bootstrap/72833
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 6cd1b608b6a..5304141032f 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -1,12 +1,12 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (fixincl.x)
- *
- * It has been AutoGen-ed August 8, 2016 at 08:46:37 PM by AutoGen 5.18
+ *
+ * It has been AutoGen-ed Saturday August 13, 2016 at 02:05:44 PM EDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Aug 8 20:46:37 CEST 2016
+/* DO NOT SVN-MERGE THIS FILE, EITHER Sat 13 Aug 2016 14:05:44 EDT
*
* 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 236 fixup descriptions.
+ * This file contains 237 fixup descriptions.
*
* See README for more information.
*
@@ -5085,6 +5085,43 @@ static const char* apzHpux_Stdint_Least_FastPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Hpux_Longjmp fix
+ */
+tSCC zHpux_LongjmpName[] =
+ "hpux_longjmp";
+
+/*
+ * File name selection pattern
+ */
+tSCC zHpux_LongjmpList[] =
+ "setjmp.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzHpux_LongjmpMachs[] = {
+ "*-hp-hpux*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zHpux_LongjmpSelect0[] =
+ "^[ \t]*extern[ \t]+void.*longjmp[ \t]+__\\(\\(.*int\\)\\)";
+
+#define HPUX_LONGJMP_TEST_CT 1
+static tTestDesc aHpux_LongjmpTests[] = {
+ { TT_EGREP, zHpux_LongjmpSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Hpux_Longjmp
+ */
+static const char* apzHpux_LongjmpPatch[] = {
+ "format",
+ "%0 __attribute__ ((__noreturn__))",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Hpux_Systime fix
*/
tSCC zHpux_SystimeName[] =
@@ -9677,9 +9714,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 274
+#define REGEX_COUNT 275
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 236
+#define FIX_COUNT 237
/*
* Enumerate the fixes
@@ -9805,6 +9842,7 @@ typedef enum {
HPUX_PTHREAD_INITIALIZERS_FIXIDX,
HPUX_SPU_INFO_FIXIDX,
HPUX_STDINT_LEAST_FAST_FIXIDX,
+ HPUX_LONGJMP_FIXIDX,
HPUX_SYSTIME_FIXIDX,
HUGE_VAL_HEX_FIXIDX,
HUGE_VALF_HEX_FIXIDX,
@@ -10524,6 +10562,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_STDINT_LEAST_FAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_Stdint_Least_FastTests, apzHpux_Stdint_Least_FastPatch, 0 },
+ { zHpux_LongjmpName, zHpux_LongjmpList,
+ apzHpux_LongjmpMachs,
+ HPUX_LONGJMP_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aHpux_LongjmpTests, apzHpux_LongjmpPatch, 0 },
+
{ zHpux_SystimeName, zHpux_SystimeList,
apzHpux_SystimeMachs,
HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 2f758802831..690c5671c2e 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -2642,6 +2642,21 @@ fix = {
};
/*
+ * Add noreturn attribute to longjmp declarations in hpux <setjmp.h>
+ */
+fix = {
+ hackname = hpux_longjmp;
+ mach = "*-hp-hpux*";
+ files = setjmp.h;
+ select = "^[ \t]*extern[ \t]+void.*longjmp[ \t]+__\\(\\(.*int\\)\\)";
+
+ c_fix = format;
+ c_fix_arg = "%0 __attribute__ ((__noreturn__))";
+
+ test_text = 'extern void longjmp __((jmp_buf, int));';
+};
+
+/*
* Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
*/
fix = {
diff --git a/fixincludes/tests/base/setjmp.h b/fixincludes/tests/base/setjmp.h
new file mode 100644
index 00000000000..816ff7f15e0
--- /dev/null
+++ b/fixincludes/tests/base/setjmp.h
@@ -0,0 +1,14 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/setjmp.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( HPUX_LONGJMP_CHECK )
+extern void longjmp __((jmp_buf, int)) __attribute__ ((__noreturn__));
+#endif /* HPUX_LONGJMP_CHECK */