The argument type of usleep varies from system to system,
authorJim Blandy <jimb@red-bean.com>
Mon, 12 Oct 1998 21:08:38 +0000 (21:08 +0000)
committerJim Blandy <jimb@red-bean.com>
Mon, 12 Oct 1998 21:08:38 +0000 (21:08 +0000)
as does the return type.  We really shouldn't be redefining usleep
at all, but I don't have time to clean that up before the 1.3.
release.  It's on the schedule for afterwards.  (Thanks to Julian
Satchell.)
* coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
definition.
* scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
* scmconfig.h: Regenerated.

libguile/coop.c
libguile/scmconfig.h.in
libguile/scmsigs.c

index 8935997..0cb1bea 100644 (file)
@@ -40,7 +40,7 @@
  * If you do not wish that, delete this exception notice.  */
 \f
 
-/* $Id: coop.c,v 1.12 1998-10-04 12:10:11 jimb Exp $ */
+/* $Id: coop.c,v 1.13 1998-10-12 21:08:36 jimb Exp $ */
 
 /* Cooperative thread library, based on QuickThreads */
 
@@ -59,9 +59,9 @@ extern unsigned int sleep (unsigned int);
 
 #if defined(MISSING_USLEEP_DECL)
 #ifdef USLEEP_RETURNS_VOID
-extern void usleep (unsigned);
+extern void usleep (USLEEP_ARG_TYPE);
 #else
-extern int usleep (unsigned);
+extern int usleep (USLEEP_ARG_TYPE);
 #endif
 #endif
 
@@ -673,7 +673,7 @@ void
 #else
 int
 #endif
-usleep (unsigned usec)
+usleep (USLEEP_ARG_TYPE usec)
 {
   struct timeval timeout;
   timeout.tv_sec = 0;
index 33cc60c..e6e6d24 100644 (file)
 /* Define if usleep doesn't return a value. */
 #undef USLEEP_RETURNS_VOID
 
+/* Define to be the type of the argument to usleep.  */
+#undef USLEEP_ARG_TYPE
+
 /* Define if your readline library has the rl_getc_function variable.  */
 #undef HAVE_RL_GETC_FUNCTION
 
index 13e1397..9d7ced3 100644 (file)
@@ -54,9 +54,9 @@
 
 #if defined(MISSING_USLEEP_DECL) || (defined(GUILE_ISELECT) && !defined(HAVE_USLEEP))
 #ifdef USLEEP_RETURNS_VOID
-extern void usleep (unsigned);
+extern void usleep (USLEEP_ARG_TYPE);
 #else
-extern int usleep (unsigned);
+extern int usleep (USLEEP_ARG_TYPE);
 #endif
 #endif