*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Thursday May 22, 2003 at 10:03:21 AM PDT
+ * It has been AutoGen-ed Wednesday May 28, 2003 at 12:55:57 AM CDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Thu May 22 10:03:21 PDT 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Wed May 28 00:55:57 CDT 2003
*
* 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 152 fixup descriptions.
+ * This file contains 154 fixup descriptions.
*
* See README for more information.
*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Solaris_Socket fix
+ */
+tSCC zSolaris_SocketName[] =
+ "solaris_socket";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_SocketList[] =
+ "|sys/socket.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzSolaris_SocketMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_SocketSelect0[] =
+ "@\\(#\\)socket.h[ \t]+1.[123][0-9][ \t]+9[567]/[0-9/]+ SMI";
+
+#define SOLARIS_SOCKET_TEST_CT 1
+static tTestDesc aSolaris_SocketTests[] = {
+ { TT_EGREP, zSolaris_SocketSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Socket
+ */
+static const char* apzSolaris_SocketPatch[] = {
+ "format",
+ "extern int %1(int, %2void *, int, int);",
+ "^extern int (recv|send)\\(int, (const )*char \\*, int, int\\);",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Solaris_Stdio_Tag fix
*/
tSCC zSolaris_Stdio_TagName[] =
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Solaris_Unistd fix
+ */
+tSCC zSolaris_UnistdName[] =
+ "solaris_unistd";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_UnistdList[] =
+ "|unistd.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzSolaris_UnistdMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_UnistdSelect0[] =
+ "@\\(#\\)unistd.h[ \t]+1.3[0-9][ \t]+9[567]/[0-9/]+ SMI";
+
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zSolaris_UnistdBypass0[] =
+ "getpagesize";
+
+#define SOLARIS_UNISTD_TEST_CT 2
+static tTestDesc aSolaris_UnistdTests[] = {
+ { TT_NEGREP, zSolaris_UnistdBypass0, (regex_t*)NULL },
+ { TT_EGREP, zSolaris_UnistdSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Unistd
+ */
+static const char* apzSolaris_UnistdPatch[] = {
+ "format",
+ "extern int getpagesize();\n\
+%0",
+ "^extern (pid_t|int) getpgid\\(.*\\);",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Solaris_Widec fix
*/
tSCC zSolaris_WidecName[] =
*
* List of all fixes
*/
-#define REGEX_COUNT 168
+#define REGEX_COUNT 171
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 152
+#define FIX_COUNT 154
/*
* Enumerate the fixes
SCO_UTIME_FIXIDX,
SOLARIS_MUTEX_INIT_1_FIXIDX,
SOLARIS_MUTEX_INIT_2_FIXIDX,
+ SOLARIS_SOCKET_FIXIDX,
SOLARIS_STDIO_TAG_FIXIDX,
+ SOLARIS_UNISTD_FIXIDX,
SOLARIS_WIDEC_FIXIDX,
STATSSWTCH_FIXIDX,
STDIO_STDARG_H_FIXIDX,
SOLARIS_MUTEX_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris_Mutex_Init_2Tests, apzSolaris_Mutex_Init_2Patch, 0 },
+ { zSolaris_SocketName, zSolaris_SocketList,
+ apzSolaris_SocketMachs,
+ SOLARIS_SOCKET_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_SocketTests, apzSolaris_SocketPatch, 0 },
+
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
apzSolaris_Stdio_TagMachs,
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
aSolaris_Stdio_TagTests, apzSolaris_Stdio_TagPatch, 0 },
+ { zSolaris_UnistdName, zSolaris_UnistdList,
+ apzSolaris_UnistdMachs,
+ SOLARIS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_UnistdTests, apzSolaris_UnistdPatch, 0 },
+
{ zSolaris_WidecName, zSolaris_WidecList,
apzSolaris_WidecMachs,
SOLARIS_WIDEC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
/*
+ * Solaris 2.5.1 and 2.6 use an outdated prototype for send & recv
+ * in sys/socket.h. This is corrected in Solaris 7 and up.
+ */
+fix = {
+ hackname = solaris_socket;
+ files = sys/socket.h;
+ select = '@\(#\)socket.h' "[ \t]+1.[123][0-9][ \t]+9[567]/[0-9/]+ SMI";
+ c_fix = format;
+ c_fix_arg = "extern int %1(int, %2void *, int, int);";
+ c_fix_arg = '^extern int (recv|send)\(int,'
+ ' (const )*char '
+ '\*, int, int\);';
+
+ test_text = '#ident "@(#)socket.h 1.30 97/01/20 SMI"'"\n"
+ "extern int recv(int, char *, int, int);\n"
+ "extern int send(int, const char *, int, int);";
+};
+
+
+/*
* Solaris 2.8 has what appears to be some gross workaround for
* some old version of their c++ compiler. G++ doesn't want it
* either, but doesn't want to be tied to SunPRO version numbers.
test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)";
};
+
+/*
+ * Sun Solaris 2.5.1 doesn't define 'getpagesize' in <unistd.h>, as is done
+ * on Solaris 2.6 and up.
+ */
+fix = {
+ hackname = solaris_unistd;
+ files = unistd.h;
+ select = '@\(#\)unistd.h' "[ \t]+1.3[0-9][ \t]+9[567]/[0-9/]+ SMI";
+ bypass = "getpagesize";
+ c_fix = format;
+ c_fix_arg = "extern int getpagesize();\n%0";
+ c_fix_arg = '^extern (pid_t|int) getpgid\(.*\);';
+ test_text = '#ident "@(#)unistd.h 1.33 95/08/28 SMI"'"\n"
+ "extern pid_t getpgid(pid_t);\n"
+ "extern int getpgid();";
+};
+
+
/*
* <widec.h> until Solaris 2.5.1 defines macros for a couple of <wchar.h>
* functions, breaking their prototypes if that file is included afterwards.