summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-05-16 11:23:14 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-05-16 11:23:14 +0800
commit0aaf9a5a5a41833cd39aea9d45aedf59b8da3a75 (patch)
tree0c800118ce0b097eca8eda8beb0e5b02562a4301
parent4657748daa806746ff072d7a992d40abfc2e0db8 (diff)
downloadlibxml2-fix-trio-msvc.tar.gz
trio.c: Define modl, floorl and powl only when neededfix-trio-msvc
They may have been defined on Visual Studio before 2013, so check for their presence first.
-rw-r--r--trio.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/trio.c b/trio.c
index 5ecedc5d..c04a6e12 100644
--- a/trio.c
+++ b/trio.c
@@ -275,9 +275,15 @@ typedef trio_longlong_t trio_int64_t;
#if (!(defined(TRIO_COMPILER_SUPPORTS_C99) \
|| defined(TRIO_COMPILER_SUPPORTS_UNIX01))) \
&& !defined(_WIN32_WCE)
-# define floorl(x) floor((double)(x))
-# define fmodl(x,y) fmod((double)(x),(double)(y))
-# define powl(x,y) pow((double)(x),(double)(y))
+# ifndef floorl
+# define floorl(x) floor((double)(x))
+# endif
+# ifndef fmodl
+# define fmodl(x,y) fmod((double)(x),(double)(y))
+# endif
+# ifndef powl
+# define powl(x,y) pow((double)(x),(double)(y))
+# endif
#endif
#define TRIO_FABS(x) (((x) < 0.0) ? -(x) : (x))