1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-02 23:50:47 +02:00

* scmsigs.c (scm_usleep): New procedure; Declare usleep if it

isn't found in the OS.
This commit is contained in:
Mikael Djurfeldt 1998-04-20 00:40:09 +00:00
parent 7105a806ee
commit ce874f2db7

View file

@ -52,6 +52,9 @@
#include <unistd.h>
#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