Subject: | Compilation failure using MS VC++ 7.0.(DBD-Pg-2.13.1_1) |
Hi Greg,
Unfortunately compilation fails using MS VC++ 7.0.
This is because MS VC++ 7.0 has neither strncasecmp, strtof, nor atoll.
Could you apply attached patches?
Best regards,
Taro Nishino
Subject: | quote.c.diff |
--- quote.c.orig Tue Jul 14 11:53:14 2009
+++ quote.c Tue Jul 14 13:38:47 2009
@@ -11,6 +11,33 @@
#include "Pg.h"
+#if defined (_WIN32) && !defined (strncasecmp)
+int
+strncasecmp(const char *s1, const char *s2, size_t n)
+{
+ while(n > 0
+ && toupper((unsigned char)*s1) == toupper((unsigned char)*s2))
+ {
+ if(*s1 == '\0')
+ return 0;
+ s1++;
+ s2++;
+ n--;
+ }
+ if(n == 0)
+ return 0;
+ return toupper((unsigned char)*s1) - toupper((unsigned char)*s2);
+}
+#endif
+
+#if defined (_WIN32) && !defined (strtof)
+float
+strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+#endif
+
/*
The 'estring' indicates if the server is capable of using the E'' syntax
In other words, is it 8.1 or better?
Subject: | dbdimp.c.diff |
--- dbdimp.c.orig Tue Jul 14 11:56:45 2009
+++ dbdimp.c Tue Jul 14 13:34:38 2009
@@ -15,6 +15,10 @@
#include "Pg.h"
+#if defined (_WIN32) && !defined (atoll)
+# define atoll(X) _atoi64(X)
+#endif
+
#ifndef powf
#define powf (float)pow
#endif