*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Tuesday December 23, 2003 at 01:59:31 PM MET
+ * It has been AutoGen-ed Tuesday January 20, 2004 at 03:43:24 PM PST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Dec 23 13:59:32 MET 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Jan 20 15:43:24 PST 2004
*
* You must regenerate it. Use the ./genfixes script.
*
"ecd_cursor",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Exception_Structure fix
+ */
+tSCC zException_StructureName[] =
+ "exception_structure";
+
+/*
+ * File name selection pattern
+ */
+tSCC zException_StructureList[] =
+ "|math.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzException_StructureMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zException_StructureSelect0[] =
+ "matherr";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zException_StructureBypass0[] =
+ "matherr.*(struct exception|__MATH_EXCEPTION)";
+
+#define EXCEPTION_STRUCTURE_TEST_CT 2
+static tTestDesc aException_StructureTests[] = {
+ { TT_NEGREP, zException_StructureBypass0, (regex_t*)NULL },
+ { TT_EGREP, zException_StructureSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Exception_Structure
+ */
+static const char* apzException_StructurePatch[] = {
+ "wrap",
+ "struct exception;\n",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Freebsd_Gcc3_Breakage fix
* content bypass pattern - skip fix if pattern found
*/
tSCC zMath_ExceptionBypass0[] =
- "__cplusplus";
+ "We have a problem when using C\\+\\+";
#define MATH_EXCEPTION_TEST_CT 2
static tTestDesc aMath_ExceptionTests[] = {
#endif",
(char*)NULL };
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Description of Sunos_Matherr_Decl fix
- */
-tSCC zSunos_Matherr_DeclName[] =
- "sunos_matherr_decl";
-
-/*
- * File name selection pattern
- */
-tSCC zSunos_Matherr_DeclList[] =
- "|math.h|";
-/*
- * Machine/OS name selection pattern
- */
-#define apzSunos_Matherr_DeclMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zSunos_Matherr_DeclSelect0[] =
- "matherr";
-
-/*
- * content bypass pattern - skip fix if pattern found
- */
-tSCC zSunos_Matherr_DeclBypass0[] =
- "matherr.*(struct exception|__MATH_EXCEPTION)";
-
-#define SUNOS_MATHERR_DECL_TEST_CT 2
-static tTestDesc aSunos_Matherr_DeclTests[] = {
- { TT_NEGREP, zSunos_Matherr_DeclBypass0, (regex_t*)NULL },
- { TT_EGREP, zSunos_Matherr_DeclSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Sunos_Matherr_Decl
- */
-static const char* apzSunos_Matherr_DeclPatch[] = {
- "wrap",
- "struct exception;\n",
- (char*)NULL };
-
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sunos_Strlen fix
DEC_INTERN_ASM_FIXIDX,
DJGPP_WCHAR_H_FIXIDX,
ECD_CURSOR_FIXIDX,
+ EXCEPTION_STRUCTURE_FIXIDX,
FREEBSD_GCC3_BREAKAGE_FIXIDX,
GNU_TYPES_FIXIDX,
HP_INLINE_FIXIDX,
SUN_MALLOC_FIXIDX,
SUN_RUSERS_SEMI_FIXIDX,
SUN_SIGNAL_FIXIDX,
- SUNOS_MATHERR_DECL_FIXIDX,
SUNOS_STRLEN_FIXIDX,
SVR4__P_FIXIDX,
SVR4_DISABLE_OPT_FIXIDX,
ECD_CURSOR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aEcd_CursorTests, apzEcd_CursorPatch, 0 },
+ { zException_StructureName, zException_StructureList,
+ apzException_StructureMachs,
+ EXCEPTION_STRUCTURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aException_StructureTests, apzException_StructurePatch, 0 },
+
{ zFreebsd_Gcc3_BreakageName, zFreebsd_Gcc3_BreakageList,
apzFreebsd_Gcc3_BreakageMachs,
FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
SUN_SIGNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSun_SignalTests, apzSun_SignalPatch, 0 },
- { zSunos_Matherr_DeclName, zSunos_Matherr_DeclList,
- apzSunos_Matherr_DeclMachs,
- SUNOS_MATHERR_DECL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
- aSunos_Matherr_DeclTests, apzSunos_Matherr_DeclPatch, 0 },
-
{ zSunos_StrlenName, zSunos_StrlenList,
apzSunos_StrlenMachs,
SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
};
+/*
+ * math.h on SunOS 4 puts the declaration of matherr before the definition
+ * of struct exception, so the prototype (added by fixproto) causes havoc.
+ * This must appear before the math_exception fix.
+ */
+fix = {
+ hackname = exception_structure;
+ files = math.h;
+
+ /* If matherr has a prototype already, the header needs no fix. */
+ bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)';
+ select = matherr;
+
+ c_fix = wrap;
+ c_fix_arg = "struct exception;\n";
+
+ test_text = "extern int matherr();";
+};
+
+
/*
* Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
* neither the existence of GCC 3 nor its exact feature set yet break
/*
* Some math.h files define struct exception (it's in the System V
- * Interface Definition), which conflicts with
- * the class exception defined in the C++ file std/stdexcept.h. We
- * redefine it to __math_exception. This is not a great fix, but I
- * haven't been able to think of anything better.
- * Note that we have to put the #ifdef/#endif blocks at beginning
+ * Interface Definition), which conflicts with the class exception defined
+ * in the C++ file std/stdexcept.h. We redefine it to __math_exception.
+ * This is not a great fix, but I haven't been able to think of anything
+ * better. Note that we have to put the #ifdef/#endif blocks at beginning
* and end of file, because fixproto runs after us and may insert
* additional references to struct exception.
*/
hackname = math_exception;
files = math.h;
select = "struct exception";
- bypass = '__cplusplus';
+ /*
+ * This should be bypassed on __cplusplus, but some supposedly C++ C++
+ * aware headers, such as Solaris 8 and 9, don't wrap their struct
+ * exception either. So currently we bypass only for glibc, based on a
+ * comment in the fixed glibc header. Ick.
+ */
+ bypass = 'We have a problem when using C\+\+';
c_fix = wrap;
c_fix_arg = "#ifdef __cplusplus\n"
};
-/*
- * math.h on SunOS 4 puts the declaration of matherr before the definition
- * of struct exception, so the prototype (added by fixproto) causes havoc.
- */
-fix = {
- hackname = sunos_matherr_decl;
- files = math.h;
-
- /* If matherr has a prototype already, the header needs no fix. */
- bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)';
- select = matherr;
-
- c_fix = wrap;
- c_fix_arg = "struct exception;\n";
-
- test_text = "extern int matherr();";
-};
-
-
/*
* Correct the return type for strlen in strings.h in SunOS 4.
*/