Subject: | Compiling with nmake |
OS: WIN32
Compiler: nmake
Current CVS will not compile with Visual Studio's nmake without substituting _stricmp() for strcasecmp().
Also there seems to be an error where variables are declared in the middle of a block, after a function call.
The attached diff adds code for the first problem, and corrects the second.
Thanks,
Joe
--- dbdpg\dbdimp.c 2004-09-28 18:01:23.000000000 +0200
+++ dbdpgJoe\dbdimp.c 2004-10-05 23:31:18.488715200 +0200
@@ -23,6 +23,10 @@
DBISTATE_DECLARE;
+#ifdef _MSC_VER
+#define strcasecmp(a,b) _stricmp((a),(b))
+#endif
+
/* Someday, we can abandon pre-7.4 and life will be much easier... */
#ifdef HAVE_PQprotocol
#define PG74 1
@@ -2091,13 +2095,13 @@
}
else if (8==kl && strEQ(key, "NULLABLE")) {
AV *av = newAV();
- retsv = newRV(sv_2mortal((SV*)av));
PGresult* result;
PGTransactionStatusType status;
D_imp_dbh_from_sth;
char *statement;
int nullable; /* 0 = not nullable, 1 = nullable 2 = unknown */
+ retsv = newRV(sv_2mortal((SV*)av));
New(0, statement, 100, char); /* freed below */
if (!statement)
croak("No memory");