zsh-workers
 help / color / mirror / code / Atom feed
* Zsh 3.02 Nextstep CLK_TCK question...
@ 1997-01-03 14:40 Robert F Tobler
  0 siblings, 0 replies; only message in thread
From: Robert F Tobler @ 1997-01-03 14:40 UTC (permalink / raw)
  To: Zsh Workers


I just got zsh 3.0.2 and I have one question concerning CLK_TCK:

The workaround for the Nextstep 3.3 bug has been put in at line 719, but why  
has it been omitted around line 673?  This might be dead code for all I know,  
since I compiled it an ran it and it seemed to work... but it would be hard  
for me to test different conditions.

So if the other place is not dead code, please put the patch in. For that  
matter, in order to avoid having these patches in two places you could use the  
following macro definitions:

#ifdef _SC_CLK_TCK
    /* fetch clock ticks per second from sysconf only the first time used  */
    #define SET_CLK_TCK(_clktck)
	    do { \
		if (!(_clktck)) (_clktck) = sysconf(_SC_CLK_TCK); \
	    } \
	    while (0)
#else
# ifdef __NeXT__
    /* NeXTStep 3.3 defines CLK_TCK wrongly */
    #define SET_CLK_TCK(_clktck) ((_clktck) = 60)
# else
#  ifdef CLK_TCK
    #define SET_CLK_TCK(_clktck) ((_clktck) = CLK_TCK)
#  else
#   ifdef HZ
     #define SET_CLK_TCK(_clktck) ((_clktck) = HZ)
#   else
     #define SET_CLK_TCK(_clktck) ((_clktck) = 60)
#   endif
#  endif
# endif
#endif


and use only:
    SET_CLK_TCK(clktck);

at the two points in question.

------------------------------------------------------------------------
  Robert F. Tobler                 -  tel:+43(1)58801-4585,fax:5874932
  Institute of Computer Graphics   -  mailto:rft@cg.tuwien.ac.at
  Vienna University of Technology  -  http://www.cg.tuwien.ac.at/~rft/




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-01-03 14:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-03 14:40 Zsh 3.02 Nextstep CLK_TCK question Robert F Tobler

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).