TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: Stas Degteff
from: Gerrit Kuehn
date: 2003-01-31 13:26:30
subject: Re: smapi cvs

Hello Stas!

Jan 30 18:31 03, Stas Degteff wrote to Benny Pedersen:

 BP>> /usr/include/unistd.h:371: parse error before '*' token
 BP>> /usr/include/unistd.h:383: conflicting types for `usleep'
 BP>> /usr/include/unistd.h:371: previous declaration of `usleep'

 SD> cvs date ?
 SD> compiler version ?

I fixed this yesterday. The problem was, that compiler.h defined sleep as
usleep. However, unistd.h (under Linux) defines both sleep and usleep, but
differently:

extern void usleep (__useconds_t __useconds) __THROW;
extern unsigned int sleep (unsigned int __seconds) __THROW;

FreeBSD doesn't have this problem, because it defines usleep and sleep the
same in unistd.h:

int      usleep __P((unsigned int));
unsigned int     sleep __P((unsigned int));

The solution I chose was to not define sleep for Linux and FreeBSD in
compiler.h at all, because their own defines from unistd.h can be used;
works fine here.


Regards,
Gerrit

--- Msged/BSD 6.1.1
* Origin: They pursued it with forks and hope (2:2411/12)
SEEN-BY: 633/267 270
@PATH: 2411/12 413 2432/200 2476/418 2410/201 774/605 123/500 106/1 379/1
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.