Switch to upstream sleep(3) and usleep(3).

Also fix the signature of usleep, and the definition of useconds_t which
should be unsigned, as the 'u' in its name implies.

This patch also cleans up the existing FreeBSD hacks by moving the libm
stuff from <sys/cdefs.h> to a libm-private header, and adding comments
about the hacks we use to build FreeBSD source.

Change-Id: Ibe5067a380502df94a0a3a7901969b35411085b6
This commit is contained in:
Elliott Hughes
2013-11-20 16:09:06 -08:00
parent 39bc7ecd45
commit ab61eb366a
11 changed files with 180 additions and 123 deletions

View File

@@ -159,7 +159,7 @@ extern int ftruncate64(int, off64_t);
extern int pause(void);
extern unsigned int alarm(unsigned int);
extern unsigned int sleep(unsigned int);
extern int usleep(unsigned long);
extern int usleep(useconds_t);
extern int gethostname(char *, size_t);