Skip to content
Snippets Groups Projects
Commit 6096c67ce603 authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

trio.c: Define modl, floorl and powl only when needed

They may have been defined on Visual Studio before 2013, so check for
their presence first.
parent 4852689390b7
No related branches found
No related tags found
No related merge requests found
Pipeline #154 failed
...@@ -275,4 +275,5 @@ ...@@ -275,4 +275,5 @@
#if (!(defined(TRIO_COMPILER_SUPPORTS_C99) \ #if (!(defined(TRIO_COMPILER_SUPPORTS_C99) \
|| defined(TRIO_COMPILER_SUPPORTS_UNIX01))) \ || defined(TRIO_COMPILER_SUPPORTS_UNIX01))) \
&& !defined(_WIN32_WCE) && !defined(_WIN32_WCE)
# ifndef floorl
# define floorl(x) floor((double)(x)) # define floorl(x) floor((double)(x))
...@@ -278,2 +279,4 @@ ...@@ -278,2 +279,4 @@
# define floorl(x) floor((double)(x)) # define floorl(x) floor((double)(x))
# endif
# ifndef fmodl
# define fmodl(x,y) fmod((double)(x),(double)(y)) # define fmodl(x,y) fmod((double)(x),(double)(y))
...@@ -279,3 +282,5 @@ ...@@ -279,3 +282,5 @@
# define fmodl(x,y) fmod((double)(x),(double)(y)) # define fmodl(x,y) fmod((double)(x),(double)(y))
# endif
# ifndef powl
# define powl(x,y) pow((double)(x),(double)(y)) # define powl(x,y) pow((double)(x),(double)(y))
# endif # endif
...@@ -280,5 +285,6 @@ ...@@ -280,5 +285,6 @@
# define powl(x,y) pow((double)(x),(double)(y)) # define powl(x,y) pow((double)(x),(double)(y))
# endif # endif
#endif
#define TRIO_FABS(x) (((x) < 0.0) ? -(x) : (x)) #define TRIO_FABS(x) (((x) < 0.0) ? -(x) : (x))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment