From patchwork Sat Jul 6 17:43:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Korb X-Patchwork-Id: 257294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id F2EC62C0095 for ; Sun, 7 Jul 2013 03:43:51 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=EhWQJMHeRR+VlbB2UMWV8P4zQMMPkulpyjvLzE41TeZRbR Q3XOAsMS8xob/isUUZbtiMZlxJlPd/+QtjN7tCr2zSRcdwQV30g7PD7DEP1NyOdM xop8R97kQQHZRqcztrEfncxdWxegoxKtRUunI/LzMbbmcWGjbIsvuAcWpECog= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=5smYkKnOFGDD7WmuypMaiPxHwCE=; b=YCnUzbyq/7FNLxlME8cl UDJ0D5ZbOmFILHUxkt+rd21kQNF9LSSs6xZF+MH0qylXAOcjeWZmDr2Hpicu+6du asrl9rtK+2bPusNxSEYB9fxl0I5ZgJWYYSMhmQMCOvjHMY/OdKWzyaS/D3xC8+20 CN5d/GrJvCzPLMBtlMvEPZw= Received: (qmail 23850 invoked by alias); 6 Jul 2013 17:43:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 23840 invoked by uid 89); 6 Jul 2013 17:43:42 -0000 X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, SPF_PASS, TW_CP, TW_RW, TW_TJ, TW_XL autolearn=ham version=3.3.1 Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 06 Jul 2013 17:43:39 +0000 Received: by mail-pa0-f42.google.com with SMTP id rl6so3119554pac.1 for ; Sat, 06 Jul 2013 10:43:37 -0700 (PDT) X-Received: by 10.66.169.42 with SMTP id ab10mr16289832pac.14.1373132617373; Sat, 06 Jul 2013 10:43:37 -0700 (PDT) Received: from [192.168.10.2] (adsl-99-170-146-238.dsl.pltn13.sbcglobal.net. [99.170.146.238]) by mx.google.com with ESMTPSA id wg6sm13295715pbc.3.2013.07.06.10.43.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Jul 2013 10:43:36 -0700 (PDT) Message-ID: <51D85740.8050001@gmail.com> Date: Sat, 06 Jul 2013 10:43:28 -0700 From: Bruce Korb User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: GCC Patches Subject: Fix Bug 51776 (finally...) X-Virus-Found: No Index: ChangeLog =================================================================== --- ChangeLog (revision 200737) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2013-07-06 Bruce Korb + + * inclhack.def (cdef_cplusplus): removed, per Bug 51776 + 2013-05-23 Alexander Ivchenko * inclhack.def (complier_h_tradcpp): New. Index: fixincl.x =================================================================== --- fixincl.x (revision 200737) +++ fixincl.x (working copy) @@ -1,12 +1,12 @@ /* -*- buffer-read-only: t -*- vi: set ro: - * + * * DO NOT EDIT THIS FILE (fixincl.x) - * - * It has been AutoGen-ed May 23, 2013 at 04:44:10 PM by AutoGen 5.12 + * + * It has been AutoGen-ed July 6, 2013 at 10:40:53 AM by AutoGen 5.17.5pre10 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 23 16:44:10 MSK 2013 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 6 10:40:53 PDT 2013 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 228 fixup descriptions. + * This file contains 227 fixup descriptions. * * See README for more information. * @@ -2072,41 +2072,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Cdef_Cplusplus fix - */ -tSCC zCdef_CplusplusName[] = - "cdef_cplusplus"; - -/* - * File name selection pattern - */ -tSCC zCdef_CplusplusList[] = - "sys/cdefs.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzCdef_CplusplusMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zCdef_CplusplusSelect0[] = - "\\[\\[noreturn\\]\\]"; - -#define CDEF_CPLUSPLUS_TEST_CT 1 -static tTestDesc aCdef_CplusplusTests[] = { - { TT_EGREP, zCdef_CplusplusSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Cdef_Cplusplus - */ -static const char* apzCdef_CplusplusPatch[] = { - "format", - "__attribute__((__noreturn__))", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Ctrl_Quotes_Def fix */ tSCC zCtrl_Quotes_DefName[] = @@ -9364,9 +9329,9 @@ * * List of all fixes */ -#define REGEX_COUNT 267 +#define REGEX_COUNT 266 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 228 +#define FIX_COUNT 227 /* * Enumerate the fixes @@ -9418,7 +9383,6 @@ BROKEN_CABS_FIXIDX, BROKEN_NAN_FIXIDX, BSD_STDIO_ATTRS_CONFLICT_FIXIDX, - CDEF_CPLUSPLUS_FIXIDX, CTRL_QUOTES_DEF_FIXIDX, CTRL_QUOTES_USE_FIXIDX, CXX_UNREADY_FIXIDX, @@ -9833,11 +9797,6 @@ BSD_STDIO_ATTRS_CONFLICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aBsd_Stdio_Attrs_ConflictTests, apzBsd_Stdio_Attrs_ConflictPatch, 0 }, - { zCdef_CplusplusName, zCdef_CplusplusList, - apzCdef_CplusplusMachs, - CDEF_CPLUSPLUS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aCdef_CplusplusTests, apzCdef_CplusplusPatch, 0 }, - { zCtrl_Quotes_DefName, zCtrl_Quotes_DefList, apzCtrl_Quotes_DefMachs, CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, Index: inclhack.def =================================================================== --- inclhack.def (revision 200737) +++ inclhack.def (working copy) @@ -64,7 +64,6 @@ _EOArg_; }; - /* On AIX when _LARGE_FILES is defined fcntl.h defines open to * open64 and creat to creat64. This fixes fcntl.h to * undef those defines and use __asm__ to alias the symbols if @@ -103,7 +102,6 @@ _EOArg_; }; - /* * On Mac OS 10.3.9, the 'long double' functions are available in * libSystem, but are not prototyped in math.h. @@ -237,7 +235,6 @@ _EndOfHeader_; }; - /* * This fixes __FD_ZERO bug for glibc-1.x */ @@ -275,7 +272,6 @@ _EndOfHeader_; }; - /* * This fixes __FD_ZERO bug for glibc-2.0.x */ @@ -317,7 +313,6 @@ _EndOfHeader_; }; - /* * Solaris is a DDK (aka kernel-land) header providing * the same interface as . No idea why they couldn't have just @@ -336,7 +331,6 @@ _EndOfHeader_; }; - /* * Fix non-ANSI memcpy declaration that conflicts with gcc's builtin * declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because @@ -574,7 +568,6 @@ _EndOfHeader_; }; - /* * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I, * which only is provided by AIX xlc C99. @@ -727,7 +720,6 @@ "{...init stuff...}"; }; - /* * AIX stdint.h fixes. */ @@ -744,7 +736,9 @@ "#define UINT16_MAX (65535U)"; }; - +/* + * aix_stdint_2 + */ fix = { hackname = aix_stdint_2; mach = "*-*-aix*"; @@ -773,7 +767,9 @@ "#define UINTPTR_MAX UINT32_MAX"; }; - +/* + * aix_stdint_3 + */ fix = { hackname = aix_stdint_3; mach = "*-*-aix*"; @@ -796,7 +792,9 @@ "#define PTRDIFF_MAX INT32_MAX"; }; - +/* + * aix_stdint_4 + */ fix = { hackname = aix_stdint_4; mach = "*-*-aix*"; @@ -813,7 +811,9 @@ "#define SIZE_MAX UINT32_MAX"; }; - +/* + * aix_stdint_5 + */ fix = { hackname = aix_stdint_5; mach = "*-*-aix*"; @@ -827,7 +827,6 @@ "#define UINT16_C(c) __CONCAT__(c,U)"; }; - /* * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline * in an otherwise harmless (and #ifed out) macro definition @@ -842,7 +841,6 @@ " bar \\ \n baz \\ \n bat"; }; - /* * sys/wait.h on AIX 5.2 defines macros that have both signed and * unsigned types in conditional expressions. @@ -853,10 +851,10 @@ select = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)'; c_fix = format; c_fix_arg = "? (int)%1"; - test_text = "#define WSTOPSIG(__x) (int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)"; + test_text = "#define WSTOPSIG(__x) " + "(int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)"; }; - /* * sys/signal.h on some versions of AIX uses volatile in the typedef of * sig_atomic_t, which causes gcc to generate a warning about duplicate @@ -872,7 +870,6 @@ test_text = "typedef volatile int sig_atomic_t;"; }; - /* * Fix __assert declaration in assert.h on Alpha OSF/1. */ @@ -885,7 +882,6 @@ test_text = 'extern void __assert(char *, char *, int);'; }; - /* * Fix assert macro in assert.h on Alpha OSF/1. * The superfluous int cast breaks C++. @@ -900,7 +896,6 @@ ': __assert(#EX, __FILE__, __LINE__))'; }; - /* * Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX. */ @@ -914,7 +909,6 @@ test_text = 'extern int getopt(int, char *[], char *);'; }; - /* * Fix missing semicolon on Alpha OSF/4 in */ @@ -927,7 +921,6 @@ test_text = ' struct sockaddr vmif_paddr /* protocol address */'; }; - /* * Remove erroneous parentheses in sym.h on Alpha OSF/1. */ @@ -940,7 +933,6 @@ test_text = "#ifndef(__mips64) /* bogus */\nextern int foo;\n#endif"; }; - /* * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0 * And OpenBSD. @@ -954,7 +946,6 @@ test_text = "extern char* sbrk(ptrdiff_t increment);"; }; - /* * For C++, avoid any typedef or macro definition of bool, * and use the built in type instead. @@ -977,7 +968,9 @@ test_text = "# define bool\t char \n"; }; - +/* + * avoid_bool_type + */ fix = { hackname = avoid_bool_type; files = curses.h; @@ -994,7 +987,6 @@ test_text = "typedef unsigned int\tbool \t; /* bool\n type */"; }; - /* * For C++, avoid any typedef definition of wchar_t, * and use the built in type instead. @@ -1018,7 +1010,6 @@ test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type */"; }; - /* * Fix `typedef struct term;' on hppa1.1-hp-hpux9. */ @@ -1032,7 +1023,6 @@ test_text = 'typedef struct term;'; }; - /* * Fix one other error in this file: * a mismatched quote not inside a C comment. @@ -1047,7 +1037,6 @@ test_text = "/* doesn't have matched single quotes */"; }; - /* * check for broken assert.h that needs stdio.h */ @@ -1061,7 +1050,6 @@ test_text = "extern FILE* stderr;"; }; - /* * check for broken assert.h that needs stdlib.h */ @@ -1098,7 +1086,6 @@ "extern double cabs ( _Complex z );"; }; - /* * Fixup Darwin's broken check for __builtin_nanf. */ @@ -1119,7 +1106,6 @@ test_text = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)"; }; - /* * Various systems derived from BSD4.4 contain a macro definition * for vfscanf that interacts badly with requirements of builtin-attrs.def. @@ -1140,22 +1126,6 @@ }; /* - * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests - * that it conforms to ISO/IEC 14882:2011. It currently does - * not support the [[noreturn]] procedure attribute. - * When it does, this hack should be removed. - * SEE: gcc.gnu.org/bugzilla/show_bug.cgi?id=51776 - */ -fix = { - hackname = cdef_cplusplus; - files = sys/cdefs.h; - select = '\[\[noreturn\]\]'; - c_fix = format; - c_fix_arg = '__attribute__((__noreturn__))'; - test_text = "#define _Noreturn [[noreturn]]"; -}; - -/* * Fix various macros used to define ioctl numbers. * The traditional syntax was: * @@ -1197,7 +1167,6 @@ test_text = "#define TCTRLFOO BSD43_CTRL(T, 1)"; }; - /* * sys/mman.h on HP/UX is not C++ ready, * even though NO_IMPLICIT_EXTERN_C is defined on HP/UX. @@ -1242,7 +1211,6 @@ test_text = '#include "architecture/ppc/math.h"'; }; - /* * On darwin8 and earlier, mach-o/swap.h isn't properly guarded * by 'extern "C"'. On darwin7 some mach/ headers aren't properly guarded. @@ -1268,12 +1236,10 @@ test_text = "extern void swap_fat_header();\n"; }; - /* * AvailabilityMacros.h on Darwin breaks with GCC 4.0, because of * bad __GNUC__ tests. */ - fix = { hackname = darwin_gcc4_breakage; mach = "*-*-darwin*"; @@ -1285,7 +1251,6 @@ "(__GNUC_MINOR__ >= 1)\n"; }; - /* * __private_extern__ doesn't exist in FSF GCC. Even if it did, * why would you ever put it in a system header file? @@ -1303,7 +1268,6 @@ "unsigned long *address);\n"; }; - /* * Darwin headers have a stdint.h that defines UINT8_C and UINT16_C to * unsigned constants. @@ -1320,7 +1284,6 @@ "#define UINT16_C(v) (v ## U)"; }; - /* * Darwin headers have a stdint.h that defines INTPTR_MIN and INTPTR_MAX * with wrong types. @@ -1353,7 +1316,6 @@ "#endif"; }; - /* * Darwin headers have a stdint.h that defines UINTPTR_MAX with a wrong type. */ @@ -1379,7 +1341,6 @@ "#endif"; }; - /* * Darwin headers have a stdint.h that defines SIZE_MAX with a wrong type. */ @@ -1405,7 +1366,6 @@ "#endif"; }; - /* * Darwin headers have a stdint.h that defines {U,}INTMAX_{MIN,MAX} * with a wrong type. @@ -1434,7 +1394,6 @@ "#define UINTMAX_MAX UINT64_MAX"; }; - /* * Darwin headers have a stdint.h that defines {U,}INTMAX_C * with a wrong type. @@ -1467,7 +1426,6 @@ "#endif"; }; - /* * Darwin headers have a stdint.h that defines {U,}INTMAX_C * with a wrong type. @@ -1490,7 +1448,6 @@ "#define UINTMAX_C(v) (v ## ULL)"; }; - /* * Fix on Digital UNIX V4.0: * It contains a prototype for a DEC C internal asm() function, @@ -1508,7 +1465,6 @@ "};\n#pragma intrinsic( dasm )\n/* END ASM TEST*/"; }; - /* * Fix typo in on DJGPP 2.03. */ @@ -1524,7 +1480,6 @@ "extern __DJ_wint_t x;\n"; }; - /* * Fix these Sun OS files to avoid an invalid identifier in an #ifdef. */ @@ -1539,7 +1494,6 @@ test_text = "#ifdef ecd.cursor\n#error bogus\n#endif /* ecd+cursor */"; }; - /* * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume * neither the existence of GCC 3 nor its exact feature set yet break @@ -1556,7 +1510,6 @@ test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7'; }; - /* * Some releases of FreeBSD 4 and FreeBSD 5.0 and 5.1 system headers presume * neither the existence of GCC 4 nor its exact feature set yet break @@ -1572,7 +1525,6 @@ test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3'; }; - /* * Some versions of glibc don't expect the C99 inline semantics. */ @@ -1590,7 +1542,6 @@ EOT; }; - /* * Similar, but a version that didn't have __NO_INLINE__ */ @@ -1608,7 +1559,6 @@ EOT; }; - /* * The glibc_c99_inline_1 fix should have fixed everything. Unfortunately * there are many glibc headers which do not respect __USE_EXTERN_INLINES. @@ -1644,7 +1594,9 @@ EOT; }; - +/* + * glibc_c99_inline_3 + */ fix = { hackname = glibc_c99_inline_3; files = bits/string2.h, '*/bits/string2.h'; @@ -1662,7 +1614,9 @@ EOT; }; - +/* + * glibc_c99_inline_4 + */ fix = { hackname = glibc_c99_inline_4; files = sys/sysmacros.h, '*/sys/sysmacros.h', wchar.h, '*/wchar.h'; @@ -1676,7 +1630,6 @@ EOT; }; - /* glibc-2.3.5 defines pthread mutex initializers incorrectly, * so we replace them with versions that correspond to the * definition. @@ -1750,7 +1703,6 @@ _EOText_; }; - /* glibc versions before 2.5 have a version of stdint.h that defines UINT8_C and UINT16_C to produce unsigned constants, as do uClibc versions with stdint.h based on those glibc versions. */ @@ -1761,10 +1713,11 @@ c_fix = format; c_fix_arg = "# define UINT8_C(c)\tc\n# define UINT16_C(c)\tc"; c_fix_arg = "# define UINT8_C\\(c\\)\tc ## U\n# define UINT16_C\\(c\\)\tc ## U"; - test_text = "/* This file is part of the GNU C Library. */\n# define UINT8_C(c)\tc ## U\n# define UINT16_C(c)\tc ## U"; + test_text = "/* This file is part of the GNU C Library. */\n" + "# define UINT8_C(c)\tc ## U\n" + "# define UINT16_C(c)\tc ## U"; }; - /* Some versions of glibc have a version of bits/string2.h that produces "value computed is not used" warnings from strncpy; fix this definition by using __builtin_strncpy instead as in newer @@ -1796,7 +1749,9 @@ select = '\(\(\(type\) 0.25\) && \(\(type\) 0.25 - 1\)\)'; bypass = "__floating_type\\(type\\) \\\\\n.*__builtin_classify_type"; c_fix = format; - c_fix_arg = "(__builtin_classify_type ((type) 0) == 8 || (__builtin_classify_type ((type) 0) == 9 && __builtin_classify_type (__real__ ((type) 0)) == 8))"; + c_fix_arg = "(__builtin_classify_type ((type) 0) == 8 || " + "(__builtin_classify_type ((type) 0) == 9 && " + "__builtin_classify_type (__real__ ((type) 0)) == 8))"; test_text = "# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))"; }; @@ -1828,7 +1783,6 @@ "typedef ushort_t wchar_t; /* ushort_t */"; }; - /* * Fix HP & Sony's use of "../machine/xxx.h" * to refer to: @@ -1848,7 +1802,6 @@ test_text = ' # include "../machine/mumble.h"'; }; - /* * Check for (...) in C++ code in HP/UX sys/file.h. */ @@ -1864,7 +1817,6 @@ test_text = "extern void foo(...); /* HPUX_SOURCE - bad varargs */"; }; - /* * Un-Hide a series of five FP defines from post-1999 compliance GCC: * FP_NORMAL, FP_ZERO, FP_INFINITE, FP_SUBNORMAL and FP_NAN @@ -1898,7 +1850,6 @@ "# define FP_NAN 4\n"; }; - /* * Delete C++ double pow (double, int) inline function from HP-UX 10 & 11 * math.h to prevent clash with define in c_std/bits/std_cmath.h. @@ -1946,7 +1897,6 @@ " }\n"; }; - /* * Fix hpux 10.X missing ctype declarations 1 */ @@ -1968,7 +1918,6 @@ test_text = "# define _toupper(__c) __toupper(__c)\n"; }; - /* * Fix hpux 10.X missing ctype declarations 2 */ @@ -2009,7 +1958,6 @@ " extern unsigned int *__SB_masks;\n"; }; - /* * Fix hpux 10.X missing stdio declarations */ @@ -2031,7 +1979,6 @@ test_text = "# define _iob __iob\n"; }; - /* * Make sure hpux defines abs in header. */ @@ -2045,7 +1992,6 @@ test_text = "#ifndef _MATH_INCLUDED"; }; - /* * Keep HP-UX 11 from stomping on C++ math namespace * with defines for fabsf. @@ -2065,7 +2011,6 @@ "#endif"; }; - /* * Fix C99 constant in __POINTER_SET define. */ @@ -2080,7 +2025,6 @@ test_text = "#define __POINTER_SET\t\t((void *) 1LL)"; }; - /* * Prevent HP-UX 11 from defining __size_t and preventing size_t from * being defined by having it define _hpux_size_t instead. @@ -2098,7 +2042,6 @@ " extern int getpwuid_r( char *, __size_t, struct passwd **);\n"; }; - /* * Fix hpux 11.00 broken snprintf declaration * (third argument is char *, needs to be const char * to prevent @@ -2132,7 +2075,6 @@ ' __va__list);'; }; - /* * get rid of bogus inline definitions in HP-UX 8.0 */ @@ -2150,7 +2092,6 @@ "inline double sqr(double v) { return v**0.5; }"; }; - /* * Fix hpux broken ctype macros */ @@ -2166,7 +2107,6 @@ "# define isalpha(__c) (__SB_masks ? __SB_masks[__c] & _IS\n"; }; - /* * Fix hpux broken #ifndef _XOPEN_SOURCE_EXTENDED conditional on htonl etc. */ @@ -2194,7 +2134,6 @@ "#endif /* ! _XOPEN_SOURCE_EXTENDED */"; }; - /* * HP-UX long_double */ @@ -2225,11 +2164,15 @@ hackname = hpux_long_double_2; mach = "hppa*-*-hpux11.3*"; files = stdlib.h; - select = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| defined\\(_PROTOTYPES\\) \\|\\| defined\\(_LONG_DOUBLE_STRUCT\\)"; + select = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| " + "defined\\(_PROTOTYPES\\) \\|\\| " + "defined\\(_LONG_DOUBLE_STRUCT\\)"; c_fix = format; c_fix_arg = "# if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)"; - test_text = "# if !defined(__ia64) || !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)\n"; + test_text = "# if !defined(__ia64) || " + "!defined(_PROTOTYPES) || " + "defined(_LONG_DOUBLE_STRUCT)\n"; }; /* @@ -2246,7 +2189,6 @@ test_text = 'extern struct sigevent;'; }; - /* * Wrap spu_info in ifdef _KERNEL. GCC cannot handle an array of unknown * type and mpinfou is only defined when _KERNEL is set. @@ -2277,7 +2219,8 @@ select = "^[ \t]*extern sbsize_t sendfile.*\n.*, int\\)\\);\n"; c_fix = format; c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n"; - test_text = " extern sbsize_t sendfile __((int, int, off_t, bsize_t,\n const struct iovec *, int));\n"; + test_text = " extern sbsize_t sendfile __((int, int, off_t, bsize_t,\n" + " const struct iovec *, int));\n"; }; fix = { @@ -2287,7 +2230,8 @@ select = "^[ \t]*extern sbsize_t sendpath.*\n.*, int\\)\\);\n"; c_fix = format; c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n"; - test_text = " extern sbsize_t sendpath __((int, int, off_t, bsize_t,\n const struct iovec *, int));\n"; + test_text = " extern sbsize_t sendpath __((int, int, off_t, bsize_t,\n" + " const struct iovec *, int));\n"; }; fix = { @@ -2297,11 +2241,16 @@ files = errno.h; select = "^[ \t]*extern int errno;$"; c_fix = format; - c_fix_arg = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n%0\n#ifdef __cplusplus\n}\n#endif"; + c_fix_arg = "#ifdef __cplusplus\n" + "extern \"C\" {\n" + "#endif\n" + "%0\n" + "#ifdef __cplusplus\n" + "}\n" + "#endif"; test_text = " extern int errno;\n"; }; - /* * Add missing braces to pthread initializer defines. */ @@ -2348,12 +2297,18 @@ hackname = hpux_c99_intptr; mach = "*-hp-hpux11.3*"; files = stdint-hpux11.h, stdint.h; - sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*" + "INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*" + "INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*" + "INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*" + "INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*" + "UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*" + "UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@"; test_text = "#define PTRDIFF_MAX INT32_MAX\n" "#define PTRDIFF_MIN INT32_MIN\n" "#define INTPTR_MAX INT32_MAX\n" @@ -2371,10 +2326,14 @@ mach = "*-hp-hpux11.[23]*"; files = inttypes.h; files = stdint-hpux11.h, stdint.h; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@#define UINT32_C(__c) __CONCAT__(__c,u)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*" + "__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*" + "__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*" + "__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@" + "#define UINT32_C(__c) __CONCAT__(__c,u)@"; test_text = "#define UINT8_C(__c) __CONCAT_U__(__c)\n" "#define UINT16_C(__c) __CONCAT_U__(__c)\n" "#define INT32_C(__c) __CONCAT__(__c,l)\n" @@ -2385,10 +2344,14 @@ hackname = hpux_c99_inttypes2; mach = "*-hp-hpux11.2*"; files = stdint-hpux11.h, stdint.h; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*" + "((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*" + "((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*" + "((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*" + "((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@"; test_text = "# define INT8_C(__c) ((signed char)(__c))\n" "# define UINT8_C(__c) ((unsigned char)(__c))\n" "# define INT16_C(__c) ((short)(__c))\n" @@ -2444,7 +2407,6 @@ test_text = "# define HUGE_VAL\t(__extension__ 0x1.0p2047)"; }; - /* * Fix glibc definition of HUGE_VALF in terms of hex floating point constant */ @@ -2460,7 +2422,6 @@ test_text = "# define HUGE_VALF (__extension__ 0x1.0p255f)"; }; - /* * Fix glibc definition of HUGE_VALL in terms of hex floating point constant */ @@ -2476,7 +2437,6 @@ test_text = "# define HUGE_VALL (__extension__ 0x1.0p32767L)"; }; - /* * Fix return type of abort and free */ @@ -2494,7 +2454,6 @@ "extern int exit(void*);"; }; - /* * Fix various macros used to define ioctl numbers. * The traditional syntax was: @@ -2539,7 +2498,6 @@ "BSD43__IOWR(T, 1) /* Some are multi-line */"; }; - /* * Check for missing ';' in struct */ @@ -2556,7 +2514,6 @@ "}; /* mumbled struct */\n"; }; - /* * Non-traditional "const" declaration in Irix's limits.h. */ @@ -2569,7 +2526,6 @@ test_text = "extern const char limit; /* test limits */"; }; - /* * IRIX 5.x's stdio.h declares some functions that take a va_list as * taking char *. However, GCC uses void * for va_list, so @@ -2585,7 +2541,6 @@ "extern int printf( const char *, /* va_list */ char * );"; }; - /* * These files in Sun OS 4.x and ARM/RISCiX and BSD4.3 * use / * * / to concatenate tokens. @@ -2610,7 +2565,6 @@ test_text = "#define __CONCAT__(a,b) a/**/b"; }; - /* 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++. @@ -2627,7 +2581,6 @@ "\t(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)\n"; }; - /* * Remove header file warning from sys/time.h. Autoconf's * AC_HEADER_TIME recommends to include both sys/time.h and time.h @@ -2642,7 +2595,6 @@ test_text = "#warning Using instead of "; }; - /* * Add missing declaration for putenv. */ @@ -2659,7 +2611,6 @@ test_text = "extern char *getenv _AP((const char *));"; }; - /* * Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_. * @@ -2678,7 +2629,6 @@ test_text = " # define _BSD_VA_LIST_\tchar**"; }; - /* * Fix non-ansi machine name defines */ @@ -2692,7 +2642,6 @@ "\n/* no uniform test, so be careful :-) */"; }; - /* * Some math.h files define struct exception (it's in the System V * Interface Definition), which conflicts with the class exception defined @@ -2725,7 +2674,6 @@ test_text = "typedef struct exception t_math_exception;"; }; - /* * This looks pretty broken to me. ``dbl_max_def'' will contain * "define DBL_MAX " at the start, when what we really want is just @@ -2763,7 +2711,6 @@ "#define HUGE_VAL DBL_MAX"; }; - /* * nested comment */ @@ -2776,7 +2723,6 @@ test_text = "/*#include /* skip this */"; }; - /* * Some versions of NetBSD don't expect the C99 inline semantics. */ @@ -2796,7 +2742,9 @@ test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}"; }; - +/* + * netbsd_c99_inline_2 + */ fix = { hackname = netbsd_c99_inline_2; mach = "*-*-netbsd*"; @@ -2815,7 +2763,6 @@ test_text = "#define _SIGINLINE extern __inline"; }; - /* * NetBSD has a semicolon after the ending '}' for some extern "C". */ @@ -2831,7 +2778,6 @@ test_text = "#define __END_DECLS };"; }; - /* newlib's stdint.h has several failures to conform to C99. The fix for these removed a comment that can be matched to identify unfixed versions. */ @@ -2842,12 +2788,18 @@ sed = "s@#define INT32_MIN.*@#define INT32_MIN (-INT32_MAX - 1)@"; sed = "s@#define INT32_MAX.*@#define INT32_MAX __INT32_MAX__@"; sed = "s@#define UINT32_MAX.*@#define UINT32_MAX __UINT32_MAX__@"; - sed = "s@#define INT_LEAST32_MIN.*@#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)@"; - sed = "s@#define INT_LEAST32_MAX.*@#define INT_LEAST32_MAX __INT_LEAST32_MAX__@"; - sed = "s@#define UINT_LEAST32_MAX.*@#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__@"; - sed = 's@#define INT_FAST\([0-9]*\)_MIN.*@#define INT_FAST\1_MIN (-INT_FAST\1_MAX - 1)@'; - sed = 's@#define INT_FAST\([0-9]*\)_MAX.*@#define INT_FAST\1_MAX __INT_FAST\1_MAX__@'; - sed = 's@#define UINT_FAST\([0-9]*\)_MAX.*@#define UINT_FAST\1_MAX __UINT_FAST\1_MAX__@'; + sed = "s@#define INT_LEAST32_MIN.*@" + "#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)@"; + sed = "s@#define INT_LEAST32_MAX.*@" + "#define INT_LEAST32_MAX __INT_LEAST32_MAX__@"; + sed = "s@#define UINT_LEAST32_MAX.*@" + "#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__@"; + sed = 's@#define INT_FAST\([0-9]*\)_MIN.*@' + '#define INT_FAST\1_MIN (-INT_FAST\1_MAX - 1)@'; + sed = 's@#define INT_FAST\([0-9]*\)_MAX.*@' + '#define INT_FAST\1_MAX __INT_FAST\1_MAX__@'; + sed = 's@#define UINT_FAST\([0-9]*\)_MAX.*@' + '#define UINT_FAST\1_MAX __UINT_FAST\1_MAX__@'; sed = "s@#define SIZE_MAX.*@#define SIZE_MAX __SIZE_MAX__@"; sed = "s@#define PTRDIFF_MIN.*@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; sed = "s@#define PTRDIFF_MAX.*@#define PTRDIFF_MAX __PTRDIFF_MAX__@"; @@ -2870,7 +2822,9 @@ "#define UINT16_C(x) x##U"; }; - +/* + * newlib_stdint_2 + */ fix = { hackname = newlib_stdint_2; files = stdint-newlib.h, stdint.h; @@ -2889,7 +2843,6 @@ "/** Macros for minimum-width integer constant expressions */"; }; - /* * NeXT 3.2 adds const prefix to some math functions. * These conflict with the built-in functions. @@ -2906,7 +2859,6 @@ test_text = "extern\tdouble\t__const__\tmumble();"; }; - /* * NeXT 3.2 uses the word "template" as a parameter for some * functions. GCC reports an invalid use of a reserved key word @@ -2923,7 +2875,6 @@ test_text = "extern mumble( char * template); /* fix */"; }; - /* * NeXT 3.2 includes the keyword volatile in the abort() and exit() * function prototypes. That conflicts with the built-in functions. @@ -2940,7 +2891,6 @@ test_text = "extern\tvolatile\tvoid\tabort();"; }; - /* * NeXT 2.0 defines 'int wait(union wait*)', which conflicts with Posix.1. * Note that version 3 of the NeXT system has wait.h in a different directory, @@ -2957,7 +2907,6 @@ test_text = "extern pid_d wait(union wait*);"; }; - /* * a missing semi-colon at the end of the nodeent structure definition. */ @@ -3090,7 +3039,6 @@ test_text = "#include "; }; - /* * On broken glibc-2.3.3 systems an array of incomplete structures is * passed to __sigsetjmp. Fix that to take a pointer instead. @@ -3101,8 +3049,10 @@ select = "struct __jmp_buf_tag"; c_fix = format; c_fix_arg = "%1 *%2%3"; - c_fix_arg = "^(extern int __sigsetjmp \\(struct __jmp_buf_tag) (__env)\\[1\\](.*)$"; - test_text = "extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask);"; + c_fix_arg = "^(extern int __sigsetjmp \\(struct __jmp_buf_tag) " + "(__env)\\[1\\](.*)$"; + test_text = "extern int __sigsetjmp (struct __jmp_buf_tag __env[1], " + "int __savemask);"; }; /* @@ -3119,7 +3069,6 @@ test_text = "extern int\tfclose(), fflush(), fread(), fwrite(), foo();"; }; - /* * Fix casts as lvalues in glibc's . */ @@ -3133,7 +3082,9 @@ "\t((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))"; }; - +/* + * rpc_xdr_lvalue_cast_b + */ fix = { hackname = rpc_xdr_lvalue_cast_b; files = rpc/xdr.h; @@ -3144,7 +3095,6 @@ "\t(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))"; }; - /* * function class(double x) conflicts with C++ keyword on rs/6000 */ @@ -3160,7 +3110,6 @@ test_text = "extern int class();"; }; - /* * Wrong fchmod prototype on RS/6000. */ @@ -3173,7 +3122,6 @@ test_text = "extern int fchmod(char *, mode_t);"; }; - /* * parameters conflict with C++ new on rs/6000 */ @@ -3189,7 +3137,6 @@ test_text = 'extern int rename(const char *old, const char *new);'; }; - /* * Solaris 10+ defines _RESTRICT_KYWD as restrict * for C99. This is wrong for C++, which needs many C99 features, but @@ -3206,7 +3153,6 @@ test_text = "#define _RESTRICT_KYWD restrict"; }; - /* * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of * themselves, which are Sun Studio compiler intrinsics. Remove _Imaginary_I @@ -3230,7 +3176,6 @@ "#define I _Imaginary_I"; }; - /* * Solaris 10+ is wrapped in #ifndef __cplusplus. Wrap in * extern "C" instead so libstdc++ can use it. @@ -3247,7 +3192,6 @@ "#endif /* !defined(__cplusplus) */"; }; - /* * g++ rejects functions declared with both C and C++ linkage. */ @@ -3267,7 +3211,6 @@ " void *bsearch(const void *, const void *, size_t, size_t,"; }; - /* * Solaris doesn't declare getc for C++ with * _STRICT_STDC, but uses it. @@ -3284,7 +3227,6 @@ "#if !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC)"; }; - /* * Before Solaris 10, doesn't mark longjump noreturn. */ @@ -3300,7 +3242,6 @@ test_text = "extern void longjmp(jmp_buf, int);"; }; - /* * Sun Solaris 10 defines several C99 math macros in terms of * builtins specific to the Studio compiler, in particular not @@ -3359,7 +3300,8 @@ files = iso/math_c99.h; c_fix = format; c_fix_arg = "#define\tfpclassify(x) \\\n" - " __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (x))"; + " __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, " + "FP_SUBNORMAL, FP_ZERO, (x))"; c_fix_arg = "^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)"; test_text = '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n" @@ -3393,7 +3335,8 @@ files = iso/math_c99.h; c_fix = format; c_fix_arg = "#define\t%1(x, y)%2__builtin_%1(x, y)"; - c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) __builtin_[a-z]+\\(y\\)\\)"; + c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) " + "__builtin_[a-z]+\\(y\\)\\)"; test_text = '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n" "#undef isgreater\n" @@ -3422,9 +3365,12 @@ c_fix = format; c_fix_arg = "#define\tisinf(x) __builtin_isinf(x)"; c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n" - "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);[ \t]*\\\\\n" - "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*INFINITY[ \t]*\\|\\|[ \t]*\\\\\n" - "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*\\(-INFINITY\\);[ \t]*\\}\\)"; + "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);" + "[ \t]*\\\\\n" + "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*" + "INFINITY[ \t]*\\|\\|[ \t]*\\\\\n" + "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*" + "\\(-INFINITY\\);[ \t]*\\}\\)"; test_text = '#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI"'"\n" "#undef isinf\n" @@ -3472,7 +3418,6 @@ " {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}"; }; - /* * The pow overloads with int were removed in C++ 2011 DR 550. */ @@ -3490,7 +3435,6 @@ " __powl(__X, (long double) (__Y)); }"; }; - /* * Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some * fields of the pthread_rwlock_t structure, which are of type @@ -3517,7 +3461,6 @@ "#define PTHREAD_RWLOCK_INITIALIZER\t{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}"; }; - /* * Sun Solaris defines PTHREAD_ONCE_INIT as an array containing a * structure. As such, it need two levels of brackets, but only @@ -3536,7 +3479,6 @@ "#define PTHREAD_ONCE_INIT\t{0, 0, 0, PTHREAD_ONCE_NOTDONE}"; }; - /* * Sun Solaris defines PTHREAD_ONCE_INIT with a "0" for some * fields of the pthread_once_t structure, which are of type @@ -3569,7 +3511,6 @@ "#define PTHREAD_ONCE_INIT\t{{0, 0, 0, PTHREAD_ONCE_NOTDONE}}\n"; }; - /* * Sun Solaris 2 has a version of sys/int_const.h that defines * UINT8_C and UINT16_C to unsigned constants. @@ -3591,7 +3532,6 @@ "#define UINT16_C(c) __CONCAT__(c,u)"; }; - /* * Sun Solaris 2 has a version of sys/int_limits.h that defines * UINT8_MAX and UINT16_MAX to unsigned constants. @@ -3610,7 +3550,6 @@ "#define UINT16_MAX (65535U)"; }; - /* * Sun Solaris 2 has a version of sys/int_limits.h that defines * INT_FAST16 limits to wrong values for sys/int_types.h. @@ -3628,7 +3567,6 @@ "#define INT_FAST16_MIN INT16_MIN"; }; - /* * Sun Solaris 2 has a version of sys/int_limits.h that defines * SIZE_MAX as unsigned long. @@ -3644,7 +3582,6 @@ "#define SIZE_MAX 4294967295UL"; }; - /* * Sun Solaris up to 9 has a version of sys/int_types.h that forbids use * of Standard C99 64-bit types in 32-bit mode. @@ -3666,7 +3603,6 @@ "#endif"; }; - /* * Solaris 10+ uses char *const argv[_RESTRICT_KYWD] in the * posix_spawn declarations, which doesn't work with C++. @@ -3683,7 +3619,6 @@ "char *const envp[_RESTRICT_KYWD]);"; }; - /* * Before Solaris 10, lacks declarations of std::__filbuf and * std::__flsbuf, but uses them. @@ -3704,7 +3639,6 @@ "#endif"; }; - /* * Sun Solaris 8 has what appears to be some gross workaround for * some old version of their c++ compiler. G++ doesn't want it @@ -3723,7 +3657,6 @@ test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)"; }; - /* * On Solaris 9, __va_list needs to become a typedef for * __builtin_va_list to make -Wmissing-format-attribute work. @@ -3751,7 +3684,6 @@ "#endif"; }; - /* * a missing semi-colon at the end of the statsswtch structure definition. */ @@ -3764,7 +3696,6 @@ test_text = "struct statswtch {\n int boottime\n};"; }; - /* * Arrange for stdio.h to use stdarg.h to define __gnuc_va_list. * On 4BSD-derived systems, stdio.h defers to machine/ansi.h; that's @@ -3788,7 +3719,6 @@ test_text = ""; }; - /* * Don't use or define the name va_list in stdio.h. This is for * ANSI. Note _BSD_VA_LIST_ is dealt with elsewhere. The presence @@ -3836,7 +3766,6 @@ test_text = "extern void mumble( va_list);"; }; - /* * Fix headers that use va_list from stdio.h to use the updated * va_list from the stdio_va_list change. Note _BSD_VA_LIST_ is @@ -3886,7 +3815,6 @@ test_text = "extern void mumble( va_list);"; }; - /* * "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0" * is "!defined( __STRICT_ANSI__ )" @@ -3949,7 +3877,6 @@ "int foo;\n#endif"; }; - /* * "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1" * is "defined( __STRICT_ANSI__ )" @@ -3969,7 +3896,6 @@ test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif"; }; - /* * IRIX 4.0.5 uses struct __file_s * in prototype without previous definition. @@ -3983,7 +3909,6 @@ test_text = "extern void xdrstdio_create( struct __file_s* );"; }; - /* * IRIX 4.0.5 uses struct sockaddr * in prototype without previous definition. @@ -4002,7 +3927,6 @@ test_text = "extern AUTH* authdes_create( struct sockaddr* );"; }; - /* * Apply fix this to all OSs since this problem seems to effect * more than just SunOS. @@ -4030,7 +3954,6 @@ "};"; }; - /* * Fix bogus #ifdef on SunOS 4.1. */ @@ -4045,7 +3968,6 @@ test_text = "#ifdef __i386__ || __vax__ || __sun4c__"; }; - /* * Fix the CAT macro in SunOS memvar.h. */ @@ -4064,7 +3986,6 @@ "#define CAT(a,b)\ta/**/b"; }; - /* * Fix return type of free and {c,m,re}alloc in on SunOS 4.1. * Also fix return type of {m,re}alloc in on sysV68 @@ -4088,7 +4009,6 @@ "char*\trealloc();"; }; - /* * Check for yet more missing ';' in struct (in SunOS 4.0.x) */ @@ -4100,7 +4020,6 @@ test_text = "struct mumble\n int _cnt\n};"; }; - /* * signal.h on SunOS defines signal using (), * which causes trouble when compiling with g++ -pedantic. @@ -4120,7 +4039,6 @@ test_text = "void\t(*signal())();"; }; - /* * Correct the return type for strlen in strings.h in SunOS 4. */ @@ -4133,7 +4051,6 @@ test_text = " int\tstrlen(); /* string length */"; }; - /* * Disable apparent native compiler optimization cruft in SVR4.2 * that is visible to any ANSI compiler using this include. Simply @@ -4147,7 +4064,6 @@ test_text = "#define strlen __std_hdr_strlen\n"; }; - /* * Fix broken decl of getcwd present on some svr4 systems. */ @@ -4164,7 +4080,6 @@ test_text = "extern char* getcwd(char *, int);"; }; - /* * Fix broken decl of profil present on some svr4 systems. */ @@ -4182,7 +4097,6 @@ 'profil(unsigned short *, unsigned int, unsigned int, unsigned int);'; }; - /* * Correct types for signal handler constants like SIG_DFL; they might be * void (*) (), and should be void (*) (int). C++ doesn't like the @@ -4198,7 +4112,6 @@ "#define SIG_IGN (void (*)())0\n"; }; - /* * Some SysV r4 systems, including Sequent's DYNIX/ptx, use the local * function 'getrnge' in before they declare it. For these @@ -4227,7 +4140,6 @@ "{}"; }; - /* * Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn} * in string.h on sysV68 @@ -4275,7 +4187,6 @@ "\tstrlen(), strspn();"; }; - /* * Fix return type of calloc, malloc, realloc, bsearch and exit */ @@ -4295,7 +4206,6 @@ "extern char*\tbsearch(void*,size_t,size_t);\n"; }; - /* * __thread is now a keyword. */ @@ -4327,7 +4237,6 @@ test_text = "#ifdef _cplusplus\nint bogus;\n#endif"; }; - /* * parameters not const on DECstation Ultrix V4.0 and OSF/1. */ @@ -4349,7 +4258,6 @@ "extern int scanf( char *__format, ...);\n"; }; - /* * parameters not const on DECstation Ultrix V4.0 and OSF/1. */ @@ -4371,7 +4279,6 @@ "extern char *tempnam(char*,char*);\n"; }; - /* * Fix definitions of macros used by va-i960.h in VxWorks header file. */ @@ -4390,7 +4297,6 @@ "#define __alignof__(x) ..."; }; - /* * Define __CAN_USE_EXTERN_PREFIX on vms. */ @@ -4524,16 +4430,18 @@ */ fix = { hackname = vms_no_64bit_getopt; - select = "^[ \t]*(extern[ \t]*)?(int[ \t]*(getopt|optind|opterr|optopt)|(char \\*optarg))([ \t]*\\(.*\\))?;\n"; - /* select = "^[ \t](extern[ \t))?(int[ \t](getopt|optind|opterr|optopt))|(char *optarg).*;\n"; */ + select = "^[ \t]*(extern[ \t]*)?(int[ \t]*(getopt|optind|opterr|optopt)" + "|(char \\*optarg))([ \t]*\\(.*\\))?;\n"; mach = "*-*-*vms*"; files = rtldef/stdio.h, rtldef/unistd.h; c_fix = format; - c_fix_arg = "#if __INITIAL_POINTER_SIZE != 64 /* getopt is short ptr only. */\n" - "%0" - "#endif\n"; + c_fix_arg = <<- _EOArg_ + #if __INITIAL_POINTER_SIZE != 64 /* getopt is short ptr only. */ + %0#endif + _EOArg_; + test_text = "int getopt (int, char * const [], const char *);"; }; @@ -4602,7 +4510,6 @@ test_text = "# define\tNULL \t((void *)0) /* typed NULL */"; }; - /* * Make VxWorks header which is almost gcc ready fully gcc ready. */ @@ -4678,7 +4585,6 @@ test_text = "extern STATUS mkdir (const char * _qwerty) ;"; }; - /* * Fix VxWorks to not require including . */ @@ -4691,7 +4597,6 @@ test_text = "uint_t\t_clocks_per_sec;"; }; - /* * Fix VxWorks to not require including . */ @@ -4725,7 +4630,6 @@ test_text = "#include \n"; }; - /* * Another bad dependency in VxWorks 5.2 . */ @@ -4789,7 +4693,6 @@ "} mumble;\n"; }; - /* * class in Xm/BaseClassI.h */ @@ -4805,7 +4708,6 @@ test_text = "extern mumble (int class);\n"; }; - /* * new in Xm/Traversal.h */ @@ -4829,7 +4731,6 @@ "};\nextern Wedged( Widget new, Widget old );"; }; - /* * Incorrect sprintf declaration in X11/Xmu.h */ @@ -4871,6 +4772,11 @@ __asm__ __volatile__ ("divss %0, %0" : : "x" (__f)); _EOText_; }; + +/* + * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64 + * that fails when compiling for SSE-less 32-bit x86. + */ fix = { hackname = feraiseexcept_nosse_divbyzero; mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*';