From ce874f2db771045adda570adf498dfb41f268453 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Mon, 20 Apr 1998 00:40:09 +0000 Subject: [PATCH] * scmsigs.c (scm_usleep): New procedure; Declare usleep if it isn't found in the OS. --- libguile/scmsigs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 6440419fd..27287fcff 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -52,6 +52,9 @@ #include #endif +#if defined(DECLARE_USLEEP) || (defined(GUILE_ISELECT) && !defined(HAVE_USLEEP)) +extern int usleep (unsigned); +#endif @@ -352,6 +355,20 @@ scm_sleep (i) return SCM_MAKINUM (j); } +#if defined(GUILE_ISELECT) || defined(HAVE_USLEEP) +SCM_PROC(s_usleep, "usleep", 1, 0, 0, scm_usleep); + +SCM +scm_usleep (i) + SCM i; +{ + int j; + SCM_ASSERT (SCM_INUMP (i) && (SCM_INUM (i) >= 0), i, SCM_ARG1, s_usleep); + j = usleep (SCM_INUM(i)); + return SCM_MAKINUM (j); +} +#endif + SCM_PROC(s_raise, "raise", 1, 0, 0, scm_raise); SCM