From mboxrd@z Thu Jan 1 00:00:00 1970 From: aoliva@gcc.gnu.org To: f.bettoni@saritel.it, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org Subject: Re: c++/3287: usleep() undeclared Date: Wed, 20 Jun 2001 15:05:00 -0000 Message-id: <20010620220536.22669.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00862.html List-Id: Synopsis: usleep() undeclared State-Changed-From-To: open->closed State-Changed-By: aoliva State-Changed-When: Wed Jun 20 15:05:36 2001 State-Changed-Why: The problem is that unistd.h doesn't always declare usleep(), and C++ requires every called function to have been previously declared. It seems to me that to get the appropriate declaration, you have to use -D_POSIX_SOURCE or -D_XOPEN_SOURCE_EXTENDED. g++ won't reject the code because of the lack of a declaration if you use -fpermissive. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3287&database=gcc