From: korbb Date: Sat, 7 Jun 2008 22:19:45 +0000 (+0000) Subject: clean up fixes X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=3452f1c7d9a4edfee1465fb8561edaccb91ac524 clean up fixes git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136539 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index cbf6d07aa1b..746c09b2880 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Thursday May 29, 2008 at 11:31:36 PM UTC + * It has been AutoGen-ed Saturday June 7, 2008 at 03:19:21 PM PDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 29 23:31:36 UTC 2008 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jun 7 15:19:21 PDT 2008 * * You must regenerate it. Use the ./genfixes script. * @@ -475,42 +475,7 @@ static const char* apzAab_Sun_MemcpyPatch[] = { extern char *memset();\n\ #endif /* __STDC__ */\n\n\ extern int memcmp();\n\n\ -#endif /* __memory_h__ */\n\ -_EndOfHeader;\n\ -};\n\n\n\ -/*\n\ - * Completely replace with a file that includes gcc's\n\ - * stdarg.h or varargs.h files as appropriate.\n\ - */\n\ -#ifdef SVR4\n\ -fix = {\n\ - hackname = AAB_svr4_no_varargs;\n\ - files = sys/varargs.h;\n\ - replace = \"/* This file was generated by fixincludes. */\\n\"\n\ - \"#ifndef _SYS_VARARGS_H\\n\"\n\ - \"#define _SYS_VARARGS_H\\n\\n\"\n\n\ - \"#ifdef __STDC__\\n\"\n\ - \"#include \\n\"\n\ - \"#else\\n\"\n\ - \"#include \\n\"\n\ - \"#endif\\n\\n\"\n\n\ - \"#endif /* _SYS_VARARGS_H */\\n\";\n\ -};\n\ -#endif\n\n\n\ -/*\n\ - * The Ultrix 4.3 file string.h is a symbolic link to strings.h.\n\ - * Replace string.h link with a file that includes strings.h to prevent\n\ - * problems from multiple inclusion.\n\ - */\n\ -fix = {\n\ - hackname = AAB_ultrix_string;\n\ - files = string.h;\n\ - mach = \"*-*-ultrix4.3\";\n\ - replace = <<- _EndOfHeader_\n\ -#ifndef _STRING_INCLUDED\n\ - #define _STRING_INCLUDED\n\ - #include \n\ -#endif /* _STRING_INCLUDED */", +#endif /* __memory_h__ */", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 73bd13a4928..ba352467c97 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_; }; @@ -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,7 +351,7 @@ fix = { extern int memcmp(); #endif /* __memory_h__ */ - _EndOfHeader; + _EndOfHeader_; }; @@ -376,24 +379,6 @@ fix = { /* - * 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 - #endif /* _STRING_INCLUDED */ - _EndOfHeader_; -}; - - -/* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace * which violates a requirement of ISO C. */ @@ -1173,11 +1158,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; }; @@ -1192,10 +1177,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; }; @@ -1285,39 +1270,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_; };