This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

New fixincludes patches for SCO systems


Based on input from teh fixincludes maintainer, please find attached
an updated patch for fixincludes for SCO systems. This is based on
head but needs to go into the 4.0 and 4.1 branches as well.

PS. Bruce, I didnt get a reply to my other mail to you, and in fact
got a bounce, so I hope you are getting this. I didnt want to
convert any of the fixes from sed, as I am the one that has to
maintain this stuff for SCO platforms, and I dont "get" the c_fix
stuff. I know you say sed is "dog slow" but considering that the
whole fixincludes process accounts for 26 seconds out of a 3 hour
build, I dont think speed is much of an issue :)

Kean
2005-11-21  Kean Johnston  <jkj@sco.com>

	* inclhack.def (sco_abs_etc, sco_cfront, sco_eftsafe, sco_sys_param,
	sco_eftsafe2, sco_math_2, sco_pthread, sco_string, sco_stdc,
	sco_synch, sco_unistd_exit, sco_volatile, sco_wchar, sco_string_wchar,
	sco_wrap_stadarg_h, sco_wrap_stdlib_h, sco_eftsafe3): New fixes.
	(AAB_ultrix_string): Add newline so replacement file is terminated
	better. Eliminates bogus warnings from cmp.
	(sco_math): Add missing ansi/math.h to file list, and mach entries
	for OpenServer 5, 6 and UnixWare 7. Convert all isinf(), isnan()
	etc macros to use __builtin_isinf() etc.
	(sco_regset): Simplify test case.
	(sco_static_func): Remove.
	(solaris_mutex_init_1): Exclude *-*-sysv5*.
	(stdio_va_list): Recognize _VA_LIST as well.
	(stdio_va_list_clients): Ditto. Also recognize __VA_LIST__.
	(strict_ansi_not): Exclude on SCO platforms as they need to handle
	__STDC__ slightly differently.
	(strict_ansi_not_ctd): Ditto.
	(svr4_ftw): Bypass on SVR5.
	* tests/base/ctype.h: Update to accomodate new tests above.
	* tests/base/math.h: Ditto.
	* tests/base/pthread.h: Ditto.
	* tests/base/stdlib.h: Ditto.
	* tests/base/testing.h: Ditto.
	* tests/base/unistd.h: Ditto.
	* tests/base/wchar.h: Ditto.
	* tests/base/sys/regset.h: Ditto.
	* tests/base/sys/stat.h: Ditto.
	* tests/base/sys/types.h: Ditto.
	* tests/base/dirent.h: Ditto. New file.
	* tests/base/pfmt.h: Ditto. New file.
	* tests/base/synch.h: Ditto. New file.
	* tests/base/ansi/string.h: Ditto. New file.
	* tests/base/ansi/wchar.h: Ditto. New file.
	* tests/base/sys/mkdev.h: Ditto. New file.
	* tests/base/sys/param.h: Ditto. New file.

Index: fixincludes/inclhack.def
===================================================================
--- fixincludes/inclhack.def	(revision 107281)
+++ fixincludes/inclhack.def	(working copy)
@@ -549,6 +549,7 @@
 	  #define _STRING_INCLUDED
 	  #include <strings.h>
 	#endif /* _STRING_INCLUDED */
+
 	_EndOfHeader_;
 };
 
@@ -2597,6 +2598,290 @@
 
 
 /*
+ * On UnixWare and OpenServer 6, stdlib.h has C++ declarations of
+ * abs and div that conflict with libstdc++. It also has problems
+ * with abort and bsearch.
+ * Note that this fix must come before the cfront fix below.
+ */
+fix = {
+    hackname  = sco_abs_etc;
+    files     = stdlib.h;
+    mach      = "i?86-*-sysv5*";
+    mach      = "i?86-*-sco5v6*";
+    bypass    = "__GNU[GC]__";
+
+    sed       = "/inline long .*abs/d";
+    sed       = "/inline .*ldiv_t div/d";
+    sed	      = <<- EOSed
+	/^#if[ 	]*!defined(__cplusplus)[	 ]*||[ 	]*defined(_CFRONT_3_0)/{
+	  h
+	  N
+	  /extern[ 	]*void[	 ]*abort/ {
+	    :loop1
+	    h
+	    N
+	    /#endif/!b loop1
+	    g
+	    D
+	  }
+	  /extern[ 	]*void[	 ]*\*bsearch/ {
+	    :loop2
+	    h
+	    N
+	    /#endif/!b loop2
+	    g
+	    D
+	  }
+	  h
+	  g
+	}
+	EOSed ;
+
+    test_text = <<- EOTest
+	extern "C++" {
+	inline long abs(long __1) blah blah;
+	inline lldiv_t div(long long __1) blah;
+	inline long long abs(long long __1) blah;
+	}
+
+	#if !defined(__cplusplus) || defined(_CFRONT_3_0)
+	extern void	abort(void);
+	#endif
+
+	#if !defined(__cplusplus) || defined(_CFRONT_3_0)
+	extern void	*bsearch(const void *, blah, blah,
+	                 blah, blah);
+	#endif
+	EOTest ;
+};
+
+
+/*
+ * On OpenServer 6 and UnixWare, many header files have conditional
+ * guards on _CFRONT_3_0, which if not defined, attempts to include
+ * the namespace std header file. This causes considerable problems.
+ * So, we change the conditional to also exclude g++.
+ */
+fix = {
+    hackname  = sco_cfront;
+    files     = "ctype.h";
+    files     = "inttypes.h";
+    files     = "locale.h";
+    files     = "math.h";
+    files     = "search.h";
+    files     = "setjmp.h";
+    files     = "signal.h";
+    files     = "stdio.h";
+    files     = "stdlib.h";
+    files     = "string.h";
+    files     = "time.h";
+    files     = "unistd.h";
+    files     = "wchar.h";
+    files     = "wctype.h";
+    mach      = *-sco3.2v5*;
+    mach      = *-sco5v6*;
+    mach      = *-unixware7*;
+    mach      = *-UnixWare7*;
+    mach      = *-sysv5*;
+    mach      = *-svr5*;
+    select    = '#ifndef _CFRONT_3_0';
+    sed       = "s/#ifndef _CFRONT_3_0/"
+	       "#if !defined(_CFRONT_3_0) \\&\\& !defined(__GNUC__)/";
+
+    test_text =
+    "#ifndef _CFRONT_3_0\n"
+    "#include <ctype> /* for namespace std */\n"
+    "#endif\n";
+};
+
+
+/*
+ * On OpenServer 6 and UnixWare, many of the header files have support
+ * for "Expanded Fundamental Types" (EFTs). The theory is, if you know
+ * your code is clean and does not use any of the mapped function names
+ * in any way but as function calls, you can define _EFTSAFE, and then
+ * various macros will call the real, versioned library function with
+ * some special first arg, which is the version of the call. If you do
+ * not define _EFTSAFE, then the headers use static functions to do the
+ * same thing. Both mechanisms are messy. Consider the declaration for
+ * "shutdown" in sys/socket.h.  If you define _EFTSAFE, then you end up
+ * with a macro, and thus you cant use the name "shutdown" as a C++
+ * member function, for example, becuause the macro gets expanded when
+ * the header is processed. If you do not define _EFTSAFE, you end up
+ * with static functions defined in the header file.
+ * This fix will try to adjust this as much as possible. There are some
+ * cases that slip through, most notable in ftw.h, so perhaps one day
+ * I will write a special purpose fix for that header. But this fix
+ * will arrange things such that it makes no difference if you define
+ * _EFTSAFE or not, and you always get an inlined function that calls
+ * the versioned function, plus you get corect function declarations for
+ * each of the offending functions.
+ * Order is very important in this fix. There are some bits of the sed
+ * scripts that need to run before others. This is mostly to support a
+ * few special cases in sys/socket.h. Be very careful when changing this
+ * fix please. Better yet, mail me (jkj@sco.com) before you do.
+ */
+fix = {
+    hackname = sco_eftsafe;
+    files    = dirent.h;
+    files    = netdb.h;
+    files    = netdir.h;
+    files    = resolv.h;
+    files    = signal.h;
+    files    = wchar.h;
+    files    = ftw.h;
+    files    = stdlib.h;
+    files    = sys/socket.h;
+    files    = sys/stat.h;
+    files    = sys/utsname.h;
+    files    = sys/bitmap.h;
+    files    = sys/tty.h;
+    files    = sys/ttydev.h;
+    files    = sys/v86.h;
+    files    = sys/xti.h;
+    mach     = *-sco3.2v5*;
+    mach     = *-sco5v6*;
+    mach     = *-unixware7*;
+    mach     = *-UnixWare7*;
+    mach     = *-sysv5*;
+    mach     = *-svr5*;
+    bypass   = "static __inline__";
+
+    sed      = <<- EOSed
+	/__NETLIB_LIBSOCKET_ALL/ s@:.*);@);@
+	/__NETLIB_LIBSOCKET_ALL/ s@__NETLIB_LIBSOCKET_ALL_VERSIONED__() ? @@
+	/#define getsockopt _getsockopt/d
+	s/^static int _getsockopt/extern __inline__ __attribute ((__always_inline__)) int getsockopt/
+	/#define listen _listen/d
+	s/^static int _listen/extern __inline__ __attribute ((__always_inline__)) int listen/
+	/#define recv _recv/d
+	s/^static ssize_t _recv/extern __inline__ __attribute ((__always_inline__)) ssize_t recv/
+	/#define send _send/d
+	s/^static ssize_t _send/extern __inline__ __attribute ((__always_inline__)) ssize_t send/
+	/#define setsockopt _setsockopt/d
+	s/^static int _setsockopt/extern __inline__ __attribute ((__always_inline__)) int setsockopt/
+	/#define shutdown _shutdown/d
+	s/^static int _shutdown/extern __inline__ __attribute ((__always_inline__)) int shutdown/
+	/#define socket _socket/d
+	s/^static int _socket/extern __inline__ __attribute ((__always_inline__)) int socket/
+	/#define socketpair _socketpair/d
+	s/^static int _socketpair/extern __inline__ __attribute ((__always_inline__)) int socketpair/
+	s/_EFTSAFE/__FIXINC_NOTEFTSAFE/g
+	EOSed ;
+
+    sed      = "/^static /N; s/^static \\(.*\\)\\((.*)\\)/"
+               "extern __inline__ __attribute ((__always_inline__)) \\1 \\2/";
+
+    test_text = <<- EOTest
+	#ifdef _EFTSAFE
+	#define getsockopt(blah, bleh) _xgetsockopt(__NETLIB_VERSION__,1,2)
+	#else /* !_EFTSAFE */
+	#pragma weak _xgetsockopt
+	#pragma weak getsockopt
+	extern int getsockopt(int, int, int, void *, socklen_t *);
+	static int _getsockopt(int __a1, int __a2, int __a3, void *__a4, socklen_t *__a5)
+	{
+	    return (__NETLIB_LIBSOCKET_ALL_VERSIONED__() ? _xgetsockopt(__NETLIB_VERSION__, __a1, __a2, __a3, __a4, __a5) : getsockopt(__a1, __a2, __a3, __a4, __a5));
+	}
+	#define getsockopt _getsockopt
+	#endif /* !_EFTSAFE */
+	EOTest ;
+};
+
+
+/* Special case for sys/mkdev.h */
+fix = {
+    hackname = sco_eftsafe2;
+    files    = sys/mkdev.h;
+    mach     = *-sco5v6*;
+    mach     = *-unixware7*;
+    mach     = *-UnixWare7*;
+    mach     = *-sysv5*;
+    mach     = *-svr5*;
+    bypass   = "static __inline__";
+
+    sed      = <<- EOSed
+	/ifdef _EFTSAFE/,/ONBITSMAJOR/ c\
+	extern __inline__ __attribute ((__always_inline__))\
+	dev_t makedev(major_t maj, minor_t mn)\
+	{\
+	#if !defined(_STYPES)\
+	 	int ver = NEWDEV;\
+	#else\
+	 	int ver = OLDDEV;\
+	#endif\
+	 	return __makedev (ver, maj, mn);\
+	}\
+	\
+	extern __inline__ __attribute ((__always_inline__))\
+	major_t major(dev_t dev)\
+	{\
+	#if !defined(_STYPES)\
+	 	int ver = NEWDEV;\
+	#else\
+	 	int ver = OLDDEV;\
+	#endif\
+	 	return __major (ver, dev);\
+	}\
+	\
+	extern __inline__ __attribute ((__always_inline__))\
+	minor_t minor(dev_t dev)\
+	{\
+	#if !defined(_STYPES)\
+	 	int ver = NEWDEV;\
+	#else\
+	 	int ver = OLDDEV;\
+	#endif\
+	 	return __minor (ver, dev);\
+	}\
+	\
+	#define ONBITSMAJOR	7
+	EOSed ;
+
+    test_text = <<- EOTest
+	#ifdef _EFTSAFE
+	/* blah */
+	#endif /* defined _EFTSAFE */
+	#define ONBITSMAJOR	7
+	EOTest ;
+};
+
+
+/* Special case for sys/sockio.h. C++ cant inline variadic functions. */
+fix = {
+    hackname = sco_eftsafe3;
+    files    = sys/sockio.h;
+    mach     = *-sco5v6*;
+    mach     = *-unixware7*;
+    mach     = *-UnixWare7*;
+    mach     = *-sysv5*;
+    mach     = *-svr5*;
+    bypass   = "static __inline__";
+
+    sed      = <<- EOSed
+	/#define __IOCTL_VERSIONED__/ a\
+	#ifndef __cplusplus
+	/#endif.*__IOCTL_VERSIONED__/ i\
+	#endif
+	EOSed ;
+
+    sed      = "/^static /N; s/^static \\(.*\\)\\((.*)\\)/"
+               "extern __inline__ __attribute ((__always_inline__)) \\1 \\2/";
+
+    test_text = <<- EOTest
+	#ifndef __IOCTL_VERSIONED__
+	#define __IOCTL_VERSIONED__
+	extern int _xioctl(int, int, int, void *);
+	static int ioctl(int __a1, int __a2, ...)
+	{
+		blah(); blah();
+	}
+	#endif /* !__IOCTL_VERSIONED__ */
+	EOTest ;
+};
+
+
+/*
  *  On OpenServer and on UnixWare 7, <math.h> uses the native compiler
  *  __builtin_generic. We fix that usage to use the GCC equivalent.
  * It also has a plethora of inline functions that conflict with libstdc++.
@@ -2611,102 +2896,272 @@
     files    = xpg4plus/math.h;
     files    = ods_30_compat/math.h;
     files    = oldstyle/math.h;
-    select   = "inline double abs";
-    bypass   = "__GNUG__";
+    mach     = *-sco3.2v5*;
+    mach     = *-sco5v6*;
+    mach     = *-unixware7*;
+    mach     = *-UnixWare7*;
+    mach     = *-sysv5*;
+    mach     = *-svr5*;
+    bypass   = "__GNU[CG]__";
     sed      = "/#define.*__fp_class(a) \\\\/i\\\n"
 	       "#ifndef __GNUC__\n";
-    sed      =
-"/.*__builtin_generic/a\\\n"
-"#else\\\n"
-"#define __fp_class(a) \\\\\\\n"
-"  __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n"
-"   __fpclassifyl(a), \\\\\\\n"
-"    __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n"
-"      __fpclassifyf(a),__fpclassify(a)))\\\n"
-"#endif";
+    sed      = <<- EOSed
+	/.*__builtin_generic/a\
+	#else\
+	#define __fp_class(a) \\\
+	  __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\
+	   __fpclassifyl(a), \\\
+	    __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\
+	      __fpclassifyf(a),__fpclassify(a)))\
+	#endif
+	EOSed ;
 
-    sed      = "/extern \"C\\+\\+\"/N;"
+    sed      = "/extern \"C\+\+\"/N;"
 	       "/inline double abs/i\\\n"
                "#ifndef __GNUC__\n";
     sed      = "/inline long double trunc/N;"
-	       "/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n"
+	       "/inline long double trunc.*}.*extern \"C\+\+\"/a\\\n"
 	       "#endif /* ! __GNUC__ */";
+    sed      = "s/^#define is\\(.*\\)(x, y).*/"
+               "#define is\\1(x, y) __builtin_is\\1((x),(y))/";
 
-    test_text =
-    "#define __fp_class(a) \\\\\n"
-    " __builtin_generic(a,\"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify\")\n";
+    test_text = <<- EOTest
+	#define __fp_class(a) \
+	    __builtin_generic(a,\"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify\")
+	#define fpclassify(a)	(__fp_class(a) &  FP_CLASSIFY)
 
+      	#define isgreater(x, y)		(!((x) !> (y)))
+
+	extern "C++" {
+	inline double abs(double __1){ return fabs(__1); }
+	blah();
+	inline long double trunc(long double __1){ return _truncl(__1); }
+	} /*extern "C++"*/
+	EOTest ;
+
 };
 
 
 /*
- *  On SCO OpenServer prior to 5.0.7UP1, <sys/regset.h> and <ieeefp.h>
+ * On OpenServer 6 and UnixWare, math.h has definitions for NAN and
+ * INFINITY that cause problems for GCC. Replace them with the builtin
+ * functions.
+ */
+fix = {
+    hackname = sco_math_2;
+    files    = math.h;
+    mach     = *-sco5v6*;
+    mach     = *-unixware7*;
+    mach     = *-UnixWare7*;
+    mach     = *-sysv5*;
+    mach     = *-svr5*;
+    bypass   = "__GNU[CG]__";
+
+    sed      = <<- EOSed
+	/#define __LDU/,/#define INFINITY/c\
+	#undef NAN\
+	#define NAN		(__builtin_nanf(""))\
+	#undef HUGE_VAL\
+	#define HUGE_VAL	(__builtin_huge_val())\
+	#undef HUGE_VALF\
+	#define HUGE_VALF	(__builtin_huge_valf())\
+	#undef HUGE_VALL\
+	#define HUGE_VALL	(__builtin_huge_vall())\
+	#undef INFINITY\
+	#define INFINITY	(__builtin_inff())
+	EOSed ;
+
+    test_text = <<- EOTest
+	#ifndef __cplusplus
+	#define __LDU	union{long double __x; unsigned char __c[sizeof(long double)];}
+	#define __INF	(+(const __LDU){.__c={[7]=0x80,0xff,0x7f}}.__x)
+	#define NAN		((float)+(const __LDU){.__c={[8]=0xff,0xff}}.__x)
+	#undef HUGE_VAL
+	#define HUGE_VAL	((double)__INF)
+	#define HUGE_VALF	((float)__INF)
+	#define HUGE_VALL	__INF
+	#define INFINITY	HUGE_VALF
+	#endif /*__cplusplus*/
+	EOTest ;
+};
+
+
+/*
+ * On SCO OpenServer 6 and UnixWare, pthread.h has poor initialization
+ * macros. Lets fix them shall we?
+ */
+fix = {
+    hackname  = sco_pthread;
+    files     = pthread.h;
+    mach      = "*-*-sco3.2v5*";
+    mach      = "*-*-sco5v6*";
+    mach      = "*-*-sysv5*";
+    select    = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
+    sed       = "s@#define PTHREAD_MUTEX_INITIALIZER.*0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.*@"
+	"#define PTHREAD_MUTEX_INITIALIZER\t{{{0,0},{0,0},0,{0,0},{0,0}},0,0,0,{0,0,0}}@";
+
+    sed       = "s@#define PTHREAD_COND_INITIALIZER.*0,0,0,0,0,0,0.*@"
+	"#define PTHREAD_COND_INITIALIZER\t{{{0},{0,0},0,{0,0}},{0,0}}@";
+
+    sed       = "s@#define PTHREAD_ONCE_INIT.*@"
+	"#define PTHREAD_ONCE_INIT\t{0,0,{{0,0},{0,0},0,{0,0},{0,0}},{{0},{0,0},0,{0,0}}}@";
+
+    test_text =
+     "#define PTHREAD_MUTEX_INITIALIZER	{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}\n"
+     "#define PTHREAD_COND_INITIALIZER	{0,0,0,0,0,0,0,0}\n"
+     "#define PTHREAD_ONCE_INIT		{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}\n";
+};
+
+
+/*
+ *  On SCO OpenServer prior to 5.0.7MP1, <sys/regset.h> and <ieeefp.h>
  *  have a clash on struct _fpstate and struct fpstate.
  */
 fix = {
-    hackname = sco_regset;
-    files    = sys/regset.h;
-    mach     = "*-*-sco3.2v5*";
-    select   = "(struct[ \t]+.*)fpstate";
+    hackname  = sco_regset;
+    files     = sys/regset.h;
+    mach      = "*-*-sco3.2v5*";
+    select    = "(struct[ \t]+.*)fpstate";
     c_fix     = format;
     c_fix_arg = "%1rsfpstate";
 
     test_text =
-    "union u_fps {\n"
-    "    struct\tfpstate\n"
-    "    {\n"
-    "       int whatever;\n"
-    "    }\n"
-    "};\n"
-    "union _u_fps {\n"
-    "    struct _fpstate\n"
-    "    {\n"
-    "       int whatever;\n"
-    "    }\n"
-    "};\n";
+    "union u_fps { struct\tfpstate { int whatever; } };\n"
+    "union _u_fps { struct _fpstate { int whatever; } };\n";
 };
 
 
 /*
- *  The static functions lstat() and fchmod() in <sys/stat.h>
- *  cause G++ grief since they're not wrapped in "if __cplusplus".
- *
- *  On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
- *  tiny static wrappers that aren't C++ safe.
+ * The string.h header file on SCO OpenServer has some inline C++ functions
+ * that confuse and upset libstdc++ horribly. Protect them from being defined
+ * when using GCC. wchar.h has the same issue, and this applies to UnixWare
+ * too.
  */
 fix = {
-    hackname = sco_static_func;
-    files    = sys/stat.h;
-    mach     = "i?86-*-sco3.2*";
-    select   = "^static int";
+    hackname = sco_string_wchar;
+    files    = ansi/string.h;
+    files    = posix/string.h;
+    files    = xpg4/string.h;
+    files    = xpg4v2/string.h;
+    files    = xpg4plus/string.h;
+    files    = ods_30_compat/string.h;
+    files    = oldstyle/string.h;
+    files    = string.h;
+    files    = ansi/wchar.h;
+    files    = posix/wchar.h;
+    files    = xpg4/wchar.h;
+    files    = xpg4v2/wchar.h;
+    files    = xpg4plus/wchar.h;
+    files    = ods_30_compat/wchar.h;
+    files    = oldstyle/wchar.h;
+    files    = wchar.h;
+    mach     = "*-*-sco3.2v5*";
+    mach     = "*-*-sco5v6*";
+    mach     = "*-*-sysv5*";
+    sed      = "/^#ifdef __cplusplus/,/^}$/{\n/^const/d\n}";
+    sed      = "/^extern \"C\\+\\+\"/,/^}$/ d";
 
-    sed      = "/^static int/i\\\n"
-               "#if __cplusplus\\\n"
-               "extern \"C\" {\\\n"
-               "#endif /* __cplusplus */";
+    test_text = <<- EOTest
+	#ifdef __cplusplus
 
-    sed      = "/^}$/a\\\n"
-               "#if __cplusplus\\\n"
-               " }\\\n"
-               "#endif /* __cplusplus */";
+	const void	*memchr(const void *, int, size_t);
+	const char	*strchr(const char *, int);
+	} /*extern "C"*/
+	
+	extern "C++" {
+	inline void *memchr(void *__1, int __2, size_t __3)
+	 	{ return (void *)memchr((const void *)__1, __2, __3); }
+	}
+	EOTest ;
+};
 
+
+/*
+ * On OpenServer 6 and UnixWare, the header files carefully protect the
+ * strict ANSI namespace. libstdc++ does not, so many tests fail becuase
+ * functions are missing when you compile with -ansi. We thus avoid the
+ * __STDC__ tests below, and eliminate those guards completely here.
+ */
+fix = {
+    hackname  = sco_stdc;
+    mach      = "*-*-sco3.2v5*";
+    mach      = "*-*-sco5v6*";
+    mach      = "*-*-sysv5*";
+    select    = "__STDC__ - 0";
+
+    sed       = "s/__STDC__ - 0 == 0/1/";
+
     test_text =
-    "#ifdef __STDC__\n"
-    "static int\tstat(const char *__f, struct stat *__p) {\n"
-    "\treturn __stat32(__f, __p);\n"
-    "}\n\n#  else /* !__STDC__ THIS FAILS ON BSD SYSTEMS */\n"
+      "#if __STDC__ - 0 == 0 || defined(grumble)";
+};
 
-    "static int\tstat(__f, __p)\n"
-    "\tchar *__f;\n"
-    "\tstruct stat *__p;\n"
-    "{\n"
-    "\treturn __stat32(__f, __p);\n"
-    "}\n"
-    "#endif";
+/*
+ * On SCO OpenServer 6 and UnixWare, synch.h has poor initialization
+ * macros, which affect thread initialization for UI-threads mode.
+ */
+fix = {
+    hackname  = sco_synch;
+    files     = synch.h;
+    mach      = "*-*-sco3.2v5*";
+    mach      = "*-*-sco5v6*";
+    mach      = "*-*-sysv5*";
+    select    = "USYNC_THREAD, \\{0,0},0,0\\}";
+    sed       = "/^#define DEFAULTMUTEX/s@0,0}$@{0,0}}@";
+    sed       = "/^#define SHAREDMUTEX/s@0,0}$@{0,0}}@";
+
+    test_text =
+    "#define DEFAULTMUTEX    {{0,0},{0,0},USYNC_THREAD, {0,0},0,0}\n"
+    "#define SHAREDMUTEX     {{0,0},{0,0},USYNC_PROCESS,{0,0},0,0}\n";
 };
 
+/*
+ * On OpenServer 5, the headers dont define MAXPATHLEN, but the kernel
+ * does in fact impose a limit, it just calls it PATHSIZE. Since so
+ * many programs insist on using MAXPATHLEN, define it thus.
+ */
+fix = {
+    hackname  = sco_sys_param;
+    files     = sys/param.h;
+    mach      = "i?86-*-sco3.2v5*";
+    bypass    = "MAXPATHLEN";
 
+    sed       = "/define.*PATHSIZE/a\\\n"
+      "#ifndef MAXPATHLEN\\\n"
+      "#define MAXPATHLEN PATHSIZE\\\n"
+      "#endif\n";
+
+    test_text =
+      "#define PATHSIZE 1024\n";
+};
+
+
 /*
+ * UnixWare and OpenServer 6 have a namespace declaration of exit in
+ * unistd.h that trips up libstdc++. Foil it.
+ */
+fix = {
+    hackname  = sco_unistd_exit;
+    files     = unistd.h;
+    mach      = "i?86-*-sysv5*";
+    mach      = "i?86-*-sco5v6*";
+    bypass    = "__GNUC__";
+    bypass    = "__GNUG__";
+
+    sed       = "/defined(__cplusplus)/N;"
+		"/namespace std.*exit/ "
+		"s@(_CFRONT_3_0)@(_CFRONT_3_0) \\&\\& !defined(__GNUC__)@";
+
+    test_text = <<- EOTest
+	#if defined(__cplusplus) && !defined(_CFRONT_3_0)
+	namespace std { extern "C++" void exit(int); } using std::exit;
+	#else
+	extern void	exit(int);
+	#endif
+	EOTest ;
+};
+
+
+/*
  *  Fix prototype declaration of utime in sys/times.h.
  *  In 3.2v4.0 the const is missing.
  */
@@ -2722,7 +3177,70 @@
     test_text = "extern int utime(const char *, struct utimbuf *);";
 };
 
+
 /*
+ * The OpenServer 6 / UnixWare sys/types.h uses volatile structures for
+ * many of the threads related structures. This is causing the current
+ * GCC a conniption fit. For right now, the path of least resistance
+ * is to fix that header file. However, this fix may disappear when or
+ * if the compiler changes its view of what "volatile" really means.
+ */
+fix = {
+    hackname  = sco_volatile;
+    files     = sys/types.h;
+    files     = synch.h;
+    files     = aio.h;
+    mach      = "*-*-sco3.2v5*";
+    mach      = "*-*-sco5v6*";
+    mach      = "*-*-sysv5*";
+    select    = "typedef volatile struct";
+    sed       = "s@typedef volatile struct@typedef struct@g";
+    test_text =
+      "typedef volatile struct foo foo_t;";
+};
+
+
+/*
+ *  Arrange for pfmt.h, wchar.h to use stdarg.h to define __gnuc_va_list.
+ */
+fix = {
+    hackname = sco_wrap_stdarg_h;
+    files    = pfmt.h;
+    files    = wchar.h;
+    bypass   = "include.*stdarg\.h";
+    mach     = "*-*-sysv5*";
+    mach     = "*-*-sco5v6*";
+    c_fix     = wrap;
+    c_fix_arg = "#define __need___va_list\n#include <stdarg.h>\n";
+
+    test_text = "";
+};
+
+
+/*
+ *  Arrange for stdlib.h to be wrapped inside an extra #ifndef ...#endif.
+ *  This is to work around a weakness in fix-header that checks for
+ *  a "well wrapped" files. The SCO headers are indeed "well wrapped",
+ *  but the wrapping appears inside another conditional, which confuses
+ *  fix-header. So we wrap the whole file with out own wrapper so that
+ *  fix-header does not insert its stuff after the terminating #endif.
+ *  Stringly speaking, this should not be necessary, but at least one
+ *  test case does a #include in the middle of a function, and that
+ *  include pulls in stdlib, and fix-headers extern "C" stuff at the
+ *  end winds up in the middle of, say, main. I fixed the test case too,
+ *  but this will at least allow things to work in user programs that
+ *  may do the same misguided thing.
+ */
+fix = {
+    hackname = sco_wrap_stdlib_h;
+    files    = stdlib.h;
+    mach     = "*-*-sco3.2v5*";
+    c_fix     = wrap;
+    test_text = "";
+};
+
+
+/*
  * Sun Solaris 10 defines several C99 math macros in terms of
  * builtins specific to the Studio compiler, in particular not
  * compatible with the GNU compiler.
@@ -3090,6 +3608,7 @@
     sed = "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n"
 	  "s@(va_list)&@(__gnuc_va_list)\\&@\n"
           "s@ _VA_LIST_));@ __gnuc_va_list));@\n"
+          "s@ _VA_LIST);@ __gnuc_va_list);@\n"
           "s@ __VA_LIST__));@ __gnuc_va_list));@\n"
           "s@ va_list@ __not_va_list__@\n"
           "s@\\*va_list@*__not_va_list__@\n"
@@ -3141,6 +3660,8 @@
 	  "s@(va_list)&@(__gnuc_va_list)\\&@\n"
           "s@ _VA_LIST_));@ __gnuc_va_list));@\n"
           "s@ __VA_LIST__));@ __gnuc_va_list));@\n"
+          "s@ __VA_LIST__);@ __gnuc_va_list);@\n"
+          "s@ _VA_LIST);@ __gnuc_va_list);@\n"
           "s@ va_list@ __not_va_list__@\n"
           "s@\\*va_list@*__not_va_list__@\n"
           "s@ __va_list)@ __gnuc_va_list)@\n"
@@ -3157,6 +3678,14 @@
 
 
 /*
+ * These test on __STDC__ -0 == 0. Its a commedy of errors. autoconf
+ * checks to see if the functions are present, libstdc++ uses them
+ * if they are without checking __STRICT_ANSI__. So on SYSV5 we bypass
+ * all of these hacks and in fact remove all __STDC__ - 0 checks from
+ * the headers.
+ */
+ 
+/*
  *  "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0"
  *  is "!defined( __STRICT_ANSI__ )"
  */
@@ -3172,6 +3701,7 @@
     /* GNU gmp.h uses "__STDC__ != 1" only if __SCO_VERSION__, which
        is not defined by GCC, so it is safe.  */
     bypass = '__SCO_VERSION__.*__STDC__ != 1';
+    bypass = '_CFRONT_3_0';
     c_test   = stdc_0_in_system_headers;
 
     c_fix     = format;
@@ -3206,6 +3736,7 @@
                "([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*"
                "[ \t(]*)"
                "(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)";
+    bypass   = '_CFRONT_3_0';
     c_test   = stdc_0_in_system_headers;
 
     c_fix     = format;
@@ -3476,6 +4007,7 @@
     hackname = svr4_ftw;
     files    = ftw.h;
     select   = '^extern int ftw\(const';
+    bypass   = '_XFTWVER64';
 
     sed = '/^extern int ftw(const/i' "\\\n"
             "#if !defined(_STYPES)\\\n"
Index: fixincludes/tests/base/ctype.h
===================================================================
--- fixincludes/tests/base/ctype.h	(revision 107281)
+++ fixincludes/tests/base/ctype.h	(working copy)
@@ -63,3 +63,11 @@
 # define isalpha(__c) (__SB_masks ? (int)__SB_masks[__c] & _IS
 
 #endif  /* HPUX_CTYPE_MACROS_CHECK */
+
+
+#if defined( SCO_CFRONT_CHECK )
+#if !defined(_CFRONT_3_0) && !defined(__GNUC__)
+#include <ctype> /* for namespace std */
+#endif
+
+#endif  /* SCO_CFRONT_CHECK */
Index: fixincludes/tests/base/dirent.h
===================================================================
--- fixincludes/tests/base/dirent.h	(revision 0)
+++ fixincludes/tests/base/dirent.h	(revision 0)
@@ -0,0 +1,24 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/dirent.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( SCO__FIXINC_NOTEFTSAFE_CHECK )
+#ifdef __FIXINC_NOTEFTSAFE
+#define getsockopt(blah, bleh) _xgetsockopt(__NETLIB_VERSION__,1,2)
+#else /* !__FIXINC_NOTEFTSAFE */
+#pragma weak _xgetsockopt
+#pragma weak getsockopt
+extern int getsockopt(int, int, int, void *, socklen_t *);
+extern __inline__ __attribute ((__always_inline__)) int getsockopt(int __a1, int __a2, int __a3, void *__a4, socklen_t *__a5)
+{
+    return (_xgetsockopt(__NETLIB_VERSION__, __a1, __a2, __a3, __a4, __a5) );
+}
+#endif /* !__FIXINC_NOTEFTSAFE */
+#endif  /* SCO__FIXINC_NOTEFTSAFE_CHECK */
Index: fixincludes/tests/base/math.h
===================================================================
--- fixincludes/tests/base/math.h	(revision 107281)
+++ fixincludes/tests/base/math.h	(working copy)
@@ -49,10 +49,8 @@
 
 #if defined( HPUX11_FABSF_CHECK )
 #ifdef _PA_RISC
-#ifndef __cplusplus
 #  define fabsf(x) ((float)fabs((double)(float)(x)))
 #endif
-#endif
 #endif  /* HPUX11_FABSF_CHECK */
 
 
@@ -86,17 +84,49 @@
 
 
 #if defined( SCO_MATH_CHECK )
+#define __fp_class(a)     __builtin_generic(a,\"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify\")
+#else
 #define __fp_class(a) \
- __builtin_generic(a,"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify")
+  __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\
+   __fpclassifyl(a), \
+    __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \
+      __fpclassifyf(a),__fpclassify(a)))
+#endif
+#define fpclassify(a)	(__fp_class(a) &  FP_CLASSIFY)
 
+      	#define isgreater(x, y)		(!((x) !> (y)))
+
+#ifndef __GNUC__
+extern "C++" {
+inline double abs(double __1){ return fabs(__1); }
+blah();
+inline long double trunc(long double __1){ return _truncl(__1); }
+} /*extern "C++"*/
+#endif /* ! __GNUC__ */
 #endif  /* SCO_MATH_CHECK */
 
 
+#if defined( SCO_MATH_2_CHECK )
+#ifndef __cplusplus
+#undef NAN
+#define NAN		(__builtin_nanf(""))
+#undef HUGE_VAL
+#define HUGE_VAL	(__builtin_huge_val())
+#undef HUGE_VALF
+#define HUGE_VALF	(__builtin_huge_valf())
+#undef HUGE_VALL
+#define HUGE_VALL	(__builtin_huge_vall())
+#undef INFINITY
+#define INFINITY	(__builtin_inff())
+#endif /*__cplusplus*/
+#endif  /* SCO_MATH_2_CHECK */
+
+
 #if defined( STRICT_ANSI_NOT_CTD_CHECK )
 #if 1 && \
-&& defined(mumbling) |& ( !defined(__STRICT_ANSI__)) \
+&& defined(mumbling) |& (1) \
 (  !defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE) \
-||  !defined(__STRICT_ANSI__) ) /* not std C */
+|| 1 ) /* not std C */
 int foo;
 #endif
 #endif  /* STRICT_ANSI_NOT_CTD_CHECK */
Index: fixincludes/tests/base/pfmt.h
===================================================================
--- fixincludes/tests/base/pfmt.h	(revision 0)
+++ fixincludes/tests/base/pfmt.h	(revision 0)
@@ -0,0 +1,21 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/pfmt.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+#ifndef FIXINC_WRAP_PFMT_H_SCO_WRAP_STDARG_H
+#define FIXINC_WRAP_PFMT_H_SCO_WRAP_STDARG_H 1
+
+#define __need___va_list
+#include <stdarg.h>
+
+
+#if defined( SCO_WRAP_STDARG_H_CHECK )
+
+#endif  /* SCO_WRAP_STDARG_H_CHECK */
+
+#endif  /* FIXINC_WRAP_PFMT_H_SCO_WRAP_STDARG_H */
Index: fixincludes/tests/base/pthread.h
===================================================================
--- fixincludes/tests/base/pthread.h	(revision 107281)
+++ fixincludes/tests/base/pthread.h	(working copy)
@@ -66,6 +66,14 @@
 #endif  /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */
 
 
+#if defined( SCO_PTHREAD_CHECK )
+#define PTHREAD_MUTEX_INITIALIZER	{{{0,0},{0,0},0,{0,0},{0,0}},0,0,0,{0,0,0}}
+#define PTHREAD_COND_INITIALIZER	{{{0},{{{0},0},0},0,{0,0}},{0,0}}
+#define PTHREAD_ONCE_INIT	{0,0,{{0,0},{0,0},0,{0,0},{0,0}},{{0},{0,0},0,{0,0}}}
+
+#endif  /* SCO_PTHREAD_CHECK */
+
+
 #if defined( SOLARIS_MUTEX_INIT_1_CHECK )
 #ident "@(#)pthread.h  1.16    97/05/05 SMI"
 #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
Index: fixincludes/tests/base/stdlib.h
===================================================================
--- fixincludes/tests/base/stdlib.h	(revision 107281)
+++ fixincludes/tests/base/stdlib.h	(working copy)
@@ -7,8 +7,11 @@
     This had to be done to correct non-standard usages in the
     original, manufacturer supplied header file.  */
 
+#ifndef FIXINC_WRAP_STDLIB_H_SCO_WRAP_STDLIB_H
+#define FIXINC_WRAP_STDLIB_H_SCO_WRAP_STDLIB_H 1
 
 
+
 #if defined( HPUX11_ABS_CHECK )
 #if !defined(_MATH_INCLUDED) || defined(__GNUG__)
 #endif  /* HPUX11_ABS_CHECK */
@@ -33,6 +36,22 @@
 #endif  /* LYNXOS_MISSING_PUTENV_CHECK */
 
 
+#if defined( SCO_ABS_ETC_CHECK )
+extern "C++" {
+}
+
+extern void	abort(void);
+
+extern void	*bsearch(const void *, blah, blah,
+                 blah, blah);
+#endif  /* SCO_ABS_ETC_CHECK */
+
+
+#if defined( SCO_WRAP_STDLIB_H_CHECK )
+
+#endif  /* SCO_WRAP_STDLIB_H_CHECK */
+
+
 #if defined( SVR4_GETCWD_CHECK )
 extern char* getcwd(char *, size_t);
 #endif  /* SVR4_GETCWD_CHECK */
@@ -70,3 +89,5 @@
 int	putenv();
 
 #endif  /* ULTRIX_STDLIB_CHECK */
+
+#endif  /* FIXINC_WRAP_STDLIB_H_SCO_WRAP_STDLIB_H */
Index: fixincludes/tests/base/synch.h
===================================================================
--- fixincludes/tests/base/synch.h	(revision 0)
+++ fixincludes/tests/base/synch.h	(revision 0)
@@ -0,0 +1,16 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/synch.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( SCO_SYNCH_CHECK )
+#define DEFAULTMUTEX    {{0,0},{0,0},USYNC_THREAD, {0,0},{0,0}}
+#define SHAREDMUTEX     {{0,0},{0,0},USYNC_PROCESS,{0,0},{0,0}}
+
+#endif  /* SCO_SYNCH_CHECK */
Index: fixincludes/tests/base/testing.h
===================================================================
--- fixincludes/tests/base/testing.h	(revision 107281)
+++ fixincludes/tests/base/testing.h	(working copy)
@@ -93,11 +93,16 @@
 #endif  /* MACHINE_NAME_CHECK */
 
 
+#if defined( SCO_STDC_CHECK )
+#if 1 || defined(grumble)
+#endif  /* SCO_STDC_CHECK */
+
+
 #if defined( STRICT_ANSI_NOT_CHECK )
 #if  !defined(__STRICT_ANSI__) 
 #if  !defined(__STRICT_ANSI__)
 #if  !defined(__STRICT_ANSI__)
-#if  !defined(__STRICT_ANSI__)/* not std C */
+#if 1/* not std C */
 int foo;
 
 #end-end-end-end-if :-)
Index: fixincludes/tests/base/unistd.h
===================================================================
--- fixincludes/tests/base/unistd.h	(revision 107281)
+++ fixincludes/tests/base/unistd.h	(working copy)
@@ -14,6 +14,15 @@
 #endif  /* ALPHA_SBRK_CHECK */
 
 
+#if defined( SCO_UNISTD_EXIT_CHECK )
+#if defined(__cplusplus) && !defined(_CFRONT_3_0) && !defined(__GNUC__)
+namespace std { extern "C++" void exit(int); } using std::exit;
+#else
+extern void	exit(int);
+#endif
+#endif  /* SCO_UNISTD_EXIT_CHECK */
+
+
 #if defined( SOLARIS_UNISTD_CHECK )
 #ident "@(#)unistd.h   1.33    95/08/28 SMI"
 extern int getpagesize();
Index: fixincludes/tests/base/wchar.h
===================================================================
--- fixincludes/tests/base/wchar.h	(revision 107281)
+++ fixincludes/tests/base/wchar.h	(working copy)
@@ -7,9 +7,16 @@
     This had to be done to correct non-standard usages in the
     original, manufacturer supplied header file.  */
 
+#ifndef FIXINC_WRAP_WCHAR_H_SCO_WRAP_STDARG_H
+#define FIXINC_WRAP_WCHAR_H_SCO_WRAP_STDARG_H 1
 
+#define __need___va_list
+#include <stdarg.h>
 
+
 #if defined( ALPHA_WCHAR_CHECK )
 extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__("wcstok_r");
 extern size_t   wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__("__wcsftime_isoc");
 #endif  /* ALPHA_WCHAR_CHECK */
+
+#endif  /* FIXINC_WRAP_WCHAR_H_SCO_WRAP_STDARG_H */
Index: fixincludes/tests/base/ansi/string.h
===================================================================
--- fixincludes/tests/base/ansi/string.h	(revision 0)
+++ fixincludes/tests/base/ansi/string.h	(revision 0)
@@ -0,0 +1,17 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/ansi/string.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( SCO_STRING_WCHAR_CHECK )
+#ifdef __cplusplus
+
+} /*extern "C"*/
+
+#endif  /* SCO_STRING_WCHAR_CHECK */
Index: fixincludes/tests/base/sys/mkdev.h
===================================================================
--- fixincludes/tests/base/sys/mkdev.h	(revision 0)
+++ fixincludes/tests/base/sys/mkdev.h	(revision 0)
@@ -0,0 +1,47 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/sys/mkdev.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( SCO_EFTSAFE2_CHECK )
+extern __inline__ __attribute ((__always_inline__))
+dev_t makedev(major_t maj, minor_t mn)
+{
+#if !defined(_STYPES)
+ 	int ver = NEWDEV;
+#else
+ 	int ver = OLDDEV;
+#endif
+ 	return __makedev (ver, maj, mn);
+}
+
+extern __inline__ __attribute ((__always_inline__))
+major_t major(dev_t dev)
+{
+#if !defined(_STYPES)
+ 	int ver = NEWDEV;
+#else
+ 	int ver = OLDDEV;
+#endif
+ 	return __major (ver, dev);
+}
+
+extern __inline__ __attribute ((__always_inline__))
+minor_t minor(dev_t dev)
+{
+#if !defined(_STYPES)
+ 	int ver = NEWDEV;
+#else
+ 	int ver = OLDDEV;
+#endif
+ 	return __minor (ver, dev);
+}
+
+#define ONBITSMAJOR	7
+#endif  /* SCO_EFTSAFE2_CHECK */
Index: fixincludes/tests/base/sys/param.h
===================================================================
--- fixincludes/tests/base/sys/param.h	(revision 0)
+++ fixincludes/tests/base/sys/param.h	(revision 0)
@@ -0,0 +1,18 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/sys/param.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( SCO_SYS_PARAM_CHECK )
+#define PATHSIZE 1024
+#ifndef MAXPATHLEN
+#define MAXPATHLEN PATHSIZE
+#endif
+
+#endif  /* SCO_SYS_PARAM_CHECK */
Index: fixincludes/tests/base/sys/regset.h
===================================================================
--- fixincludes/tests/base/sys/regset.h	(revision 107281)
+++ fixincludes/tests/base/sys/regset.h	(working copy)
@@ -10,17 +10,7 @@
 
 
 #if defined( SCO_REGSET_CHECK )
-union u_fps {
-    struct	rsfpstate
-    {
-       int whatever;
-    }
-};
-union _u_fps {
-    struct _rsfpstate
-    {
-       int whatever;
-    }
-};
+union u_fps { struct	rsfpstate { int whatever; } };
+union _u_fps { struct _rsfpstate { int whatever; } };
 
 #endif  /* SCO_REGSET_CHECK */
Index: fixincludes/tests/base/sys/sockio.h
===================================================================
--- fixincludes/tests/base/sys/sockio.h	(revision 0)
+++ fixincludes/tests/base/sys/sockio.h	(revision 0)
@@ -0,0 +1,23 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/sys/sockio.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( SCO_EFTSAFE3_CHECK )
+#ifndef __IOCTL_VERSIONED__
+#define __IOCTL_VERSIONED__
+#ifndef __cplusplus
+extern int _xioctl(int, int, int, void *);
+extern __inline__ __attribute ((__always_inline__)) int ioctl (int __a1, int __a2, ...)
+{
+blah(); blah();
+}
+#endif
+#endif /* !__IOCTL_VERSIONED__ */
+#endif  /* SCO_EFTSAFE3_CHECK */
Index: fixincludes/tests/base/sys/stat.h
===================================================================
--- fixincludes/tests/base/sys/stat.h	(revision 107281)
+++ fixincludes/tests/base/sys/stat.h	(working copy)
@@ -19,35 +19,6 @@
 #endif  /* RS6000_FCHMOD_CHECK */
 
 
-#if defined( SCO_STATIC_FUNC_CHECK )
-#ifdef __STDC__
-#if __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-static int	stat(const char *__f, struct stat *__p) {
-	return __stat32(__f, __p);
-}
-#if __cplusplus
- }
-#endif /* __cplusplus */
-
-#  else /* !__STDC__ THIS FAILS ON BSD SYSTEMS */
-#if __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-static int	stat(__f, __p)
-	char *__f;
-	struct stat *__p;
-{
-	return __stat32(__f, __p);
-}
-#if __cplusplus
- }
-#endif /* __cplusplus */
-#endif
-#endif  /* SCO_STATIC_FUNC_CHECK */
-
-
 #if defined( ULTRIX_STAT_CHECK )
 @(#)stat.h      6.1     (ULTRIX)
 #define S_IFPORT S_IFIFO
Index: fixincludes/tests/base/sys/types.h
===================================================================
--- fixincludes/tests/base/sys/types.h	(revision 107281)
+++ fixincludes/tests/base/sys/types.h	(working copy)
@@ -28,3 +28,8 @@
 
 #endif /* ushort_t */
 #endif  /* GNU_TYPES_CHECK */
+
+
+#if defined( SCO_VOLATILE_CHECK )
+typedef struct foo foo_t;
+#endif  /* SCO_VOLATILE_CHECK */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]