inclhack.def (AAB_darwin7_9_long_double_funcs): New.

* inclhack.def (AAB_darwin7_9_long_double_funcs): New.
	(AAB_darwin7_9_long_double_funcs_2): New.
	* fixincl.x: Regenerate.

From-SVN: r101305
This commit is contained in:
Geoffrey Keating 2005-06-24 23:43:15 +00:00 committed by Geoffrey Keating
parent 1e399e2331
commit 246e0bd879
3 changed files with 278 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2005-06-24 Geoffrey Keating <geoffk@geoffk.org>
* inclhack.def (AAB_darwin7_9_long_double_funcs): New.
(AAB_darwin7_9_long_double_funcs_2): New.
* fixincl.x: Regenerate.
2005-06-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR libfortran/15266

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Wednesday June 8, 2005 at 12:02:02 AM MEST
* It has been AutoGen-ed Friday June 24, 2005 at 01:40:52 PM EDT
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jun 8 00:02:03 MEST 2005
/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Jun 24 13:40:52 EDT 2005
*
* 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 188 fixup descriptions.
* This file contains 190 fixup descriptions.
*
* See README for more information.
*
@ -40,6 +40,154 @@
* Boston, MA 02111-1307, USA.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aab_Darwin7_9_Long_Double_Funcs fix
*/
tSCC zAab_Darwin7_9_Long_Double_FuncsName[] =
"AAB_darwin7_9_long_double_funcs";
/*
* File name selection pattern
*/
tSCC zAab_Darwin7_9_Long_Double_FuncsList[] =
"|architecture/ppc/math.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzAab_Darwin7_9_Long_Double_FuncsMachs[] = {
"*-*-darwin7.9*",
(const char*)NULL };
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zAab_Darwin7_9_Long_Double_FuncsBypass0[] =
"powl";
#define AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT 1
static tTestDesc aAab_Darwin7_9_Long_Double_FuncsTests[] = {
{ TT_NEGREP, zAab_Darwin7_9_Long_Double_FuncsBypass0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aab_Darwin7_9_Long_Double_Funcs
*/
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\
# include_next <architecture/ppc/math.h>\n\
# ifndef __LIBMLDBL_COMPAT\n\
# ifdef __LONG_DOUBLE_128__\n\
# define __LIBMLDBL_COMPAT(sym) __asm(\"_\" #sym \"$LDBL128\")\n\
# else\n\
# define __LIBMLDBL_COMPAT(sym)\n\
# endif /* __LONG_DOUBLE_128__ */\n\
# endif /* __LIBMLDBL_COMPAT */\n\
# ifdef __cplusplus\n\
extern \"C\" {\n\
# endif\n\
extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl);\n\
extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl);\n\
extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl);\n\
extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l);\n\
extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl);\n\
extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl);\n\
extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl);\n\
extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl);\n\
extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl);\n\
extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl);\n\
extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl);\n\
extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl);\n\
extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl);\n\
extern long double expl( long double ) __LIBMLDBL_COMPAT(expl);\n\
extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l);\n\
extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l);\n\
extern long double logl( long double ) __LIBMLDBL_COMPAT(logl);\n\
extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l);\n\
extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l);\n\
extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl);\n\
extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl);\n\
extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl);\n\
extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl);\n\
extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl);\n\
extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl);\n\
extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl);\n\
extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl);\n\
extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl);\n\
extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl);\n\
extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl);\n\
extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl);\n\
extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl);\n\
extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl);\n\
extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl);\n\
extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal);\n\
extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal);\n\
extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill);\n\
extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl);\n\
extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl);\n\
extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl);\n\
extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl);\n\
extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl);\n\
extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl);\n\
extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl);\n\
extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl);\n\
extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl);\n\
extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl);\n\
extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl);\n\
extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol);\n\
extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl);\n\
extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl);\n\
extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl);\n\
extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl);\n\
extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml);\n\
extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl);\n\
extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl);\n\
extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal);\n\
# ifdef __cplusplus\n\
}\n\
# endif\n\
#endif /* __MATH__ */",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aab_Darwin7_9_Long_Double_Funcs_2 fix
*/
tSCC zAab_Darwin7_9_Long_Double_Funcs_2Name[] =
"AAB_darwin7_9_long_double_funcs_2";
/*
* File name selection pattern
*/
tSCC zAab_Darwin7_9_Long_Double_Funcs_2List[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzAab_Darwin7_9_Long_Double_Funcs_2Machs[] = {
"*-*-darwin7.9*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zAab_Darwin7_9_Long_Double_Funcs_2Select0[] =
"#include[ \\t]+\\\"";
#define AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_TEST_CT 1
static tTestDesc aAab_Darwin7_9_Long_Double_Funcs_2Tests[] = {
{ TT_EGREP, zAab_Darwin7_9_Long_Double_Funcs_2Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aab_Darwin7_9_Long_Double_Funcs_2
*/
static const char* apzAab_Darwin7_9_Long_Double_Funcs_2Patch[] = {
"format",
"%1<%2.h>",
"([ \\t]*#[ \\t]*include[ \\t]+)\"([a-z0-9/]+)\\.h\"",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aab_Fd_Zero_Asm_Posix_Types_H fix
@ -7574,14 +7722,16 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 227
#define REGEX_COUNT 229
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 188
#define FIX_COUNT 190
/*
* Enumerate the fixes
*/
typedef enum {
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX,
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX,
AAB_FD_ZERO_GNU_TYPES_H_FIXIDX,
AAB_FD_ZERO_SELECTBITS_H_FIXIDX,
@ -7773,6 +7923,16 @@ typedef enum {
} t_fixinc_idx;
tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAab_Darwin7_9_Long_Double_FuncsName, zAab_Darwin7_9_Long_Double_FuncsList,
apzAab_Darwin7_9_Long_Double_FuncsMachs,
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 },
{ zAab_Darwin7_9_Long_Double_Funcs_2Name, zAab_Darwin7_9_Long_Double_Funcs_2List,
apzAab_Darwin7_9_Long_Double_Funcs_2Machs,
AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAab_Darwin7_9_Long_Double_Funcs_2Tests, apzAab_Darwin7_9_Long_Double_Funcs_2Patch, 0 },
{ zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList,
apzAab_Fd_Zero_Asm_Posix_Types_HMachs,
AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,

View File

@ -20,6 +20,113 @@ 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.
*/
fix = {
hackname = AAB_darwin7_9_long_double_funcs;
mach = "*-*-darwin7.9*";
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__
# include_next <architecture/ppc/math.h>
# 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_;
};
/*
* ... and for the previous fix to be useful, you have to not use ""
* includes.
*/
fix = {
hackname = AAB_darwin7_9_long_double_funcs_2;
mach = "*-*-darwin7.9*";
files = math.h;
select = '#include[ \t]+\"';
c_fix = format;
c_fix_arg = "%1<%2.h>";
c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"';
test_text = '#include "architecture/ppc/math.h"';
};
/*
* This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
*/