You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@hyperreal.org on 1998/06/09 23:17:55 UTC

cvs commit: apache-1.3/src/modules/proxy proxy_cache.c

martin      98/06/09 14:17:55

  Modified:    src/modules/proxy proxy_cache.c
  Log:
  Add casts for systems where sizeof(off_t) > sizeof(long).
  Sorry, but I see no other portable way to do it :-(
  Submitted by:	Ralf Engelschall <rs...@engelschall.com>
  
  Revision  Changes    Path
  1.43      +3 -3      apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -u -r1.42 -r1.43
  --- proxy_cache.c	1998/06/02 12:50:46	1.42
  +++ proxy_cache.c	1998/06/09 21:17:54	1.43
  @@ -331,7 +331,7 @@
       if (cmp_long61(&curbytes, &cachesize) < 0L) {
   	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
   			 "proxy GC: Cache is %ld%% full (nothing deleted)",
  -			 ((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
  +			 (long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
   	ap_unblock_alarms();
   	return;
       }
  @@ -362,7 +362,7 @@
   
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
   			 "proxy GC: Cache is %ld%% full (%d deleted)",
  -			 ((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
  +			 (long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
       ap_unblock_alarms();
   }
   
  @@ -594,7 +594,7 @@
   	q = ap_proxy_get_header(c->hdrs, "Content-Length");
   	if (q == NULL) {
   	    strp = ap_palloc(p, 15);
  -	    ap_snprintf(strp, 15, "%lu", c->len);
  +	    ap_snprintf(strp, 15, "%lu", (unsigned long)c->len);
   	    ap_proxy_add_header(c->hdrs, "Content-Length", strp, HDR_REP);
   	}
       }