docs/87681: [PATCH] correct gettimeofday manpage, document one known bug

Andreas Kohn andreas at syndrom23.de
Wed Oct 19 19:30:17 UTC 2005


>Number:         87681
>Category:       docs
>Synopsis:       [PATCH] correct gettimeofday manpage, document one known bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 19 19:30:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Kohn
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 7.0-CURRENT #35: Sun Oct  2 14:16:27 CEST 2005
    root at klamath.syndrom23.de:/usr/obj/usr/src/sys/KLAMATH



>Description:


struct timeval's tv_sec member should be time_t according to http://www.opengroup.org/onlinepubs/007908799/xsh/systime.h.html. It isn't on FreeBSD, due to alpha compatibility requirements with Tru64. 

The attached patch documents that, and also updates the description of the structs with the correct types found in _timeval.h

For more information, please consider the thread starting at 
http://lists.freebsd.org/pipermail/freebsd-hackers/2005-October/013948.html




>How-To-Repeat:


N/A


>Fix:


--- gettimeofday.2.diff begins here ---
Index: gettimeofday.2
===================================================================
RCS file: /storage/freebsd/cvs/src/lib/libc/sys/gettimeofday.2,v
retrieving revision 1.25
diff -u -r1.25 gettimeofday.2
--- gettimeofday.2	2 Jul 2004 23:52:13 -0000	1.25
+++ gettimeofday.2	8 Oct 2005 16:27:40 -0000
@@ -82,8 +82,8 @@
 .Pp
 .Bd -literal
 struct timeval {
-	long	tv_sec;		/* seconds since Jan. 1, 1970 */
-	long	tv_usec;	/* and microseconds */
+	long		tv_sec;		/* seconds since Jan. 1, 1970 */
+	suseconds_t	tv_usec;	/* and microseconds */
 };
 
 struct timezone {
@@ -133,3 +133,5 @@
 .Fn gettimeofday
 system call appeared in
 .Bx 4.2 .
+.Sh BUGS
+The tv_sec member of struct timeval should be a time_t.
--- gettimeofday.2.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list