Commit 0a0e5363 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

libFLAC: Tweak MSVC support

Visual Studio 2013 and newer has better support for C99.

Patch-from: lvqcl <lvqcl.mail@gmail.com>
parent ee06cabb
......@@ -117,7 +117,9 @@
#endif
#if defined _MSC_VER
# if _MSC_VER >= 1600
# if _MSC_VER >= 1800
# include <inttypes.h>
# elif _MSC_VER >= 1600
/* Visual Studio 2010 has decent C99 support */
# include <stdint.h>
# define PRIu64 "llu"
......
......@@ -51,15 +51,14 @@
#ifndef FLAC__INTEGER_ONLY_LIBRARY
#if !defined(HAVE_LROUND)
#if defined(_MSC_VER)
#if defined(_MSC_VER) && (_MSC_VER < 1800)
#include <float.h>
#define copysign _copysign
#elif defined(__GNUC__)
#define copysign __builtin_copysign
#endif
static inline long int lround(double x) {
return (long)(x + copysign (0.5, x));
return (long)(x + _copysign(0.5, x));
}
#elif !defined(HAVE_LROUND) && defined(__GNUC__)
static inline long int lround(double x) {
return (long)(x + __builtin_copysign(0.5, x));
}
/* If this fails, we are in the presence of a mid 90's compiler, move along... */
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment