David> I'm not sure what you mean. My current sources look OK and
David> I know they work in GNU libc, but maybe I'm missing something
David> since I haven't actually tried the new times() in libc-0.4x.
Ok, my english was somehow strange; let's retry in C:
/* --- */
#include <sys/types.h>
#include <time.h>
#include <sys/times.h>
#include <unistd.h>
#include <stdio.h>
main() {
time_t my_t;
struct tms my_tms;
long rt, rts;
rt= (long)time(&my_t);
rts= (long)times(&my_tms);
printf("time() returned %ld\n", (long)rt);
printf("times() returned %ld\n", (long)rts);
if ( rts == rt || rts == (rt + 1) )
printf("!\n");
else
printf("I prefer that\n");
/* misc. */
printf("\n");
printf("current time: %ld\n",(long)my_t);
printf("current times: utime=%ld stime=%ld\n",
(long)my_tms.tms_utime,
(long)my_tms.tms_stime);
}
/* --- */
What I get with my (unmodifed) Linux/Alpha/BLADE_0.3 [unmodified:
e.g. without no updates of libraries] is:
time() returned 826217813
times() returned 826217813
!
current time: 826217813
current times: utime=0 stime=4
What I get with my Slackware Linux/i486 is:
time() returned 826196909
times() returned 553681879
I prefer that
current time: 826196909
current times: utime=0 stime=2
What do you prefer? (take of course this ubiquitous? question as you please!)
fred
PS: it's just for fun... I had very few problems with Linux/Alpha libs and
system headers: you've done a great job.