*BSD News Article 81817


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!newsfeed.internetmci.com!in3.uu.net!ott.istar!istar.net!van.istar!west.istar!news-w.ans.net!newsfeeds.ans.net!lantana.singnet.com.sg!chenab.lums.edu.pk!chenab.lums.edu.pk!not-for-mail
From: aslam@lums.edu.pk (Sohail Aslam)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: struct timespec (in sys/time.h) fields: ts_ or tv_
Date: 27 Oct 1996 12:53:46 +0500
Organization: Lahore University of Management Sciences (LUMS)
Lines: 39
Message-ID: <54v4ea$o0h@chenab.lums.edu.pk>
NNTP-Posting-Host: chenab.lums.edu.pk

I doenloaded MIT's pthreads package (thanks to pointer by  Bill Kish 
<kish@browncow.com>) and tried to compile under FreeBSD 2.1. The compile
failed on one of the files that uses "struct timespec" from <sys/time.h>.
I read through the bug report maintained by MIT and found a note on this.

Here is what how the note reads:
---------
Re: Compiling Pthreads to FreeBSD-2.1.0

daemon@ATHENA.MIT.EDU (Fri Oct 25 01:24:27 1996 )

Reply-To: proven@cygnus.com
To: Aredis Sebastiao de Oliveira <aredis@obelix.unicamp.br>
Cc: pthreads-bugs@MIT.EDU
In-Reply-To: Your message of "Thu, 24 Oct 1996 19:57:02 -0200."
             <199610242157.TAA14143@obelix.unicamp.br> 
Date: Fri, 25 Oct 1996 01:21:17 -0400
From: Christopher Provenzano <proven@proven.org>


In the system provided header files find the declaration of struct timespec
and change ts_sec to tv_sec and ts_nsec to tv_nsec. FreeBSD has it declared
wrong.

CAP
------------------

The file time.h has ts_ for timespec and tv_ for timeval. I don't think
this is just a typo; the timespec fields are referenced in stat.h,
nfs/xdr_subs.h and ufs/ufs/inode.h. I don't have the POSIX standards with
me. Should I change the system .h files or the pthreads source files? I
would prefer the latter.


-- 
Sohail Aslam                   
Department of Computer Science, Lahore University of Management Sciences (LUMS)
Lahore, Pakistan    tel: 92-42-572-2670   fax: 92-42-572-2591
email: aslam@lums.edu.pk