diff options
author | Gary Houston <ghouston@arglist.com> | 1999-12-28 21:50:52 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1999-12-28 21:50:52 +0000 |
commit | d00ae47e13a793e8f792df41fb4de46edc25b48f (patch) | |
tree | ebf9b4075360666414916b1365db7ba528d657b0 /libguile | |
parent | 22efa9960a0e09b7971fdaed00d6c50160210705 (diff) | |
download | guile-d00ae47e13a793e8f792df41fb4de46edc25b48f.tar.gz |
* posix.c (scm_waitpid): move the HAVE_WAITPID test out of the
procedure body, so that the procedure is left undefined if waitpid
is not available. previously in this case the procedure was
defined but would raise a system-error when called, which is
pointless. I intend to make the same change for other procedures
and deprecate SCM_SYSMISSING and scm_sysmissing.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/ChangeLog | 9 | ||||
-rw-r--r-- | libguile/posix.c | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 08ecbb247..d3721d305 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,12 @@ +1999-12-28 Gary Houston <ghouston@arglist.com> + + * posix.c (scm_waitpid): move the HAVE_WAITPID test out of the + procedure body, so that the procedure is left undefined if waitpid + is not available. previously in this case the procedure was + defined but would raise a system-error when called, which is + pointless. I intend to make the same change for other procedures + and deprecate SCM_SYSMISSING and scm_sysmissing. + 1999-12-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * feature.c (s_scm_add_hook_x): Call scm_wrong_type_arg instead of diff --git a/libguile/posix.c b/libguile/posix.c index aa0f6b2b7..f9ce0adc4 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -400,8 +400,7 @@ Interrupt signal. } #undef FUNC_NAME - - +#ifdef HAVE_WAITPID GUILE_PROC (scm_waitpid, "waitpid", 1, 1, 0, (SCM pid, SCM options), "This procedure collects status information from a child process which @@ -447,7 +446,6 @@ The integer status value. @end enumerate") #define FUNC_NAME s_scm_waitpid { -#ifdef HAVE_WAITPID int i; int status; int ioptions; @@ -464,13 +462,9 @@ The integer status value. if (i == -1) SCM_SYSERROR; return scm_cons (SCM_MAKINUM (0L + i), SCM_MAKINUM (0L + status)); -#else - SCM_SYSMISSING; - /* not reached. */ - return SCM_BOOL_F; -#endif } #undef FUNC_NAME +#endif /* HAVE_WAITPID */ GUILE_PROC (scm_status_exit_val, "status:exit-val", 1, 0, 0, (SCM status), |