ecpg_with_bigint_V2.patch

application/octet-stream

Filename: ecpg_with_bigint_V2.patch
Type: application/octet-stream
Part: 1
Message: RE: BUG #15080: ecpg on windows doesn't define HAVE_LONG_LONG_INT

Patch

Format: unified
File+
src/include/pg_config.h.win32 14 2
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 9149c7a..1ac7ee0 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -385,13 +385,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 strtoll _strtoi64
+#endif
+#endif
 
 /* Define to 1 if you have the `strtouq' function. */
 /* #undef HAVE_STRTOUQ */