From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 19004 invoked from network); 15 Jan 1999 21:37:14 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 15 Jan 1999 21:37:14 -0000 Received: from ares.cs.Virginia.EDU (ares.cs.Virginia.EDU [128.143.136.41] (may be forged)) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA16441 for ; Fri, 15 Jan 1999 16:13:50 -0500 Received: from adder.cs.Virginia.EDU (adder.cs.Virginia.EDU [128.143.137.18]) by ares.cs.Virginia.EDU (8.8.5/8.8.5) with ESMTP id QAA12107 for ; Fri, 15 Jan 1999 16:13:34 -0500 (EST) From: Greg Lindahl Received: (from lindahl@localhost) by adder.cs.Virginia.EDU (8.8.5/8.8.5) id QAA24246 for axp-list@redhat.com; Fri, 15 Jan 1999 16:13:35 -0500 (EST) Message-Id: <199901152113.QAA24246@adder.cs.Virginia.EDU> Subject: Re: struct timeval problem To: axp-list@redhat.com Date: Fri, 15 Jan 1999 16:13:34 -0500 (EST) In-Reply-To: <199901152100.NAA21342@netcom11.netcom.com> from "Munagala V. S. Ramanath" at Jan 15, 99 01:00:20 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Just noticed a discrepancy in RH 5.2 in the way 'struct timeval' is > defined in /usr/include/timebits.H: All non-Linux OSes seem to have a long for those fields. Linux has been confused about it for a while, and I am unhappy to see that the confusion is continuing. Doesn't anybody own a copy of the standard? > This means that code that previously did this: > gettimeofday( &p, &q ) ; > s = ctime( &p.tv_sec ) ; > > now needs to do this: > > time_t tmp ; > gettimeofday( &p, &q ) ; > tmp = p.tv_sec ; > s = ctime( &tmp ) ; That is already required since I don't think that tv_sec is supposed to be a time_t... a bug in the standard. But we have to follow the bugs, too. -- greg