diff options
author | Neil Moore <neil@s-z.org> | 2013-06-26 13:31:13 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-06-26 13:32:49 -0400 |
commit | e7f48cfcf7d5b98fdce22488ac48501fade58869 (patch) | |
tree | 39e88d921f96013d47226f2aa406736105342239 /crawl-ref/source/AppHdr.h | |
parent | e6f16a25c2bc8b2c4da65cea3003f79b5edc6dae (diff) | |
download | crawl-ref-e7f48cfcf7d5b98fdce22488ac48501fade58869.tar.gz crawl-ref-e7f48cfcf7d5b98fdce22488ac48501fade58869.zip |
Revert "Fix compilation with old (4.1) GCC and libstdc++"
Since we have removed the ambiguous calls; and since there are other
toolchains where pow(int,int) is a problem (see #7265).
This reverts commit cae46e358690cf86f43a5743b5b048be0652072e.
Conflicts:
crawl-ref/source/skills.cc
Diffstat (limited to 'crawl-ref/source/AppHdr.h')
-rw-r--r-- | crawl-ref/source/AppHdr.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index d73d2a1adc..5c2b613978 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -45,15 +45,10 @@ static inline T move(T x) { return x; } // good enough for our purposes #define ENUM_INT64 #endif -#if defined(__sun) || defined(__GNUC__) \ - && __GNUC__ * 100 + __GNUC_MINOR__ <= 401 -// Solaris libc and older GNU libstdc++ have ambiguous overloads for -// float, double, long float, so we need to upgrade ints explicitely. -# ifndef __sun -# include <cmath> -# else -# include <math.h> // XXX: Does Solaris really need this and not <cmath>? -# endif +#ifdef __sun +// Solaris libc has ambiguous overloads for float, double, long float, so +// we need to upgrade ints explicitely: +#include <math.h> static inline double sqrt(int x) { return sqrt((double)x); } static inline double atan2(int x, int y) { return atan2((double)x, (double)y); } static inline double pow(int x, int y) { return std::pow((double)x, y); } |