diff options
author | Jarkko Hietaniemi <jhi@cc.hut.fi> | 1997-01-28 00:16:49 +0200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-01-29 18:11:00 +1200 |
commit | c0315cdf26da307672caca8ee93c0065daae44f4 (patch) | |
tree | 02eb3c6c5268c40c8af6c17722f7528437af2485 /perl.h | |
parent | ba1485b3aac941801125075387ba52c091447aa2 (diff) | |
download | perl-c0315cdf26da307672caca8ee93c0065daae44f4.tar.gz |
Fix overloading macro conflict with Digital 'cc -fast'
private-msgid: <199701272216.AAA04557@alpha.hut.fi>
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -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 |