> With libc6 2.3.5-6 on i386, this program:
>
>   #include <stdio.h>
>   #include <time.h>
>   main() { printf("%d\n",(int)time((time_t *)123)); }
>
> prints "-14".  The time(2) manpage says it would return -1.  I don't
> know if this is a documentation error or a glibc bug, but the man page
> appears old so I figured I'd start here.

Jim,

A little experimentation makes me think this is a bug in glibc,
but I have not spotted what could be the cause.
I suspect the -14 relates to EFAULT (error number 14), but
this should not be getting returned as the function result.
I suggest reassigning this bug, or perhaps raising a report
in http://sourceware.org/bugzilla/.

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  Grab the latest
tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/
and grep the source files for 'FIXME'.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to