summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@cc.hut.fi>1997-01-28 00:16:49 +0200
committerChip Salzenberg <chip@atlantic.net>1997-01-29 18:11:00 +1200
commitc0315cdf26da307672caca8ee93c0065daae44f4 (patch)
tree02eb3c6c5268c40c8af6c17722f7528437af2485 /perl.h
parentba1485b3aac941801125075387ba52c091447aa2 (diff)
downloadperl-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.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 6e8d00b78a..cdde3192bd 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