diff -N -r -c HLib-1.3/Library/basic.c HLib-1.3new/Library/basic.c *** HLib-1.3/Library/basic.c 2004-12-12 17:42:31.000000000 +0100 --- HLib-1.3new/Library/basic.c 2007-05-10 16:06:19.609349824 +0200 *************** *** 16,25 **** #include #include ! #if HAVE_UNISTD_H && HAVE_TERMIOS_H # include - # include #endif static const int PROGBARFREQ=4; --- 16,25 ---- #include #include ! #if HAVE_TERMIOS_H # include #endif + #include static const int PROGBARFREQ=4; *************** *** 73,81 **** if(m == NULL) { (void) fprintf(stderr, ! "Could not allocate %u units of storage.\n" "File %s, line %d\n", ! sz, file, line); abort(); } --- 73,81 ---- if(m == NULL) { (void) fprintf(stderr, ! "Could not allocate %lu units of storage.\n" "File %s, line %d\n", ! (unsigned long) sz, file, line); abort(); } *************** *** 273,278 **** --- 273,279 ---- int fraction; int seconds; clock_t t; + long clk_tck; int i; assert(allsteps > 0); *************** *** 280,285 **** --- 281,288 ---- (void) data; + clk_tck = sysconf(_SC_CLK_TCK); + switch(mode) { case 0: last_fraction = 0; *************** *** 298,305 **** seconds = last_seconds; t = times(&buffer); ! if(8 * (t - tlast) > CLK_TCK) { ! seconds = ((allsteps - step) * (t - tstart)) / step / CLK_TCK; estimate[next_estimate] = seconds; next_estimate = (next_estimate + 1) % 32; --- 301,308 ---- seconds = last_seconds; t = times(&buffer); ! if(8 * (t - tlast) > clk_tck) { ! seconds = ((allsteps - step) * (t - tstart)) / step / clk_tck; estimate[next_estimate] = seconds; next_estimate = (next_estimate + 1) % 32;