From nobody  Thu Apr 17 09:24:50 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.5/8.8.5) id JAA18590;
          Thu, 17 Apr 1997 09:24:50 -0700 (PDT)
Message-Id: <199704171624.JAA18590@freefall.freebsd.org>
Date: Thu, 17 Apr 1997 09:24:50 -0700 (PDT)
From: stb@freebsd.org
To: freebsd-gnats-submit@freebsd.org
Subject: sys/time.h defines timespec with ts_sec instead of tv_sec
X-Send-Pr-Version: www-1.0

>Number:         3315
>Category:       bin
>Synopsis:       sys/time.h defines timespec with ts_sec instead of tv_sec
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 17 09:30:04 PDT 1997
>Closed-Date:    Thu Apr 17 11:02:05 PDT 1997
>Last-Modified:  Thu Apr 17 11:10:06 PDT 1997
>Originator:     Stefan Bethke
>Release:        2.1.5
>Organization:
>Environment:
>Description:
sys/time.h defines struct timespec with members ts_sec and ts_nsec.
Solaris 2, Irix 6.2, Digital UNIX 4.0c, and AIX 4.1 all define
the members as tv_sec and tv_nsec (although in different files).
>How-To-Repeat:
Try compiling mit-pthreads.
>Fix:
*** time.h.orig Thu Apr 17 18:14:41 1997
--- time.h      Thu Apr 17 18:15:11 1997
***************
*** 50,57 ****
   * Structure defined by POSIX.4 to be like a timeval.
   */
  struct timespec {
!       long    ts_sec;         /* seconds */
!       long    ts_nsec;        /* and nanoseconds */
  };

  #define       TIMEVAL_TO_TIMESPEC(tv, ts) {                                  \
--- 50,57 ----
   * Structure defined by POSIX.4 to be like a timeval.
   */
  struct timespec {
!       long    tv_sec;         /* seconds */
!       long    tv_nsec;        /* and nanoseconds */
  };

  #define       TIMEVAL_TO_TIMESPEC(tv, ts) {                                  \

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: gpalmer 
State-Changed-When: Thu Apr 17 11:02:05 PDT 1997 
State-Changed-Why:  
Fixed in later releases of FreeBSD (2.2-RELEASE and later to be 
specific) 

From: "Gary Palmer" <gpalmer@freebsd.org>
To: stb@freebsd.org
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/3315: sys/time.h defines timespec with ts_sec instead of tv_sec 
Date: Thu, 17 Apr 1997 14:05:52 -0400

 stb@freebsd.org wrote in message ID
 <199704171624.JAA18590@freefall.freebsd.org>:
 > *** time.h.orig Thu Apr 17 18:14:41 1997
 > --- time.h      Thu Apr 17 18:15:11 1997
 > ***************
 > *** 50,57 ****
 >    * Structure defined by POSIX.4 to be like a timeval.
 >    */
 >   struct timespec {
 > !       long    ts_sec;         /* seconds */
 > !       long    ts_nsec;        /* and nanoseconds */
 >   };
 > 
 >   #define       TIMEVAL_TO_TIMESPEC(tv, ts) {                                
 >   \
 > --- 50,57 ----
 >    * Structure defined by POSIX.4 to be like a timeval.
 >    */
 >   struct timespec {
 > !       long    tv_sec;         /* seconds */
 > !       long    tv_nsec;        /* and nanoseconds */
 >   };
 > 
 >   #define       TIMEVAL_TO_TIMESPEC(tv, ts) {                                
 >   \
 
 P.S. That's not a fix ... you forgot to patch all the code in the
 source tree that depends on ts_sec and ts_nsec... FreeBSD 2.2 has all
 these changes though.
 
 Gary
 --
 Gary Palmer                                          FreeBSD Core Team Member
 FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info
>Unformatted:
