aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/float.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2014-01-26 09:49:10 -0500
committerAndrew Dunstan <andrew@dunslane.net>2014-01-26 09:49:10 -0500
commitcec8394b5ccd32259e446f963690dd4784646b4d (patch)
tree43df0a04e6e3201cb38101a07ab27fbfe22297c4 /src/backend/utils/adt/float.c
parent00ba97365d356823c48c02147b4cd66f8f06b1d6 (diff)
downloadpostgresql-cec8394b5ccd32259e446f963690dd4784646b4d.tar.gz
postgresql-cec8394b5ccd32259e446f963690dd4784646b4d.zip
Enable building with Visual Studion 2013.
Backpatch to 9.3. Brar Piening.
Diffstat (limited to 'src/backend/utils/adt/float.c')
-rw-r--r--src/backend/utils/adt/float.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index e2a0812d194..774267ed5d2 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -111,6 +111,14 @@ get_float8_infinity(void)
#endif
}
+/*
+* The funny placements of the two #pragmas is necessary because of a
+* long lived bug in the Microsoft compilers.
+* See http://support.microsoft.com/kb/120968/en-us for details
+*/
+#if (_MSC_VER >= 1800)
+#pragma warning(disable:4756)
+#endif
float
get_float4_infinity(void)
{
@@ -118,6 +126,9 @@ get_float4_infinity(void)
/* C99 standard way */
return (float) INFINITY;
#else
+#if (_MSC_VER >= 1800)
+#pragma warning(default:4756)
+#endif
/*
* On some platforms, HUGE_VAL is an infinity, elsewhere it's just the