From: Jarkko Hietaniemi Date: Mon, 27 Jan 1997 22:16:49 +0000 (+0200) Subject: Fix overloading macro conflict with Digital 'cc -fast' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0315cdf26da307672caca8ee93c0065daae44f4;p=p5sagit%2Fp5-mst-13.2.git Fix overloading macro conflict with Digital 'cc -fast' private-msgid: <199701272216.AAA04557@alpha.hut.fi> --- diff --git a/perl.h b/perl.h index 6e8d00b..cdde319 100644 --- a/perl.h +++ b/perl.h @@ -1948,6 +1948,7 @@ EXT MGVTBL vtbl_amagicelem; #endif /* !DOINIT */ #ifdef OVERLOAD + EXT long amagic_generation; #define NofAMmeth 58 @@ -2042,6 +2043,38 @@ enum { concat_amg, concat_ass_amg, copy_amg, neg_amg }; + +/* + * some compilers like to redefine cos et alia as faster + * (and less accurate?) versions called F_cos et cetera (Quidquid + * latine dictum sit, altum viditur.) This trick collides with + * the Perl overloading (amg). The following #defines fool both. + */ + +#ifdef _FASTMATH +# ifdef atan2 +# define F_atan2_amg atan2_amg +# endif +# ifdef cos +# define F_cos_amg cos_amg +# endif +# ifdef exp +# define F_exp_amg exp_amg +# endif +# ifdef log +# define F_log_amg log_amg +# endif +# ifdef pow +# define F_pow_amg pow_amg +# endif +# ifdef sin +# define F_sin_amg sin_amg +# endif +# ifdef sqrt +# define F_sqrt_amg sqrt_amg +# endif +#endif /* _FASTMATH */ + #endif /* OVERLOAD */ #ifdef USE_LOCALE_COLLATE