re PR target/15642 (NAN Is Not a Constant Because __APPLE_CC__ is Not Defined (OK in Apple 3.3.0))
2006-01-19 Andrew Pinski <pinskia@physics.uc.edu> PR target/15642 * inclhack.def (AAB_darwin7_9_long_double_funcs [replace]): Define __APPLE_CC_ as 1345. (broken_nan): New. * fixincl.x: Regenerate. From-SVN: r109973
This commit is contained in:
parent
786872fdd1
commit
bf73f6d2a0
@ -1,3 +1,11 @@
|
||||
2006-01-19 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR target/15642
|
||||
* inclhack.def (AAB_darwin7_9_long_double_funcs [replace]): Define
|
||||
__APPLE_CC_ as 1345.
|
||||
(broken_nan): New.
|
||||
* fixincl.x: Regenerate.
|
||||
|
||||
2005-11-24 Bruce Korb <bkorb@gnu.org>
|
||||
|
||||
* fixincl.c(write_replacement) "here strings" in AutoGen often/generally
|
||||
|
@ -2,11 +2,11 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Thursday November 24, 2005 at 09:46:46 PM PST
|
||||
* It has been AutoGen-ed Thursday January 19, 2006 at 12:17:28 PM EST
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Nov 24 21:46:46 PST 2005
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jan 19 12:17:28 EST 2006
|
||||
*
|
||||
* 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 193 fixup descriptions.
|
||||
* This file contains 194 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
@ -26,8 +26,7 @@
|
||||
*
|
||||
* You may redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License, as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
* Foundation; either version 2, or (at your option) any later version.
|
||||
*
|
||||
* inclhack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -35,10 +34,10 @@
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with inclhack. If not, write to:
|
||||
* The Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1301, USA.
|
||||
* along with inclhack. See the file "COPYING". If not,
|
||||
* write to: The Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
@ -77,7 +76,11 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = {
|
||||
"/* This file prototypes the long double functions available on Mac OS\n\
|
||||
10.3.9. */\n\
|
||||
#ifndef __MATH__\n\
|
||||
# undef __APPLE_CC__\n\
|
||||
# define __APPLE_CC__ 1345\n\
|
||||
# include_next <architecture/ppc/math.h>\n\
|
||||
# undef __APPLE_CC__\n\
|
||||
# define __APPLE_CC__ 1\n\
|
||||
# ifndef __LIBMLDBL_COMPAT\n\
|
||||
# ifdef __LONG_DOUBLE_128__\n\
|
||||
# define __LIBMLDBL_COMPAT(sym) __asm(\"_\" #sym \"$LDBL128\")\n\
|
||||
@ -1675,6 +1678,48 @@ static const char* apzBroken_CabsPatch[] = {
|
||||
"^extern[ \t]+double[ \t]+cabs[ \t]*\\([^\\)]*\\);",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Broken_Nan fix
|
||||
*/
|
||||
tSCC zBroken_NanName[] =
|
||||
"broken_nan";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zBroken_NanList[] =
|
||||
"|architecture/ppc/math.h|architecture/i386/math.h|";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
#define apzBroken_NanMachs (const char**)NULL
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zBroken_NanSelect0[] =
|
||||
"#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
|
||||
|
||||
/*
|
||||
* content bypass pattern - skip fix if pattern found
|
||||
*/
|
||||
tSCC zBroken_NanBypass0[] =
|
||||
"powl";
|
||||
|
||||
#define BROKEN_NAN_TEST_CT 2
|
||||
static tTestDesc aBroken_NanTests[] = {
|
||||
{ TT_NEGREP, zBroken_NanBypass0, (regex_t*)NULL },
|
||||
{ TT_EGREP, zBroken_NanSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Broken_Nan
|
||||
*/
|
||||
static const char* apzBroken_NanPatch[] = {
|
||||
"format",
|
||||
"#if 1",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Bsd_Stdio_Attrs_Conflict fix
|
||||
@ -7849,9 +7894,9 @@ static const char* apzX11_SprintfPatch[] = {
|
||||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 235
|
||||
#define REGEX_COUNT 237
|
||||
#define MACH_LIST_SIZE_LIMIT 261
|
||||
#define FIX_COUNT 193
|
||||
#define FIX_COUNT 194
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
@ -7894,6 +7939,7 @@ typedef enum {
|
||||
BROKEN_ASSERT_STDIO_FIXIDX,
|
||||
BROKEN_ASSERT_STDLIB_FIXIDX,
|
||||
BROKEN_CABS_FIXIDX,
|
||||
BROKEN_NAN_FIXIDX,
|
||||
BSD_STDIO_ATTRS_CONFLICT_FIXIDX,
|
||||
CTRL_QUOTES_DEF_FIXIDX,
|
||||
CTRL_QUOTES_USE_FIXIDX,
|
||||
@ -8238,6 +8284,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
||||
BROKEN_CABS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aBroken_CabsTests, apzBroken_CabsPatch, 0 },
|
||||
|
||||
{ zBroken_NanName, zBroken_NanList,
|
||||
apzBroken_NanMachs,
|
||||
BROKEN_NAN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aBroken_NanTests, apzBroken_NanPatch, 0 },
|
||||
|
||||
{ zBsd_Stdio_Attrs_ConflictName, zBsd_Stdio_Attrs_ConflictList,
|
||||
apzBsd_Stdio_Attrs_ConflictMachs,
|
||||
BSD_STDIO_ATTRS_CONFLICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
|
@ -20,6 +20,7 @@ autogen definitions fixincl;
|
||||
FIXINC_DEBUG = yes;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* On Mac OS 10.3.9, the 'long double' functions are available in
|
||||
* libSystem, but are not prototyped in math.h.
|
||||
@ -33,7 +34,11 @@ fix = {
|
||||
/* 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")
|
||||
@ -1042,6 +1047,21 @@ fix = {
|
||||
"extern double cabs(struct __cabs_s);";
|
||||
};
|
||||
|
||||
/*
|
||||
* Fixup Darwin's broken check for __builtin_nanf.
|
||||
*/
|
||||
|
||||
fix = {
|
||||
hackname = broken_nan;
|
||||
files = "architecture/ppc/math.h";
|
||||
files = "architecture/i386/math.h";
|
||||
select = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
|
||||
bypass = "powl";
|
||||
c_fix = format;
|
||||
c_fix_arg = "#if 1";
|
||||
test_text = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Various systems derived from BSD4.4 contain a macro definition
|
||||
|
Loading…
Reference in New Issue
Block a user