diff --git a/ChangeLog b/ChangeLog index 9af3b7fd..a3a53392 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,14 +1,20 @@ 2006-06-11 Federico Di Gregorio - * 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 diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c index 852e6289..b853890e 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 ca627d75..7caed9a2 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 }