summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2018-02-22 16:12:26 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2018-02-22 11:12:26 -0500
commit58730d1899b1deb723c0b13984fda1768ae73408 (patch)
treeced2104e8e7b7b50c8d87cedf7b0239bfd923427 /fixincludes
parenta11f3649d785265672d61d63d099f4a445c41c45 (diff)
inclhack.def (aix_stdlib_vec_malloc): New.
* inclhack.def (aix_stdlib_vec_malloc): New. (aix_stdlib_vec_calloc): New. * fixincl.x: Regenerate. * tests/base/stdlib.h [AIX_STDLIB_VEC_MALLOC]: New test. [AIX_STDLIB_VEC_CALLOC]: New test. From-SVN: r257902
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog8
-rw-r--r--fixincludes/fixincl.x96
-rw-r--r--fixincludes/inclhack.def20
-rw-r--r--fixincludes/tests/base/stdlib.h10
4 files changed, 129 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 1f29148e8e3..808b64aeb76 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,11 @@
+2018-02-22 David Edelsohn <dje.gcc@gmail.com>
+
+ * inclhack.def (aix_stdlib_vec_malloc): New.
+ (aix_stdlib_vec_calloc): New.
+ * fixincl.x: Regenerate.
+ * tests/base/stdlib.h [AIX_STDLIB_VEC_MALLOC]: New test.
+ [AIX_STDLIB_VEC_CALLOC]: New test.
+
2017-10-13 Mike Frysinger <vapier@chromium.org>
* fixinc.in (dirname): Change sed from 's|[^/]*/||' to
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 8d8be9c4c7d..9a2dc8b417f 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 June 8, 2017 at 10:50:04 AM by AutoGen 5.18.4
+ * It has been AutoGen-ed February 22, 2018 at 03:46:51 PM by AutoGen 5.18
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jun 8 10:50:04 CEST 2017
+/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Feb 22 15:46:51 UTC 2018
*
* 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 247 fixup descriptions.
+ * This file contains 249 fixup descriptions.
*
* See README for more information.
*
@@ -1581,6 +1581,80 @@ static const char* apzAix_Stdlib_VallocPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Aix_Stdlib_Vec_Malloc fix
+ */
+tSCC zAix_Stdlib_Vec_MallocName[] =
+ "aix_stdlib_vec_malloc";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Stdlib_Vec_MallocList[] =
+ "stdlib.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Stdlib_Vec_MallocMachs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Stdlib_Vec_MallocSelect0[] =
+ "#define[ \t]+malloc[ \t]+vec_malloc";
+
+#define AIX_STDLIB_VEC_MALLOC_TEST_CT 1
+static tTestDesc aAix_Stdlib_Vec_MallocTests[] = {
+ { TT_EGREP, zAix_Stdlib_Vec_MallocSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Stdlib_Vec_Malloc
+ */
+static const char* apzAix_Stdlib_Vec_MallocPatch[] = {
+ "format",
+ "extern void *malloc(size_t) __asm__(\"vec_malloc\");",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Aix_Stdlib_Vec_Calloc fix
+ */
+tSCC zAix_Stdlib_Vec_CallocName[] =
+ "aix_stdlib_vec_calloc";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAix_Stdlib_Vec_CallocList[] =
+ "stdlib.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAix_Stdlib_Vec_CallocMachs[] = {
+ "*-*-aix*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAix_Stdlib_Vec_CallocSelect0[] =
+ "#define[ \t]+calloc[ \t]+vec_calloc";
+
+#define AIX_STDLIB_VEC_CALLOC_TEST_CT 1
+static tTestDesc aAix_Stdlib_Vec_CallocTests[] = {
+ { TT_EGREP, zAix_Stdlib_Vec_CallocSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Aix_Stdlib_Vec_Calloc
+ */
+static const char* apzAix_Stdlib_Vec_CallocPatch[] = {
+ "format",
+ "extern void *calloc(size_t, size_t) __asm__(\"vec_calloc\");",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Aix_Strtof_Const fix
*/
tSCC zAix_Strtof_ConstName[] =
@@ -10025,9 +10099,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 285
+#define REGEX_COUNT 287
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 247
+#define FIX_COUNT 249
/*
* Enumerate the fixes
@@ -10068,6 +10142,8 @@ typedef enum {
AIX_STDLIB_REALLOC_FIXIDX,
AIX_STDLIB_CALLOC_FIXIDX,
AIX_STDLIB_VALLOC_FIXIDX,
+ AIX_STDLIB_VEC_MALLOC_FIXIDX,
+ AIX_STDLIB_VEC_CALLOC_FIXIDX,
AIX_STRTOF_CONST_FIXIDX,
AIX_SYSMACHINE_FIXIDX,
AIX_SYSWAIT_2_FIXIDX,
@@ -10458,6 +10534,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AIX_STDLIB_VALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAix_Stdlib_VallocTests, apzAix_Stdlib_VallocPatch, 0 },
+ { zAix_Stdlib_Vec_MallocName, zAix_Stdlib_Vec_MallocList,
+ apzAix_Stdlib_Vec_MallocMachs,
+ AIX_STDLIB_VEC_MALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Stdlib_Vec_MallocTests, apzAix_Stdlib_Vec_MallocPatch, 0 },
+
+ { zAix_Stdlib_Vec_CallocName, zAix_Stdlib_Vec_CallocList,
+ apzAix_Stdlib_Vec_CallocMachs,
+ AIX_STDLIB_VEC_CALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAix_Stdlib_Vec_CallocTests, apzAix_Stdlib_Vec_CallocPatch, 0 },
+
{ zAix_Strtof_ConstName, zAix_Strtof_ConstList,
apzAix_Strtof_ConstMachs,
AIX_STRTOF_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index fd0034f3aaa..77444db2333 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -838,6 +838,26 @@ fix = {
test_text = "#define valloc __linux_valloc";
};
+fix = {
+ hackname = aix_stdlib_vec_malloc;
+ mach = "*-*-aix*";
+ files = stdlib.h;
+ select = "#define[ \t]+malloc[ \t]+vec_malloc";
+ c_fix = format;
+ c_fix_arg = "extern void *malloc(size_t) __asm__(\"vec_malloc\");";
+ test_text = "#define malloc vec_malloc";
+};
+
+fix = {
+ hackname = aix_stdlib_vec_calloc;
+ mach = "*-*-aix*";
+ files = stdlib.h;
+ select = "#define[ \t]+calloc[ \t]+vec_calloc";
+ c_fix = format;
+ c_fix_arg = "extern void *calloc(size_t, size_t) __asm__(\"vec_calloc\");";
+ test_text = "#define calloc vec_calloc";
+};
+
/*
* stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
*/
diff --git a/fixincludes/tests/base/stdlib.h b/fixincludes/tests/base/stdlib.h
index cee7e5db413..99092dedd24 100644
--- a/fixincludes/tests/base/stdlib.h
+++ b/fixincludes/tests/base/stdlib.h
@@ -29,6 +29,16 @@ extern void *valloc(size_t) __asm__("__linux_valloc");
#endif /* AIX_STDLIB_VALLOC_CHECK */
+#if defined( AIX_STDLIB_VEC_MALLOC_CHECK )
+extern void *malloc(size_t) __asm__("vec_malloc");
+#endif /* AIX_STDLIB_VEC_MALLOC_CHECK */
+
+
+#if defined( AIX_STDLIB_VEC_CALLOC_CHECK )
+extern void *calloc(size_t, size_t) __asm__("vec_calloc");
+#endif /* AIX_STDLIB_VEC_CALLOC_CHECK */
+
+
#if defined( AIX_STRTOF_CONST_CHECK )
extern float strtof(const char *, char **);
#endif /* AIX_STRTOF_CONST_CHECK */