[project @ 2002-10-11 14:25:24 by stolz]
authorstolz <unknown>
Fri, 11 Oct 2002 14:25:25 +0000 (14:25 +0000)
committerstolz <unknown>
Fri, 11 Oct 2002 14:25:25 +0000 (14:25 +0000)
'usleep' nightmare: Sometimes return type is void, sometimes int.

acconfig.h
configure.in
mk/config.h.in

index 49fc3ad..d61c783 100644 (file)
 /* Define if RTLD_NOW is available */
 #undef HAVE_RTLDNOW
 
+/* Define if usleep returns void */
+#undef USLEEP_RETURNS_VOID
+
 /* Define if C compiler supports long long types */
 #undef HAVE_LONG_LONG
 
index 64c942c..36e28c8 100644 (file)
@@ -1109,6 +1109,24 @@ AC_SUBST(HaveRtldNow)
 
 FPTOOLS_CHECK_LIB_NOWARN(m, atan)
 
+dnl ---------- usleep ----------
+dnl --- stolen from guile configure ---
+dnl --- FIXME: /usr/include/unistd.h can't be right?
+
+### On some systems usleep has no return value.  If it does have one,
+### we'd like to return it; otherwise, we'll fake it.
+AC_CACHE_CHECK([return type of usleep], cv_func_usleep_return_type,
+  [AC_EGREP_HEADER(changequote(<, >)<void[      ]+usleep>changequote([, ]),
+                   /usr/include/unistd.h,
+                   [cv_func_usleep_return_type=void],
+                   [cv_func_usleep_return_type=int])])
+case "$cv_func_usleep_return_type" in
+  "void" )
+    AC_DEFINE(USLEEP_RETURNS_VOID, 1,
+      [Define if the system headers declare usleep to return void.])
+  ;;
+esac
+
 dnl --------------------------------------------------
 dnl * test for GTK+
 dnl --------------------------------------------------
index b7d5889..d2b23e7 100644 (file)
 /* Define if RTLD_NOW is available */
 #undef HAVE_RTLDNOW
 
+/* Define if usleep returns void */
+#undef USLEEP_RETURNS_VOID
+
 /* Define if C compiler supports long long types */
 #undef HAVE_LONG_LONG