Fix MSVC isnan warning from e80252d4

Started by David Rowleyover 11 years ago2 messages
#1David Rowley
dgrowleyml@gmail.com
1 attachment(s)

The attached small patch fixes the following warning:

src\backend\utils\adt\arrayfuncs.c(5613): warning C4013: '_isnan'
undefined; assuming extern returning int [D:\Postgres\a\postgres.vcxproj]

The fix is pretty much just a copy and paste from costsize.c

Regards

David Rowley

Attachments:

isnan_msvc_fix.patchapplication/octet-stream; name=isnan_msvc_fix.patchDownload
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index fafc852..6c8b41d 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -15,6 +15,9 @@
 #include "postgres.h"
 
 #include <ctype.h>
+#ifdef _MSC_VER
+#include <float.h>				/* for _isnan */
+#endif
 #include <math.h>
 
 #include "access/htup_details.h"
#2Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: David Rowley (#1)
Re: Fix MSVC isnan warning from e80252d4

On 09/11/2014 12:52 PM, David Rowley wrote:

The attached small patch fixes the following warning:

src\backend\utils\adt\arrayfuncs.c(5613): warning C4013: '_isnan'
undefined; assuming extern returning int [D:\Postgres\a\postgres.vcxproj]

The fix is pretty much just a copy and paste from costsize.c

Thanks, committed.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers