summaryrefslogtreecommitdiff
path: root/psycopg/config.h
diff options
context:
space:
mode:
authorPhotonios <photonios@outlook.com>2015-09-22 18:25:53 +0200
committerPhotonios <photonios@outlook.com>2015-09-22 18:25:53 +0200
commitac25ba0a3f1ffb797e91e335654e91b8778aff4a (patch)
tree34147b127dbeb9ac3b29b3996a27c0c36aacdb04 /psycopg/config.h
parent925fdf57311b7168202e83d3d8e6040b986e5691 (diff)
downloadpsycopg2-ac25ba0a3f1ffb797e91e335654e91b8778aff4a.tar.gz
Fix for MSVC 2015: isnan is supported in this version
Diffstat (limited to 'psycopg/config.h')
-rw-r--r--psycopg/config.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/psycopg/config.h b/psycopg/config.h
index b6cd419..255fc3a 100644
--- a/psycopg/config.h
+++ b/psycopg/config.h
@@ -129,14 +129,15 @@ static int pthread_mutex_init(pthread_mutex_t *mutex, void* fake)
/* remove the inline keyword, since it doesn't work unless C++ file */
#define inline
-/* Hmmm, MSVC doesn't have a isnan/isinf function, but has _isnan function */
+/* Hmmm, MSVC <2015 doesn't have a isnan/isinf function, but has _isnan function */
#if defined (_MSC_VER)
+#if !defined(isnan)
#define isnan(x) (_isnan(x))
/* The following line was hacked together from simliar code by Bjorn Reese
* in libxml2 code */
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) ? 1 \
: ((_fpclass(x) == _FPCLASS_NINF) ? -1 : 0))
-
+#endif
#define strcasecmp(x, y) lstrcmpi(x, y)
#endif
#endif