]> granicus.if.org Git - check/commitdiff
* replace sleep() as well
authorcpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sun, 28 Dec 2008 07:39:38 +0000 (07:39 +0000)
committercpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sun, 28 Dec 2008 07:39:38 +0000 (07:39 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@464 64e312b2-a51f-0410-8e61-82d0ca0eb02a

configure.ac
lib/sleep.c [new file with mode: 0644]

index 0e3b0297010e022b0d8a2efa0b6c80befa3209fe..7c248b63354612fa19ea73d721ff70eb9a7c8f37 100644 (file)
@@ -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 (file)
index 0000000..e8ee839
--- /dev/null
@@ -0,0 +1,16 @@
+/* This file gets included if AC_REPLACE_FUNCS([sleep]) cannot find the function. */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if !HAVE_SLEEP
+unsigned int sleep (unsigned int seconds);
+#endif /* !HAVE_SLEEP */
+
+unsigned int
+sleep (unsigned int seconds)
+{
+  return 0;
+}