Author: poeml Date: Thu Sep 2 15:56:08 2010 New Revision: 8099 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8099&view=rev Log: mod_mirrorbrain: - The old (1.2) Apache Runtime's PostgreSQL adapter didn't know the APR_DBD_TYPE_LONGLONG (%lld) format string yet, and preparation of SQL statements failed for this reason. This is fixed by using %d now with APR 1.2. Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mod_mirrorbrain/mod_mirrorbrain.c?rev=8099&r1=8098&r2=8099&view=diff ============================================================================== --- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original) +++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Thu Sep 2 15:56:08 2010 _at_@ -124,6 +124,14 @@ #endif #define DEFAULT_MIN_MIRROR_SIZE 4096 +#if (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION == 2) +#define DBD_FIRST_ROW 0 +#define DBD_LLD_FMT "d" +#else +#define DBD_FIRST_ROW 1 +#define DBD_LLD_FMT "lld" +#endif + #define DEFAULT_QUERY "SELECT id, identifier, region, country, " \ "asn, prefix, score, baseurl, " \ "region_only, country_only, " \ _at_@ -142,15 +150,9 @@ "WHERE file_id = (SELECT id " \ "FROM filearr " \ "WHERE path = %s) " \ - "AND size = %lld " \ - "AND mtime = %lld " \ + "AND size = %" DBD_LLD_FMT " " \ + "AND mtime = %" DBD_LLD_FMT " " \ "LIMIT 1" - -#if (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION == 2) -#define DBD_FIRST_ROW 0 -#else -#define DBD_FIRST_ROW 1 -#endif module AP_MODULE_DECLARE_DATA mirrorbrain_module; _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Thu Sep 02 2010 - 13:56:12 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT