httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_status.c
Date Fri, 02 Feb 2001 19:28:13 GMT
stoddard    01/02/02 11:28:12

  Modified:    modules/generators mod_status.c
  Log:
  Should consider APRizing the entire module. For now, use HAVE_TIMES
  to indicate if we have the necessary structures.  This is part of getting
  mod_status working on Windows
  
  Revision  Changes    Path
  1.20      +14 -13    httpd-2.0/modules/generators/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_status.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_status.c	2001/02/01 21:54:14	1.19
  +++ mod_status.c	2001/02/02 19:28:06	1.20
  @@ -237,7 +237,7 @@
       unsigned long bcount = 0;
       unsigned long kbcount = 0;
       long req_time;
  -#ifndef NO_TIMES
  +#ifdef HAVE_TIMES
   #ifdef _SC_CLK_TCK
       float tick = sysconf(_SC_CLK_TCK);
   #else
  @@ -326,12 +326,12 @@
   	        lres = score_record.access_count;
   	        bytes = score_record.bytes_served;
   	        if (lres != 0 || (res != SERVER_READY && res != SERVER_DEAD)) {
  -#ifndef NO_TIMES
  +#ifdef HAVE_TIMES
   		    tu += score_record.times.tms_utime;
   		    ts += score_record.times.tms_stime;
   		    tcu += score_record.times.tms_cutime;
   		    tcs += score_record.times.tms_cstime;
  -#endif /* NO_TIMES */
  +#endif /* HAVE_TIMES */
   		    count += lres;
   		    bcount += bytes;
   		    if (bcount >= KBYTE) {
  @@ -371,7 +371,7 @@
   	    ap_rprintf(r, "Total Accesses: %lu\nTotal kBytes: %lu\n",
   		count, kbcount);
   
  -#ifndef NO_TIMES
  +#ifdef HAVE_TIMES
   	    /* Allow for OS/2 not having CPU stats */
   	    if (ts || tu || tcu || tcs)
   		ap_rprintf(r, "CPULoad: %g\n",
  @@ -395,7 +395,7 @@
   	    ap_rprintf(r, "Total accesses: %lu - Total Traffic: ", count);
   	    format_kbyte_out(r, kbcount);
   
  -#ifndef NO_TIMES
  +#ifdef HAVE_TIMES
   	    /* Allow for OS/2 not having CPU stats */
   	    ap_rputs("<br>\n", r);
   	    ap_rprintf(r, "CPU Usage: u%g s%g cu%g cs%g",
  @@ -493,7 +493,7 @@
   	    if (no_table_report)
   		ap_rputs("<p><hr><h2>Server Details</h2>\n\n", r);
   	    else
  -#ifdef NO_TIMES
  +#ifndef HAVE_TIMES
   		/* Allow for OS/2 not having CPU stats */
   		ap_rputs("<p>\n\n<table border=0><tr><th>Srv<th>PID<th>Acc<th>M\n<th>SS<th>Req<th>Conn<th>Child<th>Slot<th>Client<th>VHost<th>Request</tr>\n\n",
r);
   #else
  @@ -510,17 +510,18 @@
   		vhost = NULL;
   	    }
   
  +
   #if defined(NO_GETTIMEOFDAY)
  -#ifndef NO_TIMES
  +#ifdef HAVE_TIMES
   	    if (score_record.start_time == (clock_t) 0)
  -#endif /* NO_TIMES */
  +#endif /* HAVE_TIMES */
   		req_time = 0L;
  -#ifndef NO_TIMES
  +#ifdef HAVE_TIMES
   	    else {
   		req_time = score_record.stop_time - score_record.start_time;
   		req_time = (req_time * 1000) / (int) tick;
   	    }
  -#endif /* NO_TIMES */
  +#endif /* HAVE_TIMES */
   #else
   	    if (score_record.start_time == 0L &&
   		score_record.start_time == 0L)
  @@ -587,7 +588,7 @@
   			    ap_rputs("?STATE?", r);
   			    break;
   			}
  -#ifdef NO_TIMES
  +#ifndef HAVE_TIMES
   			/* Allow for OS/2 not having CPU stats */
   			ap_rprintf(r, "]\n %.0f %ld (",
   #else
  @@ -661,7 +662,7 @@
   			    ap_rputs("<td>?", r);
   			    break;
   			}
  -#ifdef NO_TIMES
  +#ifndef HAVE_TIMES
   			/* Allow for OS/2 not having CPU stats */
   			ap_rprintf(r, "\n<td>%.0f<td>%ld",
   #else
  @@ -697,7 +698,7 @@
   	}
   
   	if (!(short_report || no_table_report)) {
  -#ifdef NO_TIMES
  +#ifndef HAVE_TIMES
   	    ap_rputs("</table>\n \
   <hr> \
   <table>\n \
  
  
  

Mime
View raw message