[mirrorbrain-commits] r8101 - /trunk/mod_mirrorbrain/mod_mirrorbrain.c

From: <poeml_at_mirrorbrain.org>
Date: Thu, 02 Sep 2010 14:36:15 -0000
Author: poeml
Date: Thu Sep  2 16:36:15 2010
New Revision: 8101

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8101&view=rev
Log:
mod_mirrorbrain:
- Another fix for older (1.2) Apache Runtime: the format string %lld wasn't
  known yet at the time. So let's use APR_INT64_T_FMT which is defined in any
  case (ld on 1.2, lld on 1.3 and later). This fixes the mirror list and
  metalinks.

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=8101&r1=8100&r2=8101&view=diff
==============================================================================
--- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original)
+++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Thu Sep  2 16:36:15 2010
_at_@ -993,7 +993,7 @@
             /* split the string into an array of the actual pieces */
 
             apr_off_t n = r->finfo.size / h->sha1piecesize;
-            // XXX ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_mirrorbrain] dbd: %lld sha1 pieces", n);
+            // XXX ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_mirrorbrain] dbd: %" APR_INT64_T_FMT " sha1 pieces", n);
 
             h->sha1pieceshex = apr_array_make(r->pool, n, sizeof(const char *));
             int max = strlen(val);
_at_@ -2192,7 +2192,7 @@
 
         ap_rprintf(r, "  <file name=\"%s\">\n", basename);
         ap_rprintf(r, "    <size>%s</size>\n\n", apr_off_t_toa(r->pool, r->finfo.size));
-        ap_rprintf(r, "    <!-- <mtime>%lld</mtime> -->\n\n", 
+        ap_rprintf(r, "    <!-- <mtime>%" APR_INT64_T_FMT "</mtime> -->\n\n", 
                    apr_time_sec(r->finfo.mtime)); /* APR finfo times are in microseconds */
 
 
_at_@ -2506,7 +2506,7 @@
                    apr_off_t_toa(r->pool, r->finfo.size));
         time_str = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
         apr_rfc822_date(time_str, r->finfo.mtime);
-        ap_rprintf(r, "  <li>Last modified: %s (Unix time: %lld)</li>\n", time_str, apr_time_sec(r->finfo.mtime));
+        ap_rprintf(r, "  <li>Last modified: %s (Unix time: %" APR_INT64_T_FMT ")</li>\n", time_str, apr_time_sec(r->finfo.mtime));
 
         if (hashbag != NULL) {
             if (hashbag->sha256hex)




_______________________________________________
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.org
Received on Thu Sep 02 2010 - 14:36:16 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT