summaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-09 08:11:29 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-09 08:11:29 +0000
commitb23a8f1efb0662c44510c59229d658005b7638ff (patch)
treea5941150675febb03670bb47db59a660d40430f6 /fixincludes/inclhack.def
parent984ff9c079d345fc01c4c7abab82423a616fd3f4 (diff)
downloadgcc-b23a8f1efb0662c44510c59229d658005b7638ff.tar.gz
2008-06-09 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r136577 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@136579 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def1533
1 files changed, 160 insertions, 1373 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 6c21cb1775b..3143dea9c12 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -28,37 +28,40 @@ FIXINC_DEBUG = yes;
* building with g++ and -D_LARGE_FILES
*/
fix = {
- hackname = AAB_aix_stdio;
- files = stdio.h;
- select = "define fopen fopen64";
- mach = "*-*-aix*";
-
- c_fix = wrap;
-
- c_fix_arg = "";
-
- c_fix_arg = "\n"
- "#if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus\n"
- "#define __need__aix_stdio_h_fix\n"
- "#ifdef __need__aix_stdio_h_fix\n"
- "#undef fseeko\n"
- "#undef ftello\n"
- "#undef fgetpos\n"
- "#undef fsetpos\n"
- "#undef fopen\n"
- "#undef freopen\n"
- "/* Alias the symbols using asm */\n"
- "extern \"C\" {\n"
- "extern int fgetpos(FILE *, fpos64_t *) __asm__(\"fgetpos64\");\n"
- "extern FILE *fopen(const char *, const char *) __asm__(\"fopen64\");\n"
- "extern FILE *freopen(const char *, const char *, FILE *) __asm__(\"freopen64\");\n"
- "extern int fseeko(FILE *, off64_t, int) __asm__(\"fseeko64\");\n"
- "extern int fsetpos(FILE *, const fpos64_t *) __asm__(\"fsetpos64\");\n"
- "extern off64_t ftello(FILE *) __asm__(\"ftello64\");\n"
- "}\n"
- "#endif\n"
- "#endif\n";
- test_text = "";
+ hackname = AAB_aix_stdio;
+ files = stdio.h;
+ select = "define fopen fopen64";
+ mach = "*-*-aix*";
+ test-text = ''; /* no way to test */
+
+ c_fix = wrap;
+
+ c_fix_arg = "";
+
+ c_fix_arg = <<- _EOArg_
+
+ #if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus
+ #define __need__aix_stdio_h_fix
+ #ifdef __need__aix_stdio_h_fix
+ #undef fseeko
+ #undef ftello
+ #undef fgetpos
+ #undef fsetpos
+ #undef fopen
+ #undef freopen
+ /* Alias the symbols using asm */
+ extern "C" {
+ extern int fgetpos(FILE *, fpos64_t *) __asm__("fgetpos64");
+ extern FILE *fopen(const char *, const char *) __asm__("fopen64");
+ extern FILE *freopen(const char *, const char *, FILE *) __asm__("freopen64");
+ extern int fseeko(FILE *, off64_t, int) __asm__("fseeko64");
+ extern int fsetpos(FILE *, const fpos64_t *) __asm__("fsetpos64");
+ extern off64_t ftello(FILE *) __asm__("ftello64");
+ }
+ #endif
+ #endif
+
+ _EOArg_;
};
@@ -72,86 +75,86 @@ fix = {
files = architecture/ppc/math.h;
bypass = "powl";
replace = <<- _EndOfHeader_
-/* This file prototypes the long double functions available on Mac OS
- 10.3.9. */
-#ifndef __MATH__
-# undef __APPLE_CC__
-# define __APPLE_CC__ 1345
-# include_next <architecture/ppc/math.h>
-# undef __APPLE_CC__
-# define __APPLE_CC__ 1
-# ifndef __LIBMLDBL_COMPAT
-# ifdef __LONG_DOUBLE_128__
-# define __LIBMLDBL_COMPAT(sym) __asm("_" #sym "$LDBL128")
-# else
-# define __LIBMLDBL_COMPAT(sym)
-# endif /* __LONG_DOUBLE_128__ */
-# endif /* __LIBMLDBL_COMPAT */
-# ifdef __cplusplus
- extern "C" {
-# endif
- extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl);
- extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl);
- extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl);
- extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l);
- extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl);
- extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl);
- extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl);
- extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl);
- extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl);
- extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl);
- extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl);
- extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl);
- extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl);
- extern long double expl( long double ) __LIBMLDBL_COMPAT(expl);
- extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l);
- extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l);
- extern long double logl( long double ) __LIBMLDBL_COMPAT(logl);
- extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l);
- extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l);
- extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl);
- extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl);
- extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl);
- extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl);
- extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl);
- extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl);
- extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl);
- extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl);
- extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl);
- extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl);
- extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl);
- extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl);
- extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl);
- extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl);
- extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl);
- extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal);
- extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal);
- extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill);
- extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl);
- extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl);
- extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl);
- extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl);
- extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl);
- extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl);
- extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl);
- extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl);
- extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl);
- extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl);
- extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl);
- extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol);
- extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl);
- extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl);
- extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl);
- extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl);
- extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml);
- extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl);
- extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl);
- extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal);
-# ifdef __cplusplus
- }
-# endif
-#endif /* __MATH__ */
-_EndOfHeader_;
+ /* This file prototypes the long double functions available on Mac OS
+ 10.3.9. */
+ #ifndef __MATH__
+ # undef __APPLE_CC__
+ # define __APPLE_CC__ 1345
+ # include_next <architecture/ppc/math.h>
+ # undef __APPLE_CC__
+ # define __APPLE_CC__ 1
+ # ifndef __LIBMLDBL_COMPAT
+ # ifdef __LONG_DOUBLE_128__
+ # define __LIBMLDBL_COMPAT(sym) __asm("_" #sym "$LDBL128")
+ # else
+ # define __LIBMLDBL_COMPAT(sym)
+ # endif /* __LONG_DOUBLE_128__ */
+ # endif /* __LIBMLDBL_COMPAT */
+ # ifdef __cplusplus
+ extern "C" {
+ # endif
+ extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl);
+ extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl);
+ extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl);
+ extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l);
+ extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl);
+ extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl);
+ extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl);
+ extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl);
+ extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl);
+ extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl);
+ extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl);
+ extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl);
+ extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl);
+ extern long double expl( long double ) __LIBMLDBL_COMPAT(expl);
+ extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l);
+ extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l);
+ extern long double logl( long double ) __LIBMLDBL_COMPAT(logl);
+ extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l);
+ extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l);
+ extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl);
+ extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl);
+ extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl);
+ extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl);
+ extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl);
+ extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl);
+ extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl);
+ extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl);
+ extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl);
+ extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl);
+ extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl);
+ extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl);
+ extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl);
+ extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl);
+ extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl);
+ extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal);
+ extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal);
+ extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill);
+ extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl);
+ extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl);
+ extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl);
+ extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl);
+ extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl);
+ extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl);
+ extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl);
+ extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl);
+ extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl);
+ extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl);
+ extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl);
+ extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol);
+ extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl);
+ extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl);
+ extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl);
+ extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl);
+ extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml);
+ extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl);
+ extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl);
+ extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal);
+ # ifdef __cplusplus
+ }
+ # endif
+ #endif /* __MATH__ */
+ _EndOfHeader_;
};
@@ -202,10 +205,10 @@ fix = {
#define __FD_ZERO(fdsetp) \
do { \
int __d0, __d1; \
- __asm__ __volatile__("cld ; rep ; stosl" \
- : "=&c" (__d0), "=&D" (__d1) \
- : "a" (0), "0" (__FDSET_LONGS), \
- "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
+ __asm__ __volatile__("cld ; rep ; stosl" \
+ : "=&c" (__d0), "=&D" (__d1) \
+ : "a" (0), "0" (__FDSET_LONGS), \
+ "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
} while (0)
#endif
@@ -348,255 +351,6 @@ fix = {
extern int memcmp();
#endif /* __memory_h__ */
- _EndOfHeader;
-};
-
-
-/*
- * Completely replace <sys/varargs.h> with a file that includes gcc's
- * stdarg.h or varargs.h files as appropriate.
- */
-#ifdef SVR4
-fix = {
- hackname = AAB_svr4_no_varargs;
- files = sys/varargs.h;
- replace = "/* This file was generated by fixincludes. */\n"
- "#ifndef _SYS_VARARGS_H\n"
- "#define _SYS_VARARGS_H\n\n"
-
- "#ifdef __STDC__\n"
- "#include <stdarg.h>\n"
- "#else\n"
- "#include <varargs.h>\n"
- "#endif\n\n"
-
- "#endif /* _SYS_VARARGS_H */\n";
-};
-#endif
-
-
-/*
- * Completely replace <sys/byteorder.h> with a file that implements gcc's
- * optimized byteswapping. (The original probably implemented some
- * incompatible optimized byteswapping.)
- */
-fix = {
- hackname = AAB_svr4_replace_byteorder;
- mach = "*-*-sysv4*";
- mach = "i[34567]86-*-sysv5*";
- mach = "i[34567]86-*-sco3.2v5*";
- mach = "i[34567]86-*-udk*";
- mach = "i[34567]86-*-solaris2.[0-4]";
- mach = "powerpcle-*-solaris2.[0-4]";
- mach = "sparc-*-solaris2.[0-4]";
- mach = "i[34567]86-sequent-ptx*";
- files = sys/byteorder.h;
- replace = <<- _EndOfHeader_
- #ifndef _SYS_BYTEORDER_H
- #define _SYS_BYTEORDER_H
-
- /* Functions to convert `short' and `long' quantities from host byte order
- to (internet) network byte order (i.e. big-endian).
-
- Written by Ron Guilmette (rfg@ncd.com).
-
- This isn't actually used by GCC. It is installed by fixinc.svr4.
-
- For big-endian machines these functions are essentially no-ops.
-
- For little-endian machines, we define the functions using specialized
- asm sequences in cases where doing so yields better code (e.g. i386). */
-
- #if !defined (__GNUC__) && !defined (__GNUG__)
- #error You lose! This file is only useful with GNU compilers.
- #endif
-
- #ifndef __BYTE_ORDER__
- /* Byte order defines. These are as defined on UnixWare 1.1, but with
- double underscores added at the front and back. */
- #define __LITTLE_ENDIAN__ 1234
- #define __BIG_ENDIAN__ 4321
- #define __PDP_ENDIAN__ 3412
- #endif
-
- #ifdef __STDC__
- static __inline__ unsigned long htonl (unsigned long);
- static __inline__ unsigned short htons (unsigned int);
- static __inline__ unsigned long ntohl (unsigned long);
- static __inline__ unsigned short ntohs (unsigned int);
- #endif /* defined (__STDC__) */
-
- #if defined (__i386__)
-
- #ifndef __BYTE_ORDER__
- #define __BYTE_ORDER__ __LITTLE_ENDIAN__
- #endif
-
- /* Convert a host long to a network long. */
-
- /* We must use a new-style function definition, so that this will also
- be valid for C++. */
- static __inline__ unsigned long
- htonl (unsigned long __arg)
- {
- register unsigned long __result;
-
- __asm__ ("xchg%B0 %b0,%h0
- ror%L0 $16,%0
- xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
- return __result;
- }
-
- /* Convert a host short to a network short. */
-
- static __inline__ unsigned short
- htons (unsigned int __arg)
- {
- register unsigned short __result;
-
- __asm__ ("xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
- return __result;
- }
-
- #elif (defined (__ns32k__) || defined (__vax__) || defined (__arm__))
-
- #ifndef __BYTE_ORDER__
- #define __BYTE_ORDER__ __LITTLE_ENDIAN__
- #endif
-
- /* For other little-endian machines, using C code is just as efficient as
- using assembly code. */
-
- /* Convert a host long to a network long. */
-
- static __inline__ unsigned long
- htonl (unsigned long __arg)
- {
- register unsigned long __result;
-
- __result = (__arg >> 24) & 0x000000ff;
- __result |= (__arg >> 8) & 0x0000ff00;
- __result |= (__arg << 8) & 0x00ff0000;
- __result |= (__arg << 24) & 0xff000000;
- return __result;
- }
-
- /* Convert a host short to a network short. */
-
- static __inline__ unsigned short
- htons (unsigned int __arg)
- {
- register unsigned short __result;
-
- __result = (__arg << 8) & 0xff00;
- __result |= (__arg >> 8) & 0x00ff;
- return __result;
- }
-
- #else /* must be a big-endian machine */
-
- #ifndef __BYTE_ORDER__
- #define __BYTE_ORDER__ __BIG_ENDIAN__
- #endif
-
- /* Convert a host long to a network long. */
-
- static __inline__ unsigned long
- htonl (unsigned long __arg)
- {
- return __arg;
- }
-
- /* Convert a host short to a network short. */
-
- static __inline__ unsigned short
- htons (unsigned int __arg)
- {
- return __arg;
- }
-
- #endif /* big-endian */
-
- /* Convert a network long to a host long. */
-
- static __inline__ unsigned long
- ntohl (unsigned long __arg)
- {
- return htonl (__arg);
- }
-
- /* Convert a network short to a host short. */
-
- static __inline__ unsigned short
- ntohs (unsigned int __arg)
- {
- return htons (__arg);
- }
- #endif
- _EndOfHeader_;
-};
-
-
-/*
- * Cancel out ansi_compat.h on Ultrix. Replace it with an empty file.
- */
-fix = {
- hackname = AAB_ultrix_ansi_compat;
- files = ansi_compat.h;
- select = ULTRIX;
- replace = "/* This file intentionally left blank. */\n";
-};
-
-
-/*
- * The Ultrix 4.3 file limits.h is a symbolic link to sys/limits.h.
- * Replace limits.h with a file that includes sys/limits.h.
- */
-fix = {
- hackname = AAB_ultrix_limits;
- files = limits.h;
- mach = "*-*-ultrix4.3";
- replace = <<- _EndOfHeader_
- #ifndef _LIMITS_INCLUDED
- #define _LIMITS_INCLUDED
- #include <sys/limits.h>
- #endif /* _LIMITS_INCLUDED */
- _EndOfHeader_;
-};
-
-
-/*
- * The ULTRIX 4.3 version of memory.h duplicates definitions
- * present in strings.h. Replace memory.h with a file that includes
- * strings.h to prevent problems from multiple inclusion.
- */
-fix = {
- hackname = AAB_ultrix_memory;
- files = memory.h;
- mach = "*-*-ultrix4.3";
- replace = <<- _EndOfHeader_
- #ifndef _MEMORY_INCLUDED
- #define _MEMORY_INCLUDED
- #include <strings.h>
- #endif /* _MEMORY_INCLUDED */
- _EndOfHeader_;
-};
-
-
-/*
- * The Ultrix 4.3 file string.h is a symbolic link to strings.h.
- * Replace string.h link with a file that includes strings.h to prevent
- * problems from multiple inclusion.
- */
-fix = {
- hackname = AAB_ultrix_string;
- files = string.h;
- mach = "*-*-ultrix4.3";
- replace = <<- _EndOfHeader_
- #ifndef _STRING_INCLUDED
- #define _STRING_INCLUDED
- #include <strings.h>
- #endif /* _STRING_INCLUDED */
_EndOfHeader_;
};
@@ -1381,11 +1135,11 @@ fix = {
c_fix = format;
c_fix_arg = "%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)";
test_text = <<-EOT
-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
- && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
-# define __USE_EXTERN_INLINES 1
-#endif
-EOT;
+ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
+ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
+ # define __USE_EXTERN_INLINES 1
+ #endif
+ EOT;
};
@@ -1400,10 +1154,10 @@ fix = {
c_fix = format;
c_fix_arg = "%1 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)\n%2";
test_text = <<-EOT
-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
-# define __USE_EXTERN_INLINES 1
-#endif
-EOT;
+ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+ # define __USE_EXTERN_INLINES 1
+ #endif
+ EOT;
};
@@ -1493,39 +1247,39 @@ fix = {
"s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/";
test_text = <<- _EOText_
-#define PTHREAD_MUTEX_INITIALIZER \\
- { { 0, } }
-#ifdef __USE_GNU
-# if __WORDSIZE == 64
-# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
- { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
-# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
- { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
-# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
- { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
-# else
-# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
- { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
-# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
- { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
-# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
- { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
-# endif
-#endif
-# define PTHREAD_RWLOCK_INITIALIZER \\
- { { 0, } }
-# ifdef __USE_GNU
-# if __WORDSIZE == 64
-# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
- { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \\
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-# else
-# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
- { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-# endif
-# endif
-#define PTHREAD_COND_INITIALIZER { { 0, } }
-_EOText_;
+ #define PTHREAD_MUTEX_INITIALIZER \\
+ { { 0, } }
+ #ifdef __USE_GNU
+ # if __WORDSIZE == 64
+ # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
+ # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
+ # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
+ # else
+ # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
+ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
+ # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
+ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
+ # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
+ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
+ # endif
+ #endif
+ # define PTHREAD_RWLOCK_INITIALIZER \\
+ { { 0, } }
+ # ifdef __USE_GNU
+ # if __WORDSIZE == 64
+ # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \\
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
+ # else
+ # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
+ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
+ # endif
+ # endif
+ #define PTHREAD_COND_INITIALIZER { { 0, } }
+ _EOText_;
};
@@ -2423,56 +2177,6 @@ fix = {
};
-/*
- * Fix libc1 _G_va_list definition, used in declarations of several
- * more-or-less standard functions, for example vasprintf.
- */
-fix = {
- hackname = libc1_G_va_list;
- files = _G_config.h;
- mach = '*-*-linux*libc1';
- select = 'typedef void \* _G_va_list;';
- c_fix = format;
- c_fix_arg = "typedef __builtin_va_list _G_va_list;";
- test_text = 'typedef void * _G_va_list;';
-};
-
-
-/*
- * GNU libc1 string.h does not prototype memcpy and memcmp for gcc
- * versions > 1. This fix will open up the declaration for all
- * versions of GCC and for g++.
- */
-fix = {
- hackname = libc1_ifdefd_memx;
-
- /* The string.h result is overwritten by AAB_ultrix_string when doing
- "make check" and will fail. Therefore, we add the following kludgery
- to insert the test_text into the special testing header. :-} */
- files = testing.h;
- files = string.h;
-
- c_fix = format;
- select = "' is a built-in function for gcc 2\\.x\\. \\*/";
- bypass = __cplusplus;
- c_fix_arg = "%1";
- c_fix_arg =
- '/\* `mem...\' is a built-in function for gcc 2\.x\. \*/' "\n"
- '#if defined\(__STDC__\) && __GNUC__ < 2' "\n"
- "(/\\* .* \\*/\n"
- "extern [a-z_]+ mem.*(\n[^#].*)*;)\n"
- "#endif";
-
- test_text =
- "/* \\`memcpy' is a built-in function for gcc 2.x. */\n"
- "#if defined(__STDC__) && __GNUC__ < 2\n"
- "/* Copy N bytes of SRC to DEST. */\n"
- "extern __ptr_t memcpy __P ((__ptr_t __dest, __const __ptr_t __src,\n"
- " size_t __n));\n"
- "#endif";
-};
-
-
/* The /usr/include/sys/ucontext.h on ia64-*linux-gnu systems defines
* an _SC_GR0_OFFSET macro using an idiom that isn't a compile time
* constant on recent versions of g++.
@@ -2490,20 +2194,6 @@ fix = {
};
-/*
- * Apparently some SVR4 systems typedef longlong_t to long ?
- */
-#ifdef SVR4
-fix = {
- hackname = longlong_t;
- select = "typedef[ \t]+(unsigned[ \t]+)?long[ \t]+(u_)?longlong_t";
- c_fix = format;
- c_fix_arg = "typedef %1long long %2longlong_t";
- test_text = "typedef long longlong_t\n"
- "typedef unsigned long u_longlong_t";
-};
-#endif
-
/*
* Remove header file warning from sys/time.h. Autoconf's
* AC_HEADER_TIME recommends to include both sys/time.h and time.h
@@ -2655,28 +2345,6 @@ fix = {
/*
- * Fix nested comments in Motorola's <limits.h> and <sys/limits.h>
- */
-fix = {
- hackname = nested_motorola;
- mach = "m68k-motorola-sysv*";
- files = sys/limits.h;
- files = limits.h;
- select = "max # bytes atomic in write|error value returned by Math lib";
-
- sed = "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*"
- "/\\* max # bytes atomic in write to a\\)$@\\1 */@";
- sed = "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)"
- "\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@";
-
- test_text =
- "#undef PIPE_BUF /* max # bytes atomic in write to a\n"
- "\t\t/* PIPE */\n"
- "/*#define\tHUGE_VAL\t3.9e+9 /*error value returned by Math lib*/";
-};
-
-
-/*
* Fixing nested comments in ISC <sys/limits.h>
*/
fix = {
@@ -2920,30 +2588,6 @@ fix = {
};
/*
- * On DYNIX/ptx, sys/mc_param.h has an embedded asm for the cpuid instruction
- * on the P5. This is not used by anything else so we ifdef it out.
- * Current GCC doesn't seem to complain about the asm, though.
- */
-#ifdef PTX
-fix = {
- hackname = ptx_sys_mc_param_h;
- files = sys/mc_param.h;
- sed = "/__asm/,/}/{"
- "/__asm/i\\\n"
- "#if !defined (__GNUC__) && !defined (__GNUG__)\n"
- "/}/a\\\n"
- "#endif\n"
- "}";
- test_text = "__asm\n"
- "int _CPUID()\n"
- "{\n"
- " non-GNU assembly here\n"
- "}";
-};
-#endif
-
-
-/*
* Fix return type of fread and fwrite on sysV68
*/
fix = {
@@ -3065,89 +2709,6 @@ fix = {
/*
- * On SCO OpenServer prior to 5.0.7UP1, <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";
- 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";
-};
-
-
-/*
- * 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.
- */
-fix = {
- hackname = sco_static_func;
- files = sys/stat.h;
- mach = "i?86-*-sco3.2*";
- select = "^static int";
-
- sed = "/^static int/i\\\n"
- "#if __cplusplus\\\n"
- "extern \"C\" {\\\n"
- "#endif /* __cplusplus */";
-
- sed = "/^}$/a\\\n"
- "#if __cplusplus\\\n"
- " }\\\n"
- "#endif /* __cplusplus */";
-
- 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"
-
- "static int\tstat(__f, __p)\n"
- "\tchar *__f;\n"
- "\tstruct stat *__p;\n"
- "{\n"
- "\treturn __stat32(__f, __p);\n"
- "}\n"
- "#endif";
-};
-
-
-/*
- * Fix prototype declaration of utime in sys/times.h.
- * In 3.2v4.0 the const is missing.
- */
-fix = {
- hackname = sco_utime;
- files = sys/times.h;
- mach = "i?86-*-sco3.2v4*";
-
- select = '\(const char \*, struct utimbuf \*\);';
- c_fix = format;
- c_fix_arg = '(const char *, const struct utimbuf *);';
-
- test_text = "extern int utime(const char *, struct utimbuf *);";
-};
-
-/*
* 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.
@@ -3280,26 +2841,6 @@ fix = {
};
/*
- * Sun Solaris 2.5.1, 2.6 defines PTHREAD_{MUTEX|COND}_INITIALIZER
- * incorrectly, so we replace them with versions that correspond to
- * the definition. We also explicitly name this fix "1" and the next
- * fix "2" because this one does not deal with the last field. This
- * fix needs to run before the next.
- */
-fix = {
- hackname = solaris_mutex_init_1;
- select = '@\(#\)pthread.h' "[ \t]+1.1[0-9][ \t]+9[567]/[0-9/]+ SMI";
- files = pthread.h;
- sed = "/define[ \t]*PTHREAD_MUTEX_INI/s/{0, 0,/{{{0}, 0}, {{{0}}},/\n"
- "/define[ \t]*PTHREAD_COND_INI/s/{0,/{{{0},0},/";
- test_text =
- '#ident "@(#)pthread.h 1.16 97/05/05 SMI"'"\n"
- "#define PTHREAD_MUTEX_INITIALIZER\t{0, 0, 0}\n"
- "#define PTHREAD_COND_INITIALIZER\t{0, 0} /* */\n";
-};
-
-
-/*
* Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing
* "0" for the last field of the pthread_mutex_t structure, which is
* of type upad64_t, which itself is typedef'd to int64_t, but with
@@ -3418,26 +2959,6 @@ fix = {
/*
- * 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.
@@ -3457,43 +2978,6 @@ fix = {
/*
- * 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.
- * Include <wchar.h> early to avoid this issue, as is done on Solaris 2.6
- * and up.
- */
-fix = {
- hackname = solaris_widec;
- files = widec.h;
- mach = '*-*-solaris2.[0-5]';
- mach = '*-*-solaris2.[0-5].*';
- bypass = "include.*wchar\\.h";
- select = "#include <euc.h>";
- c_fix = format;
- c_fix_arg = "%0\n#include <wchar.h>";
- test_text = "#include <euc.h>";
-};
-
-
-/*
* a missing semi-colon at the end of the statsswtch structure definition.
*/
fix = {
@@ -3894,98 +3378,6 @@ fix = {
/*
- * Conditionalize some of <sys/endian.h> on __GNUC__ and __GNUG__.
- * On some systems (UnixWare 2, UnixWare 7), the file is byteorder.h
- * but we still "hijack" it and redirect it to the GNU byteorder.h..
- */
-#ifdef SVR5
-fix = {
- hackname = svr4_endian;
- files = sys/endian.h;
-#ifdef LATER
- /*
- * since we emit our own sys/byteorder.h,
- * this fix can never be applied to that file.
- */
- files = sys/byteorder.h;
-#endif
- bypass = '__GNUC__';
-
- sed = "/#\tifdef\t__STDC__/i\\\n"
- "# if !defined (__GNUC__) && !defined (__GNUG__)\n";
-
- sed = "/#\t\tinclude\t<sys\\/byteorder.h>/s/\t\t/ /";
-
- sed = "/# include\t<sys\\/byteorder.h>/i\\\n"
- "# endif /* !defined (__GNUC__) && !defined (__GNUG__) */\n";
-};
-#endif /* SVR5 */
-
-
-/*
- * Remove useless extern keyword from struct forward declarations
- * in <sys/stream.h> and <sys/strsubr.h>
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_extern_struct;
- files = sys/stream.h;
- files = sys/strsubr.h;
- select = 'extern struct [a-z_]*;';
- sed = 's/extern struct \([a-z][a-z_]*\)/struct \1/';
-};
-#endif
-
-/*
- * Fix declarations of `ftw' and `nftw' in <ftw.h>. On some/most SVR4
- * systems the file <ftw.h> contains extern declarations of these
- * functions followed by explicitly `static' definitions of these
- * functions... and that's not allowed according to ANSI C. (Note
- * however that on Solaris, this header file glitch has been pre-fixed by
- * Sun. In the Solaris version of <ftw.h> there are no static
- * definitions of any function so we don't need to do any of this stuff
- * when on Solaris.
- */
-#ifdef SVR4
-#ifndef SOLARIS
-fix = {
- hackname = svr4_ftw;
- files = ftw.h;
- select = '^extern int ftw\(const';
-
- sed = '/^extern int ftw(const/i' "\\\n"
- "#if !defined(_STYPES)\\\n"
- "static\\\n"
- "#else\\\n"
- "extern\\\n"
- "#endif";
- sed = 's/extern \(int ftw(const.*\)$/\1/';
- sed = "/^extern int nftw/i\\\n"
- "#if defined(_STYPES)\\\n"
- "static\\\n"
- "#else\\\n"
- "extern\\\n"
- "#endif";
- sed = 's/extern \(int nftw.*\)$/\1/';
- sed = "/^extern int ftw(),/c\\\n"
- "#if !defined(_STYPES)\\\n"
- "static\\\n"
- "#else\\\n"
- "extern\\\n"
- "#endif\\\n"
- " int ftw();\\\n"
- "#if defined(_STYPES)\\\n"
- "static\\\n"
- "#else\\\n"
- "extern\\\n"
- "#endif\\\n"
- " int nftw();";
-};
-#endif
-#endif
-
-
-/*
* Fix broken decl of getcwd present on some svr4 systems.
*/
fix = {
@@ -4003,135 +3395,6 @@ fix = {
/*
- * Wrap some files on System V r4 and DYNIX/ptx systems with
- * #ifdef _KERNEL, presumably to prevent kernel headers from
- * leaking into userspace. This may not be necessary at all,
- * but it was in the old scripts, so it seems safest to keep it for now.
- */
-fix = {
- /* Can't name this with _kernel, or the test case will hit the bypass! */
- hackname = svr4_krnl;
- /* Since I'm rather unsure about the validity of this, limit it
- * to the specific systems it was operating on before. It should
- * also be bypassed for i?86-*-sysv4.3uw2, by that rule, but I didn't
- * see an easy way to do that. Hopefully it will be harmless
- * in any case. -- Nathanael */
- mach = '*-*-sysv4*';
- mach = 'i?86-sequent-ptx*';
- files = fs/rfs/rf_cache.h;
- files = sys/erec.h;
- files = sys/err.h;
- files = sys/char.h;
- files = sys/getpages.h;
- files = sys/map.h;
- files = sys/cmn_err.h;
- files = sys/kdebugger.h;
-
- /* This bypass will match _KERNEL, __KERNEL, __KERNEL__, etc.
- * It will also match SVR4_KERNEL_CHECK, which means that the
- * testsuite case will always be bypassed. Which is fine with me. */
- bypass = '_KERNEL';
-
- c_fix = wrap;
- c_fix_arg = "#ifdef _KERNEL\n";
- c_fix_arg = "#endif /* _KERNEL */\n";
-
- /* There's no reasonable test for this given that we don't know exactly
- * what problem inspired it in the first place. */
- test_text = "";
-};
-
-
-/*
- * Delete any #defines of `__i386' which may be present in <ieeefp.h>. They
- * tend to conflict with the compiler's own definition of this symbol. (We
- * will use the compiler's definition.)
- * Likewise __sparc, for Solaris, and __i860, and a few others
- * (guessing it is necessary for all of them).
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_mach_defines;
- files = ieeefp.h;
- select = "#define[ \t]*__(i386|mips|sparc|m88k|m68k)[ \t]";
- sed = "/#define[ \t]*__\\(i386|mips|sparc|m88k|m68k\\)[ \t]/d";
-};
-#endif
-
-
-/*
- * Fix declarations of `makedev', `major', and `minor' in <sys/mkdev.h>.
- * They are declared as non-static then immediately redeclared as static.
- */
-#ifdef SVR5
-fix = {
- hackname = svr4_mkdev;
- files = sys/mkdev.h;
- select = '^static';
-
- sed = "/^dev_t makedev(/s/^/static /";
- sed = "/^major_t major(/s/^/static /";
- sed = "/^minor_t minor(/s/^/static /";
-};
-#endif /* SVR5 */
-
-
-/*
- * Fix reference to NC_NPI_RAW in <sys/netcspace.h>.
- * Also fix types of array initializers.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_netcspace;
- files = sys/netcspace.h;
- select = 'NC_NPI_RAW';
- sed = 's/NC_NPI_RAW/NC_TPI_RAW/g';
- sed = 's/NC_/(unsigned long) NC_/';
-};
-#endif
-
-/*
- * Fix reference to NMSZ in <sys/adv.h>.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_nmsz;
- files = sys/adv.h;
- select = '\[NMSZ\]';
- sed = 's/\[NMSZ\]/\[RFS_NMSZ\]/g';
-};
-#endif
-
-
-/*
- * Some SVR4 systems supposedly use these non-ANSI preprocessor directives.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_preproc_lint_on;
- select = '#lint\(on\)';
- c_fix = format;
- c_fix_arg = 'defined(lint)';
- test_text = "#if #lint(on)";
-};
-fix = {
- hackname = svr4_preproc_lint_off;
- select = '#lint\(off\)';
- c_fix = format;
- c_fix_arg = '!defined(lint)';
- test_text = "#if #lint(off)";
-};
-fix = {
- hackname = svr4_preproc_machine;
- select = '#(machine|system|cpu)\(([^)]*)\)';
- c_fix = format;
- c_fix_arg = 'defined(__%1__)';
- test_text = "#if #machine(i386) || #system(vax) || #cpu(sparc)";
-};
-#endif
-
-
-/*
* Fix broken decl of profil present on some svr4 systems.
*/
fix = {
@@ -4153,75 +3416,6 @@ fix = {
/*
- * Convert functions to prototype form, and fix arg names in <sys/stat.h>.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_proto_form;
- files = sys/stat.h;
- select = 'const extern';
-
- sed = "/^stat([ \t]*[^c]/ {\nN\nN\n"
- "s/(.*)\\n/( /\n"
- "s/;\\n/, /\n"
- "s/;$/)/\n" "}";
-
- sed = "/^lstat([ \t]*[^c]/ {\nN\nN\n"
- "s/(.*)\\n/( /\n"
- "s/;\\n/, /\n"
- "s/;$/)/\n" "}";
-
- sed = "/^fstat([ \t]*[^i]/ {\nN\nN\n"
- "s/(.*)\\n/( /\n"
- "s/;\\n/, /\n"
- "s/;$/)/\n" "}";
-
- sed = "/^mknod([ \t]*[^c]/{\nN\nN\nN\n"
- "s/(.*)\\n/( /\n"
- "s/;\\n/, /g\n"
- "s/;$/)/\n" "}";
-
- sed = "1,$s/\\([^A-Za-z]\\)path\\([^A-Za-z]\\)/\\1__path\\2/g";
- sed = "1,$s/\\([^A-Za-z]\\)buf\\([^A-Za-z]\\)/\\1__buf\\2/g";
- sed = "1,$s/\\([^A-Za-z]\\)fd\\([^A-Za-z]\\)/\\1__fd\\2/g";
- sed = "1,$s/ret\\([^u]\\)/__ret\\1/g";
- sed = "1,$s/\\([^_]\\)mode\\([^_]\\)/\\1__mode\\2/g";
- sed = "1,$s/\\([^_r]\\)dev\\([^_]\\)/\\1__dev\\2/g";
-};
-#endif
-
-/*
- * Add a prototyped declaration of mmap to <sys/mman.h>.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_proto_mmap;
- files = sys/mman.h;
- select = '^extern caddr_t mmap();$';
- sed = '/^extern caddr_t mmap();$/c' "\\\n"
- "#ifdef __STDC__\\\n"
- "extern caddr_t mmap (caddr_t, size_t, int, int, int, off_t);\\\n"
- "#else /* !defined(__STDC__) */\\\n"
- "extern caddr_t mmap ();\\\n"
- "#endif /* !defined(__STDC__) */\\\n";
-};
-#endif
-
-/*
- * Add a #define of _SIGACTION_ into <sys/signal.h>.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_sigaction;
- files = sys/signal.h;
- sed = "/^struct sigaction {/i\\\n"
- "#define _SIGACTION_";
- sed = 's/(void *(\*)())/(void (*)(int))/';
-};
-#endif
-
-
-/*
* Correct types for signal handler constants like SIG_DFL; they might be
* void (*) (), and should be void (*) (int). C++ doesn't like the
* old style.
@@ -4236,18 +3430,6 @@ fix = {
"#define SIG_IGN (void (*)())0\n";
};
-/*
- * Put storage class at start of decl, to avoid warning.
- */
-#ifdef SVR4
-fix = {
- hackname = svr4_storage_class;
- files = rpc/types.h;
- select = 'const extern';
- sed = 's/const extern/extern const/g';
-};
-#endif
-
/*
* Some SysV r4 systems, including Sequent's DYNIX/ptx, use the local
@@ -4279,20 +3461,6 @@ fix = {
/*
- * Like svr4_mach_defines, but with newfangled syntax.
- * Source lines are of #define __i386 #machine(i386). Delete them.
- */
-#ifdef SVR5
-fix = {
- hackname = svr5_mach_defines;
- files = ieeefp.h;
- select = "#define[ \t]*__i386.*\(i386\)";
- sed = "/#define[ \t]*__i386.*/d";
-};
-#endif /* SVR5 */
-
-
-/*
* Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
* in string.h on sysV68
* Correct the return type for strlen in string.h on Lynx.
@@ -4393,36 +3561,6 @@ fix = {
/*
- * function parameter to atexit is missing "void" on VAX Ultrix 4.3.
- */
-fix = {
- hackname = ultrix_atexit_param;
- files = stdlib.h;
- select = 'atexit\(.*\(\)';
-
- c_fix = format;
- c_fix_arg = "atexit( void (*__func)( void )";
-
- test_text = "int atexit( void (*__func)() );\n";
-};
-
-
-/*
- * parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R.
- */
-fix = {
- hackname = ultrix_atof_param;
- files = math.h;
- select = "atof\\([ \t]*char";
-
- c_fix = format;
- c_fix_arg = "atof(const char";
-
- test_text = "extern double atof( char *__nptr);\n";
-};
-
-
-/*
* parameters not const on DECstation Ultrix V4.0 and OSF/1.
*/
fix = {
@@ -4467,322 +3605,6 @@ fix = {
/*
- * parameters not const on Ultrix V4.3.
- */
-fix = {
- hackname = ultrix_const3;
- files = stdio.h;
- select = 'fdopen\( .*, char \*';
-
- c_fix = format;
- c_fix_arg = "%1 const %3 *__";
- c_fix_arg = "([ \t*](fdopen)\\(.*)"
- "[ \t]+(char|void) \\*__";
-
- test_text =
- "extern FILE * fdopen( int __filedes, char *__type );\n";
-};
-
-
-/*
- * Ultrix V4.[35] puts the declaration of uname before the definition
- * of struct utsname, so the prototype (added by fixproto) causes havoc.
- */
-fix = {
- hackname = ultrix_fix_fixproto;
- files = sys/utsname.h;
- select = ULTRIX;
-
- c_fix = format;
- c_fix_arg = "struct utsname;\n%0";
- c_fix_arg = "^[ \t]*extern[ \t]*int[ \t]*uname\\(\\);";
-
- test_text =
- "/* ULTRIX's uname */\nextern\tint\tuname();";
-};
-
-
-/*
- * Check for bad #ifdef line (in Ultrix 4.1)
- */
-fix = {
- hackname = ultrix_ifdef;
- select = "^#ifdef KERNEL[ \t]+&&";
- files = sys/file.h;
-
- c_fix = format;
- c_fix_arg = "#if defined(KERNEL) &&";
-
- test_text =
- "#ifdef KERNEL\t&& defined( mumbojumbo )\nint oops;\n#endif";
-};
-
-
-/*
- * Add once-only latch to Ultrix V4.3 locale.h.
- */
-fix = {
- hackname = ultrix_locale;
- files = locale.h;
- select = "@\\(#\\)locale\\.h.*6\\.1.*\\(ULTRIX\\)";
- c_fix = wrap;
- test_text =
- "@(#)locale.h 6.1 (ULTRIX)\n";
-};
-
-
-/*
- * Strip "|| CC$gfloat" from Ultrix math headers.
- */
-fix = {
- hackname = ultrix_math_ifdef;
- files = sys/limits.h;
- files = float.h;
- files = math.h;
- select = "^(#if.*)\\|\\|[ \t]+CC\\$[a-z]+";
- c_fix = format;
- c_fix_arg = "%1";
-
- test_text = '#if defined(__GFLOAT) || CC\$gfloat';
-};
-
-
-/*
- * Avoid nested comments on Ultrix 4.3.
- */
-fix = {
- hackname = ultrix_nested_ioctl;
- files = sys/ioctl.h;
- select = "^/\\* #define SIOCSCREEN";
- sed = "/^\\/\\* #define SIOCSCREEN/s@/\\* screend@*//* screend@";
- test_text =
- "/* #define SIOCSCREENON _IOWR('i', 49, int)"
- "/* screend, net/gw_screen.h */\n";
-};
-
-
-fix = {
- hackname = ultrix_nested_svc;
- files = rpc/svc.h;
- select = "^ \\*[ \t]*int protocol; */\\*";
- sed = "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@";
- test_text =
- " *\tint protocol; /* like TCP or UDP\n";
-};
-
-
-/*
- * Add missing prototype for lstat and define for S_ISLNK
- * in Ultrix V4.3 sys/stat.h.
- */
-fix = {
- hackname = ultrix_stat;
- files = sys/stat.h;
- select = "@\\(#\\)stat\\.h.*6\\.1.*\\(ULTRIX\\)";
- sed = "/^#define[ \t]S_IFPORT[ \t]*S_IFIFO$/a\\\n"
- "\\\n"
- "/* macro to test for symbolic link */\\\n"
- "#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)\\\n"
- "\n";
- sed = "/^[ \t]*fstat(),$/a\\\n"
- "\tlstat(),\n";
- test_text =
- "@(#)stat.h 6.1 (ULTRIX)\n"
- "#define S_IFPORT S_IFIFO\n"
- "\tfstat(),\n/* THE INSERTION LINE FAILS ON BSD SYSTEMS */";
-};
-
-
-/*
- * Check for superfluous `static' (in Ultrix 4.2)
- * On Ultrix 4.3, includes of other files (r3_cpu.h,r4_cpu.h) is broken.
- */
-fix = {
- hackname = ultrix_static;
- files = machine/cpu.h;
- select = '#include "r[34]_cpu';
- sed = "s/^static struct tlb_pid_state/struct tlb_pid_state/";
- sed = 's/^#include "r3_cpu\.h"$/#include <machine\/r3_cpu\.h>/';
- sed = 's/^#include "r4_cpu\.h"$/#include <machine\/r4_cpu\.h>/';
- test_text =
- "static struct tlb_pid_state {\n"
- "#include \"r3_cpu.h\"\n";
-};
-
-
-/*
- * Add missing declarations to Ultrix V4.3 stdlib.h.
- */
-fix = {
- hackname = ultrix_stdlib;
- files = stdlib.h;
- select = "@\\(#\\)stdlib\\.h.*6\\.1.*\\(ULTRIX\\)";
-
- sed = "/^char.*getenv( const char .* );.*$/a\\\n"
- "int\t\tsetenv( const char *__name, const char *__val, int __ovrwrt );\\\n"
- "void\t\tunsetenv( const char *__name );\\\n"
- "int\t\tputenv( char *__s );\n";
-
- sed = "/^char.*getenv();.*$/a\\\n"
- "int\tsetenv();\\\n"
- "void\tunsetenv();\\\n"
- "int\tputenv();\n";
-
- test_text =
- "@(#)stdlib.h 6.1 (ULTRIX)\n"
- "char * getenv( const char *__name );\n"
- "char *getenv();\n";
-};
-
-
-/*
- * Add once-only latch to Ultrix V4.3 strings.h.
- */
-fix = {
- hackname = ultrix_strings;
- files = strings.h;
- select = "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)";
- c_fix = wrap;
- test_text =
- "@(#)strings.h 6.1 (ULTRIX)\n";
-};
-
-
-/*
- * Add missing declarations to Ultrix V4.3 strings.h.
- */
-fix = {
- hackname = ultrix_strings2;
- files = strings.h;
- select = "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)";
-
- sed = "/^.*strncmp( const .* );.*/a\\\n"
- "\\\n"
- "extern int\\\n"
- "\tstrcasecmp( const char *__s1, const char *__s2),\\\n"
- "\tstrncasecmp( const char *__s1, const char *__s2, size_t __n );\n";
-
- sed = "/^.*strncmp();.*/a\\\n"
- "extern int\\\n"
- "\tstrcasecmp(),\\\n"
- "\tstrncasecmp();\n";
-
- test_text =
- "@(#)strings.h 6.1 (ULTRIX)\n"
- "\tstrncmp( const char *__s1, const char *__s2, size_t __n );\n"
- "\tstrncmp();\n";
-};
-
-
-/*
- * Add missing declarations to Ultrix V4.3 sys/time.h.
- */
-fix = {
- hackname = ultrix_sys_time;
- files = sys/time.h;
- select = "@\\(#\\)time\\.h.*6\\.1.*\\(ULTRIX\\)";
-
- sed = "/^extern.*time_t.*time( time_t .* );.*$/a\\\n"
- "\\\n"
- "extern int adjtime(struct timeval *, struct timeval *);\\\n"
- "extern int getitimer(int, struct itimerval *);\\\n"
- "extern int setitimer(int, struct itimerval *, struct itimerval *);\\\n"
- "extern int gettimeofday(struct timeval *, struct timezone *);\\\n"
- "extern int settimeofday(struct timeval *, struct timezone *);\\\n"
- "extern void profil(const void *, size_t, size_t, unsigned int);\\\n"
- "extern int stime(const time_t *);\\\n"
- "extern int utimes(const char *, const struct timeval[2]);\\\n"
- "extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);\n";
-
- sed = "/^extern.*double.*difftime();.*$/a\\\n"
- "extern\tint adjtime();\\\n"
- "extern\tint getitimer();\\\n"
- "extern\tint setitimer();\\\n"
- "extern\tint gettimeofday();\\\n"
- "extern\tint settimeofday();\\\n"
- "extern\tvoid profil();\\\n"
- "extern\tint stime();\\\n"
- "extern\tint utimes();\\\n"
- "extern\tint select();\n";
-
- test_text =
- "@(#)time.h 6.1 (ULTRIX)\n"
- "extern time_t time( time_t *__tloc );\n"
- "extern double difftime();\n";
-};
-
-
-/*
- * Add missing declarations to Ultrix V4.3 unistd.h.
- */
-fix = {
- hackname = ultrix_unistd;
- files = unistd.h;
- select = "@\\(#\\)unistd\\.h.*6\\.1.*\\(ULTRIX\\)";
-
- sed = "/^[ \t]*getgroups(),.*$/a\\\n"
- "\tgetpagesize(),\n";
-
- sed = "/^[ \t]*fork(),.*$/a\\\n"
- "\tvfork(),\n";
-
- test_text =
- "@(#)unistd.h 6.1 (ULTRIX)\n"
- "\tgetgroups(),\n"
- "\tfork(),\n";
-};
-
-
-/*
- * On Cray Unicos/Mk some standard headers use the C99 keyword "restrict"
- * which must be replaced by __restrict__ for GCC.
- */
-fix = {
- hackname = unicosmk_restrict;
- files = stdio.h;
- files = stdlib.h;
- files = wchar.h;
- mach = "*-*-unicosmk*";
- select = "(\\*[ \t]*)restrict([ \t]+)";
-
- c_fix = format;
- c_fix_arg = "%1__restrict__%2";
-
- test_text = "void f (char * restrict x);";
-};
-
-/*
- * If arpa/inet.h prototypes are incompatible with the ones we just
- * installed in <sys/byteorder.h>, just remove the protos.
- * Because of this close association, this patch must be applied only
- * on those systems where the replacement byteorder header is installed.
- */
-fix = {
- hackname = uw7_byteorder_fix;
- files = arpa/inet.h;
- select = "in_port_t";
- test = "-f sys/byteorder.h";
-#ifndef SVR5
- mach = "*-*-sysv4*";
- mach = "i?86-*-sysv5*";
- mach = "i?86-*-udk*";
- mach = "i?86-*-solaris2.[0-4]";
- mach = "powerpcle-*-solaris2.[0-4]";
- mach = "sparc-*-solaris2.[0-4]";
-#endif /* SVR5 */
-
- c_fix = format;
- c_fix_arg = "";
- c_fix_arg = "^extern.*[ \t](htons|ntohs).*\\(in_port_t\\).*;";
-
- test_text = "extern in_port_t\thtons __P((in_port_t));\n"
- "extern in_port_t\tntohs __P((in_port_t));"
- "`[ ! -d $DESTDIR/sys ] && mkdir $DESTDIR/sys\n"
- "echo '/* DUMMY */' >> sys/byteorder.h`";
-};
-
-
-/*
* Fix definitions of macros used by va-i960.h in VxWorks header file.
*/
fix = {
@@ -4928,41 +3750,6 @@ fix = {
};
-/*
- * WindISS math.h headers include bogus extern declarations of
- * numerous math functions that conflict with libstdc++-v3.
- */
-fix = {
- hackname = windiss_math1;
- files = math.h;
- mach = "*-*-windiss";
- sed = "s|inline long double cosl.*|#ifndef __GNUC__|";
-
- test_text = "inline long double cosl(long double);";
-};
-
-fix = {
- hackname = windiss_math2;
- files = math.h;
- mach = "*-*-windiss";
- sed = "s|/\\* long double declarations \\*/|"
- "#endif /* __GNUC__ */|";
-
- test_text = "/* long double declarations */";
-};
-
-/*
- * WindISS headers include "diab/va_list.h" instead of "stdarg.h"
- */
-fix = {
- select = '(#include.*)diab/va_list.h';
- hackname = windiss_valist;
- sed = "s|diab/va_list.h|stdarg.h|";
- mach = "*-*-windiss";
-
- test_text = "#include <diab/va_list.h>";
-};
-
/*
* There are several name conflicts with C++ reserved words in X11 header
* files. These are fixed in some versions, so don't do the fixes if