summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2006-06-11 04:04:04 +0000
committerFederico Di Gregorio <fog@initd.org>2006-06-11 04:04:04 +0000
commit0ce52078713846d8874959df896f81c9aeea7aac (patch)
treec1319b307e594caed8f0d24c1ba2a3b5ef9ec31d
parent1ac75e3b80c4ca0a576b05bb29f94e2e33fb50e9 (diff)
downloadpsycopg2-0ce52078713846d8874959df896f81c9aeea7aac.tar.gz
#warning fix.
-rw-r--r--ChangeLog20
-rw-r--r--psycopg/adapter_binary.c2
-rw-r--r--psycopg/adapter_qstring.c2
3 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 9af3b7f..a3a5339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,20 @@
2006-06-11 Federico Di Gregorio <fog@initd.org>
- * Applied patch to adapt an empty list into an empty array
- and not to NULL (from iGGy, closes: #108).
+ * psycopg/adapter_binary.c: as below.
- * Applied patch from wkv to avoid under-allocating query
- space when the parameters are not of the right type
- (Closes: #110).
+ * psycopg/adapter_qstring.c: wrapped #warning in #ifdef __GCC__
+ because other compilers don't have it and it will just break
+ compilation (patch from jason, our great win32 builder).
- * Applied patch from wkv to avoid off by one allocation of
- connection encoding string (Closes: #109).
+ * psycopg/adapter_list.c: applied patch to adapt an empty list
+ into an empty array and not to NULL (from iGGy, closes: #108).
+
+ * psycopg/cursor_type.c: applied patch from wkv to avoid
+ under-allocating query space when the parameters are not of the
+ right type (Closes: #110).
+
+ * psycopg/connection_int.c: applied patch from wkv to avoid off
+ by one allocation of connection encoding string (Closes: #109).
2006-06-09 Federico Di Gregorio <fog@initd.org>
diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c
index 852e628..b853890 100644
--- a/psycopg/adapter_binary.c
+++ b/psycopg/adapter_binary.c
@@ -46,7 +46,9 @@ binary_escape(unsigned char *from, unsigned int from_length,
(PG_MAJOR_VERSION == 8 && PG_MINOR_VERSION == 1 && PG_PATCH_VERSION >= 4)
return PQescapeByteaConn(conn, from, from_length, to_length);
#else
+#ifdef __GNUC__
#warning "YOUR POSTGRESQL VERSION IS TOO OLD AND IT CAN BE INSECURE"
+#endif
return PQescapeBytea(from, from_length, to_length);
#endif
}
diff --git a/psycopg/adapter_qstring.c b/psycopg/adapter_qstring.c
index ca627d7..7caed9a 100644
--- a/psycopg/adapter_qstring.c
+++ b/psycopg/adapter_qstring.c
@@ -47,7 +47,9 @@ qstring_escape(char *to, char *from, size_t len, PGconn *conn)
int err;
return PQescapeStringConn(conn, to, from, len, &err);
#else
+#ifdef __GNUC__
#warning "YOUR POSTGRESQL VERSION IS TOO OLD AND IT CAN BE INSECURE"
+#endif
return PQescapeString(to, from, len);
#endif
}