Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Zsh 3.02 Nextstep CLK_TCK question...
- X-seq: zsh-workers 2715
- From: Robert F Tobler <rft@xxxxxxxxxxxxxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: Zsh 3.02 Nextstep CLK_TCK question...
- Date: Fri, 3 Jan 97 15:40:09 +0100
- Original-received: by NeXT.Mailer (1.118.2)
- Pp-warning: Illegal Received field on preceding line
- Reply-to: rft@xxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxx
Vienna University of Technology - http://www.cg.tuwien.ac.at/~rft/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author