*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Monday May 3, 2004 at 05:17:48 PM MEST
+ * It has been AutoGen-ed Thursday August 12, 2004 at 05:42:28 PM MDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Mon May 3 17:17:49 MEST 2004
+/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Aug 12 17:42:28 MDT 2004
*
* You must regenerate it. Use the ./genfixes script.
*
* 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 175 fixup descriptions.
+ * This file contains 177 fixup descriptions.
*
* See README for more information.
*
# endif",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Irix___Generic1 fix
+ */
+tSCC zIrix___Generic1Name[] =
+ "irix___generic1";
+
+/*
+ * File name selection pattern
+ */
+tSCC zIrix___Generic1List[] =
+ "|internal/math_core.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzIrix___Generic1Machs[] = {
+ "mips-sgi-irix6.5",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zIrix___Generic1Select0[] =
+ "#define ([a-z]+)\\(x\\) *__generic.*";
+
+#define IRIX___GENERIC1_TEST_CT 1
+static tTestDesc aIrix___Generic1Tests[] = {
+ { TT_EGREP, zIrix___Generic1Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Irix___Generic1
+ */
+static const char* apzIrix___Generic1Patch[] = {
+ "format",
+ "extern int %1(double);\n\
+extern int %1f(float);\n\
+extern int %1l(long double);\n\
+#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n\
+ : sizeof(x) == sizeof(float) ? _%1f(x) \\\n\
+ : _%1l(x))\n",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Irix___Generic2 fix
+ */
+tSCC zIrix___Generic2Name[] =
+ "irix___generic2";
+
+/*
+ * File name selection pattern
+ */
+tSCC zIrix___Generic2List[] =
+ "|internal/math_core.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzIrix___Generic2Machs[] = {
+ "mips-sgi-irix6.5",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zIrix___Generic2Select0[] =
+ "#define ([a-z]+)\\(x,y\\) *__generic.*";
+
+#define IRIX___GENERIC2_TEST_CT 1
+static tTestDesc aIrix___Generic2Tests[] = {
+ { TT_EGREP, zIrix___Generic2Select0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Irix___Generic2
+ */
+static const char* apzIrix___Generic2Patch[] = {
+ "format",
+ "#define %1(x,y) \\\n\
+ ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n\
+ : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n\
+ : _%1l(x,y))\n",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Irix_Asm_Apostrophe fix
*
* List of all fixes
*/
-#define REGEX_COUNT 197
+#define REGEX_COUNT 199
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 175
+#define FIX_COUNT 177
/*
* Enumerate the fixes
IO_QUOTES_USE_FIXIDX,
IP_MISSING_SEMI_FIXIDX,
IRIX___RESTRICT_FIXIDX,
+ IRIX___GENERIC1_FIXIDX,
+ IRIX___GENERIC2_FIXIDX,
IRIX_ASM_APOSTROPHE_FIXIDX,
IRIX_LIMITS_CONST_FIXIDX,
IRIX_SOCKLEN_T_FIXIDX,
IRIX___RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIrix___RestrictTests, apzIrix___RestrictPatch, 0 },
+ { zIrix___Generic1Name, zIrix___Generic1List,
+ apzIrix___Generic1Machs,
+ IRIX___GENERIC1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aIrix___Generic1Tests, apzIrix___Generic1Patch, 0 },
+
+ { zIrix___Generic2Name, zIrix___Generic2List,
+ apzIrix___Generic2Machs,
+ IRIX___GENERIC2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aIrix___Generic2Tests, apzIrix___Generic2Patch, 0 },
+
{ zIrix_Asm_ApostropheName, zIrix_Asm_ApostropheList,
apzIrix_Asm_ApostropheMachs,
IRIX_ASM_APOSTROPHE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
test_text = "#ifdef __c99\n# define __restrict restrict";
};
+/*
+ * IRIX 6.5.22 <internal/math_core.h> uses the SGI c99 __generic() intrinsic
+ * to define the fpclasify, isfinite, isinf, isnan, isnormal and signbit
+ * functions.
+ *
+ * This was probably introduced around IRIX 6.5.18
+ */
+fix = {
+ hackname = irix___generic1;
+ files = internal/math_core.h;
+ mach = "mips-sgi-irix6.5";
+ select = "#define ([a-z]+)\\(x\\) *__generic.*";
+
+ c_fix = format;
+ c_fix_arg = "extern int %1(double);\n"
+ "extern int %1f(float);\n"
+ "extern int %1l(long double);\n"
+ "#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n"
+ " : sizeof(x) == sizeof(float) ? _%1f(x) \\\n"
+ " : _%1l(x))\n";
+
+ test_text =
+ "#define isnan(x) __generic(x,,, _isnan, _isnanf, _isnanl,,,)(x)\n";
+};
+
+
+/* Likewise <internal/math_core.h> on IRIX 6.5.19 and later uses the SGI
+ compiler's __generic intrinsic to define isgreater, isgreaterequal,
+ isless, islessequal, islessgreater and isunordered functions. */
+fix = {
+ hackname = irix___generic2;
+ files = internal/math_core.h;
+ mach = "mips-sgi-irix6.5";
+ select = "#define ([a-z]+)\\(x,y\\) *__generic.*";
+
+ c_fix = format;
+ c_fix_arg = "#define %1(x,y) \\\n"
+ " ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n"
+ " : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n"
+ " : _%1l(x,y))\n";
+
+ test_text =
+ "#define isless(x,y) __generic(x,y,, _isless, _islessf, _islessl,,,)(x,y)";
+};
+
+
/*
* IRIX 5.2's <sys/asm.h> contains an asm comment with a contraction
* that causes the assembly preprocessor to complain about an