From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,c2df9037e786eac X-Google-Attributes: gidfee84,public From: Jeff Denham Subject: Re: nanosleep on Digial Unix 4.0 Date: 1998/08/19 Message-ID: <35DACB9B.FCE86A12@brighttiger.com>#1/1 X-Deja-AN: 382626609 Content-Transfer-Encoding: 8bit References: <35D9B486.2A5999AC@sebb.bel.alcatel.be> Content-Type: text/plain; charset=iso-8859-1 X-Trace: newsreader.digex.net 903531319 207.86.119.34 (Wed, 19 Aug 1998 08:55:19 EDT) Organization: Bright Tiger Technologies MIME-Version: 1.0 NNTP-Posting-Date: Wed, 19 Aug 1998 08:55:19 EDT Newsgroups: comp.unix.osf.osf1 The man page should but doesn't say it -- nanosleep() is in librt. So add -lrt to your build line. Stay away from the _D9 stuff! It's old cruft from pre-Digital OSF days and should have been removed ages ago... Jeff Niel Markwick wrote: > I am porting a program from Solaris to Dec Unix and had some problems > with the nanosleep function. > > At first, the program would not link - it claimed nanosleep was an > undefined symbol. > > A search of libc.a revealed that there was no `nanosleep' symbol, but > there was a nanosleep_d9. > > An examination of /usr/include/timers.h reveals that if the macro > POSIX_4D9 is defined, a further macro is defined, renaming nanosleep to > nanosleep_d9. but the POSIX_4D9 macro is never defined, nor is it used > in any other include file. > > My program will now compile and link, but when run, nanosleep() does > nothing - except return with -1 and set errno to 78 (Function not > implemented). > > So what is going on here? I have a man page for nanosleep, that suggests > that it is implemented... > > I did a Dejanews search to find if any one else has had this problem, > only to find a thread from last December where it was stated that > nanosleep has beem implemented for ages on Dec Unix: > news:348C4CE1.C0F99586@zko.dec.com > http://www.dejanews.com/[ST_chan=cpu]/getdoc.xp?AN=296355420 > > I have worked around the problem, but I am just a bit curious about what > has happened to nanosleep! > > Thanks, > > Niel. > > PS: Digital UNIX V4.0D (Rev. 878) > > -- > Niel Markwick > Alcatel Bell Telecom, Work Email: markwicn@sebb.bel.alcatel.be > Kontich, Belgium. __________________________________________________ Jeff Denham (jdenham@brighttiger.com) Bright Tiger Technologies SmartCluster� Software for Distributed Web Servers http://www.brighttiger.com 125 Nagog Park Acton, MA 01720 Phone: (978) 263-5455 x177 Fax: (978) 263-5547