tags 420980 +patch
thanks
The appended patch fixes this.
Thiemo
diff -urpN john-1.6.orig/src/bench.c john-1.6/src/bench.c
--- john-1.6.orig/src/bench.c 2000-04-01 11:21:43.000000000 +0100
+++ john-1.6/src/bench.c 2007-06-17 21:24:42.000000000 +0100
@@ -103,7 +103,7 @@ int benchmark_format(struct fmt_main *fo
it.it_value.tv_sec = BENCHMARK_TIME;
if (setitimer(ITIMER_REAL, &it, NULL)) pexit("setitimer");
#else
- sig_timer_emu_init(BENCHMARK_TIME * CLK_TCK);
+ sig_timer_emu_init(BENCHMARK_TIME * CLOCKS_PER_SEC);
#endif
start_real = times(&buf);
@@ -144,8 +144,8 @@ void benchmark_cps(unsigned ARCH_WORD co
{
unsigned long cps_hi, cps_lo;
- cps_hi = count * CLK_TCK / time;
- cps_lo = count * ((unsigned ARCH_WORD)CLK_TCK * 10) / time % 10;
+ cps_hi = count * CLOCKS_PER_SEC / time;
+ cps_lo = count * ((unsigned ARCH_WORD)CLOCKS_PER_SEC * 10) / time % 10;
sprintf(buffer, cps_hi < 100 ? "%lu.%lu" : "%lu", cps_hi, cps_lo);
}
diff -urpN john-1.6.orig/src/best.c john-1.6/src/best.c
--- john-1.6.orig/src/best.c 2000-04-01 11:21:43.000000000 +0100
+++ john-1.6/src/best.c 2007-06-17 21:48:41.000000000 +0100
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
fprintf(stderr, "FAILED\n");
} else {
virtual = (unsigned long)
- (results.count * CLK_TCK * 10 / results.virtual);
+ (results.count * CLOCKS_PER_SEC * 10 / results.virtual);
benchmark_cps(results.count, results.real, s_real);
benchmark_cps(results.count, results.virtual, s_virtual);
diff -urpN john-1.6.orig/src/signals.c john-1.6/src/signals.c
--- john-1.6.orig/src/signals.c 2000-04-01 11:21:43.000000000 +0100
+++ john-1.6/src/signals.c 2007-06-17 21:49:43.000000000 +0100
@@ -217,7 +217,7 @@ static void sig_install_timer()
{
#if !OS_TIMER
signal(SIGALRM, sig_handle_timer);
- sig_timer_emu_init(TIMER_INTERVAL * CLK_TCK);
+ sig_timer_emu_init(TIMER_INTERVAL * CLOCKS_PER_SEC);
#else
struct sigaction sa;
struct itimerval it;
diff -urpN john-1.6.orig/src/status.h john-1.6/src/status.h
--- john-1.6.orig/src/status.h 2000-04-01 11:21:43.000000000 +0100
+++ john-1.6/src/status.h 2007-06-17 21:49:36.000000000 +0100
@@ -50,8 +50,8 @@ extern void status_update_crypts(unsigne
* Returns the elapsed time in seconds.
*
* Currently this does not support running for more than 248 days total
- * (assuming CLK_TCK is 100). However, this should survive uptimes of the
- * box we are running on of more than 248 days.
+ * (assuming CLOCKS_PER_SEC is 100). However, this should survive uptimes
+ * of the box we are running on of more than 248 days.
*/
extern unsigned int status_get_time();
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]