*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Saturday July 23, 2011 at 01:16:35 AM MEST
+ * It has been AutoGen-ed Tuesday August 9, 2011 at 09:17:43 PM MEST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 23 01:16:35 MEST 2011
+/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Aug 9 21:17:43 MEST 2011
*
* 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 212 fixup descriptions.
+ * This file contains 217 fixup descriptions.
*
* See README for more information.
*
"^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+\\{.*0)(\\},[ \t]*0\\}.*)$",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Solaris_Cxx_Linkage fix
+ */
+tSCC zSolaris_Cxx_LinkageName[] =
+ "solaris_cxx_linkage";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Cxx_LinkageList[] =
+ "iso/stdlib_iso.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Cxx_LinkageMachs[] = {
+ "*-*-solaris2*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Cxx_LinkageSelect0[] =
+ "(#if __cplusplus >= 199711L)\n\
+(extern \"C\\+\\+\" \\{\n\
+)(.*(bsearch|qsort).*)";
+
+#define SOLARIS_CXX_LINKAGE_TEST_CT 1
+static tTestDesc aSolaris_Cxx_LinkageTests[] = {
+ { TT_EGREP, zSolaris_Cxx_LinkageSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Cxx_Linkage
+ */
+static const char* apzSolaris_Cxx_LinkagePatch[] = {
+ "format",
+ "%1 && !__GNUG__\n\
+%2%3",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Solaris_Getc_Strict_Stdc fix
+ */
+tSCC zSolaris_Getc_Strict_StdcName[] =
+ "solaris_getc_strict_stdc";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Getc_Strict_StdcList[] =
+ "iso/stdio_iso.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Getc_Strict_StdcMachs[] = {
+ "*-*-solaris2*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Getc_Strict_StdcSelect0[] =
+ "(.*&& )!defined\\(_STRICT_STDC\\)(.*)";
+
+#define SOLARIS_GETC_STRICT_STDC_TEST_CT 1
+static tTestDesc aSolaris_Getc_Strict_StdcTests[] = {
+ { TT_EGREP, zSolaris_Getc_Strict_StdcSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Getc_Strict_Stdc
+ */
+static const char* apzSolaris_Getc_Strict_StdcPatch[] = {
+ "format",
+ "%1(!defined(_STRICT_STDC) || (__cplusplus >= 199711L))%2",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Solaris_Longjmp_Noreturn fix
+ */
+tSCC zSolaris_Longjmp_NoreturnName[] =
+ "solaris_longjmp_noreturn";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Longjmp_NoreturnList[] =
+ "iso/setjmp_iso.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Longjmp_NoreturnMachs[] = {
+ "*-*-solaris2*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Longjmp_NoreturnSelect0[] =
+ "(.*longjmp\\(jmp_buf.*[^)]+\\));";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zSolaris_Longjmp_NoreturnBypass0[] =
+ "__NORETURN";
+
+#define SOLARIS_LONGJMP_NORETURN_TEST_CT 2
+static tTestDesc aSolaris_Longjmp_NoreturnTests[] = {
+ { TT_NEGREP, zSolaris_Longjmp_NoreturnBypass0, (regex_t*)NULL },
+ { TT_EGREP, zSolaris_Longjmp_NoreturnSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Longjmp_Noreturn
+ */
+static const char* apzSolaris_Longjmp_NoreturnPatch[] = {
+ "format",
+ "%1 __attribute__ ((__noreturn__));",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Math_1 fix
[ \t]*)\\{.*),[ \t]*0\\}(|[ \t].*)$",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Solaris_Pow_Int_Overload fix
+ */
+tSCC zSolaris_Pow_Int_OverloadName[] =
+ "solaris_pow_int_overload";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Pow_Int_OverloadList[] =
+ "iso/math_iso.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Pow_Int_OverloadMachs[] = {
+ "*-*-solaris2*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Pow_Int_OverloadSelect0[] =
+ "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\) *\\{[^{}]*\n\
+[^{}]*\\}";
+
+#define SOLARIS_POW_INT_OVERLOAD_TEST_CT 1
+static tTestDesc aSolaris_Pow_Int_OverloadTests[] = {
+ { TT_EGREP, zSolaris_Pow_Int_OverloadSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Pow_Int_Overload
+ */
+static const char* apzSolaris_Pow_Int_OverloadPatch[] = {
+ "format",
+ "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n\
+%0\n\
+#endif",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Rwlock_Init_1 fix
"%1*_RESTRICT_KYWD %2%3",
(char*)NULL };
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Description of Solaris_Std___Filbuf fix
+ */
+tSCC zSolaris_Std___FilbufName[] =
+ "solaris_std___filbuf";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Std___FilbufList[] =
+ "stdio.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Std___FilbufMachs[] = {
+ "*-*-solaris2*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Std___FilbufSelect0[] =
+ "(using std::perror;\n\
+)(#endif)";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zSolaris_Std___FilbufBypass0[] =
+ "using std::__filbuf";
+
+#define SOLARIS_STD___FILBUF_TEST_CT 2
+static tTestDesc aSolaris_Std___FilbufTests[] = {
+ { TT_NEGREP, zSolaris_Std___FilbufBypass0, (regex_t*)NULL },
+ { TT_EGREP, zSolaris_Std___FilbufSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Std___Filbuf
+ */
+static const char* apzSolaris_Std___FilbufPatch[] = {
+ "format",
+ "%1#ifndef _LP64\n\
+using std::__filbuf;\n\
+using std::__flsbuf;\n\
+#endif\n\
+%2",
+ (char*)NULL };
+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris_Stdio_Tag fix
*
* List of all fixes
*/
-#define REGEX_COUNT 251
+#define REGEX_COUNT 258
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 212
+#define FIX_COUNT 217
/*
* Enumerate the fixes
SOLARIS_COMPLEX_FIXIDX,
SOLARIS_COMPLEX_CXX_FIXIDX,
SOLARIS_COND_INIT_FIXIDX,
+ SOLARIS_CXX_LINKAGE_FIXIDX,
+ SOLARIS_GETC_STRICT_STDC_FIXIDX,
+ SOLARIS_LONGJMP_NORETURN_FIXIDX,
SOLARIS_MATH_1_FIXIDX,
SOLARIS_MATH_2_FIXIDX,
SOLARIS_MATH_3_FIXIDX,
SOLARIS_MATH_9_FIXIDX,
SOLARIS_MATH_10_FIXIDX,
SOLARIS_MUTEX_INIT_2_FIXIDX,
+ SOLARIS_POW_INT_OVERLOAD_FIXIDX,
SOLARIS_RWLOCK_INIT_1_FIXIDX,
SOLARIS_ONCE_INIT_1_FIXIDX,
SOLARIS_ONCE_INIT_2_FIXIDX,
SOLARIS_INT_LIMITS_3_FIXIDX,
SOLARIS_INT_TYPES_FIXIDX,
SOLARIS_POSIX_SPAWN_RESTRICT_FIXIDX,
+ SOLARIS_STD___FILBUF_FIXIDX,
SOLARIS_STDIO_TAG_FIXIDX,
SOLARIS_SYS_VA_LIST_FIXIDX,
STATSSWTCH_FIXIDX,
SOLARIS_COND_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Cond_InitTests, apzSolaris_Cond_InitPatch, 0 },
+ { zSolaris_Cxx_LinkageName, zSolaris_Cxx_LinkageList,
+ apzSolaris_Cxx_LinkageMachs,
+ SOLARIS_CXX_LINKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Cxx_LinkageTests, apzSolaris_Cxx_LinkagePatch, 0 },
+
+ { zSolaris_Getc_Strict_StdcName, zSolaris_Getc_Strict_StdcList,
+ apzSolaris_Getc_Strict_StdcMachs,
+ SOLARIS_GETC_STRICT_STDC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Getc_Strict_StdcTests, apzSolaris_Getc_Strict_StdcPatch, 0 },
+
+ { zSolaris_Longjmp_NoreturnName, zSolaris_Longjmp_NoreturnList,
+ apzSolaris_Longjmp_NoreturnMachs,
+ SOLARIS_LONGJMP_NORETURN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Longjmp_NoreturnTests, apzSolaris_Longjmp_NoreturnPatch, 0 },
+
{ zSolaris_Math_1Name, zSolaris_Math_1List,
apzSolaris_Math_1Machs,
SOLARIS_MATH_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
SOLARIS_MUTEX_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Mutex_Init_2Tests, apzSolaris_Mutex_Init_2Patch, 0 },
+ { zSolaris_Pow_Int_OverloadName, zSolaris_Pow_Int_OverloadList,
+ apzSolaris_Pow_Int_OverloadMachs,
+ SOLARIS_POW_INT_OVERLOAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Pow_Int_OverloadTests, apzSolaris_Pow_Int_OverloadPatch, 0 },
+
{ zSolaris_Rwlock_Init_1Name, zSolaris_Rwlock_Init_1List,
apzSolaris_Rwlock_Init_1Machs,
SOLARIS_RWLOCK_INIT_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Posix_Spawn_RestrictTests, apzSolaris_Posix_Spawn_RestrictPatch, 0 },
+ { zSolaris_Std___FilbufName, zSolaris_Std___FilbufList,
+ apzSolaris_Std___FilbufMachs,
+ SOLARIS_STD___FILBUF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Std___FilbufTests, apzSolaris_Std___FilbufPatch, 0 },
+
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
apzSolaris_Stdio_TagMachs,
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
};
+/*
+ * g++ rejects functions declared with both C and C++ linkage.
+ */
+fix = {
+ hackname = solaris_cxx_linkage;
+ mach = '*-*-solaris2*';
+ files = "iso/stdlib_iso.h";
+ select = "(#if __cplusplus >= 199711L)\n"
+ "(extern \"C\\+\\+\" \\{\n)"
+ "(.*(bsearch|qsort).*)";
+ c_fix = format;
+ c_fix_arg = "%1 && !__GNUG__\n%2%3";
+
+ test_text =
+ "#if __cplusplus >= 199711L\n"
+ "extern \"C++\" {\n"
+ " void *bsearch(const void *, const void *, size_t, size_t,";
+};
+
+
+/*
+ * Solaris <iso/stdio_iso.h> doesn't declare getc for C++ with
+ * _STRICT_STDC, but uses it.
+ */
+fix = {
+ hackname = solaris_getc_strict_stdc;
+ mach = "*-*-solaris2*";
+ files = "iso/stdio_iso.h";
+ select = "(.*&& )!defined\\(_STRICT_STDC\\)(.*)";
+ c_fix = format;
+ c_fix_arg = "%1(!defined(_STRICT_STDC) || (__cplusplus >= 199711L))%2";
+
+ test_text =
+ "#if !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC)";
+};
+
+
+/*
+ * Before Solaris 10, <iso/setjmp_iso.h> doesn't mark longjump noreturn.
+ */
+fix = {
+ hackname = solaris_longjmp_noreturn;
+ mach = "*-*-solaris2*";
+ files = "iso/setjmp_iso.h";
+ bypass = "__NORETURN";
+ select = "(.*longjmp\\(jmp_buf.*[^)]+\\));";
+ c_fix = format;
+ c_fix_arg = "%1 __attribute__ ((__noreturn__));";
+
+ test_text = "extern void longjmp(jmp_buf, int);";
+};
+
+
/*
* Sun Solaris 10 defines several C99 math macros in terms of
* builtins specific to the Studio compiler, in particular not
};
+/*
+ * The pow overloads with int were removed in C++ 2011.
+ */
+fix = {
+ hackname = solaris_pow_int_overload;
+ mach = '*-*-solaris2*';
+ files = "iso/math_iso.h";
+ select = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)"
+ " *\\{[^{}]*\n[^{}]*\\}";
+ c_fix = format;
+ c_fix_arg = "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n%0\n#endif";
+
+ test_text =
+ " inline long double pow(long double __X, int __Y) { return\n"
+ " __powl(__X, (long double) (__Y)); }";
+};
+
+
/*
* Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some
* fields of the pthread_rwlock_t structure, which are of type
};
+/*
+ * Before Solaris 10, <stdio.h> lacks declarations of std::__filbuf and
+ * std::__flsbuf, but <iso/stdio_iso.h> uses them.
+ */
+fix = {
+ hackname = solaris_std___filbuf;
+ files = stdio.h;
+ mach = '*-*-solaris2*';
+ bypass = "using std::__filbuf";
+ select = "(using std::perror;\n)(#endif)";
+ c_fix = format;
+ c_fix_arg = "%1#ifndef _LP64\n"
+ "using std::__filbuf;\n"
+ "using std::__flsbuf;\n"
+ "#endif\n%2";
+
+ test_text = "using std::perror;\n"
+ "#endif";
+};
+
+
/*
* Sun Solaris 8 has what appears to be some gross workaround for
* some old version of their c++ compiler. G++ doesn't want it