You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Dave Dykstra <dw...@bell-labs.com> on 1998/09/23 19:07:59 UTC
mod_status/3055: Code for determining ticks per second can be more portable
>Number: 3055
>Category: mod_status
>Synopsis: Code for determining ticks per second can be more portable
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Wed Sep 23 10:10:01 PDT 1998
>Last-Modified:
>Originator: dwd@bell-labs.com
>Organization:
apache
>Release: 1.3.2
>Environment:
At least Amdahl's UTS 2.1
>Description:
The code for determining ticks per second doesn't work on a system that
doesn't support sysconf(). There was also specific code for the NEXT
operating system that used HZ; I recommend always defaulting to that if
_SC_CLK_TCK is not defined (assuming it is not defined on NEXT).
It turns out that I couldn't fully test this on UTS 2.1 where I had the
problem, because of a compiler bug that causes it to fail at the assembly
stage. I ended up disabling it with --disable-module=status. A very similar
problem had already had me disabling the include module on this operating
system.
>How-To-Repeat:
>Fix:
*** modules/standard/mod_status.c Wed Sep 23 11:40:52 1998
--- modules/standard/mod_status.c.O Wed Sep 23 11:39:42 1998
***************
*** 240,251 ****
unsigned long bcount = 0;
unsigned long kbcount = 0;
long req_time;
! #ifndef NO_TIMES
! #ifdef _SC_CLK_TCK
! float tick = sysconf(_SC_CLK_TCK);
! #else
float tick = HZ;
! #endif
#endif
int short_report = 0;
int no_table_report = 0;
--- 240,249 ----
unsigned long bcount = 0;
unsigned long kbcount = 0;
long req_time;
! #if defined(NEXT)
float tick = HZ;
! #elif !defined(NO_TIMES)
! float tick = sysconf(_SC_CLK_TCK);
#endif
int short_report = 0;
int no_table_report = 0;
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]