# HG changeset patch # User Chun-wei Fan <fanchunwei@src.gnome.org> # Date 1589599394 -28800 # Sat May 16 11:23:14 2020 +0800 # Node ID 6096c67ce603c7404e05c9c91b3114f9c0781521 # Parent 4852689390b708008266ca70740e1e909e20e0ff 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. diff --git a/trio.c b/trio.c --- a/trio.c +++ b/trio.c @@ -275,9 +275,15 @@ #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))