From: cpickett Date: Sun, 28 Dec 2008 07:39:38 +0000 (+0000) Subject: * replace sleep() as well X-Git-Tag: 0.10.0~698 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecf0e96ecb3986788378c7b9dd7588ce1986e298;p=check * replace sleep() as well git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@464 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/configure.ac b/configure.ac index 0e3b029..7c248b6 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,7 @@ AC_FUNC_REALLOC AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_CHECK_FUNCS([alarm gettimeofday localtime_r memmove memset putenv setenv strdup strerror strrchr strstr]) -AC_REPLACE_FUNCS([strsignal]) +AC_REPLACE_FUNCS([sleep strsignal]) # Output files AC_CONFIG_HEADERS([config.h]) diff --git a/lib/sleep.c b/lib/sleep.c new file mode 100644 index 0000000..e8ee839 --- /dev/null +++ b/lib/sleep.c @@ -0,0 +1,16 @@ +/* This file gets included if AC_REPLACE_FUNCS([sleep]) cannot find the function. */ +#if HAVE_CONFIG_H +#include +#endif + +#include + +#if !HAVE_SLEEP +unsigned int sleep (unsigned int seconds); +#endif /* !HAVE_SLEEP */ + +unsigned int +sleep (unsigned int seconds) +{ + return 0; +}