aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-05-18 12:52:28 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-05-18 12:52:28 -0400
commitcf39aebf17c571456c9dbcc06d3569a98e2fcecc (patch)
tree56e42c359ca4af6ee0da04769ce298314d7168de
parent29ce50091d128faaabd0a4044e91a7d0da11bb8e (diff)
downloadpostgresql-cf39aebf17c571456c9dbcc06d3569a98e2fcecc.tar.gz
postgresql-cf39aebf17c571456c9dbcc06d3569a98e2fcecc.zip
Recognize that MSVC can support strtoll() and strtoull().
This is needed for full support of "long long" variables in ecpg, but the previous patch for bug #15080 (commits 51057feaa et al) missed it. In MSVC versions where the functions don't exist under those names, we can nonetheless use _strtoi64() and _strtoui64(). Like the previous patch, back-patch all the way. Dang Minh Huong Discussion: https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org
-rw-r--r--src/include/pg_config.h.win3216
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index e02ee8298ba..76617e2ae27 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -357,13 +357,25 @@
#define HAVE_STRONG_RANDOM 1
/* Define to 1 if you have the `strtoll' function. */
-//#define HAVE_STRTOLL 1
+#ifdef HAVE_LONG_LONG_INT_64
+#define HAVE_STRTOLL 1
+/* Before VS2013, use Microsoft's nonstandard equivalent function */
+#if (_MSC_VER < 1800)
+#define strtoll _strtoi64
+#endif
+#endif
/* Define to 1 if you have the `strtoq' function. */
/* #undef HAVE_STRTOQ */
/* Define to 1 if you have the `strtoull' function. */
-//#define HAVE_STRTOULL 1
+#ifdef HAVE_LONG_LONG_INT_64
+#define HAVE_STRTOULL 1
+/* Before VS2013, use Microsoft's nonstandard equivalent function */
+#if (_MSC_VER < 1800)
+#define strtoull _strtoui64
+#endif
+#endif
/* Define to 1 if you have the `strtouq' function. */
/* #undef HAVE_STRTOUQ */