[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 04/05: More specific status:exit-val et al compilation g
From: |
Andy Wingo |
Subject: |
[Guile-commits] 04/05: More specific status:exit-val et al compilation guards |
Date: |
Mon, 11 Jul 2016 20:55:11 +0000 (UTC) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit 0fb3e82ceef7bef6164ed4703f1a5cd2a9645fae
Author: Andy Wingo <address@hidden>
Date: Mon Jul 11 22:52:35 2016 +0200
More specific status:exit-val et al compilation guards
* libguile/posix.c (scm_status_exit_val, scm_status_term_sig)
(scm_status_stop_sig): Guard on WIFEXITED et al macros instead of on
MinGW.
---
libguile/posix.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libguile/posix.c b/libguile/posix.c
index e3a435e..2f5fd7e 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -718,7 +718,7 @@ SCM_DEFINE (scm_waitpid, "waitpid", 1, 1, 0,
#undef FUNC_NAME
#endif /* HAVE_WAITPID */
-#ifndef __MINGW32__
+#ifdef WIFEXITED
SCM_DEFINE (scm_status_exit_val, "status:exit-val", 1, 0, 0,
(SCM status),
"Return the exit status value, as would be set if a process\n"
@@ -737,7 +737,9 @@ SCM_DEFINE (scm_status_exit_val, "status:exit-val", 1, 0, 0,
return SCM_BOOL_F;
}
#undef FUNC_NAME
+#endif /* WIFEXITED */
+#ifdef WIFSIGNALED
SCM_DEFINE (scm_status_term_sig, "status:term-sig", 1, 0, 0,
(SCM status),
"Return the signal number which terminated the process, if any,\n"
@@ -753,7 +755,9 @@ SCM_DEFINE (scm_status_term_sig, "status:term-sig", 1, 0, 0,
return SCM_BOOL_F;
}
#undef FUNC_NAME
+#endif /* WIFSIGNALED */
+#ifdef WIFSTOPPED
SCM_DEFINE (scm_status_stop_sig, "status:stop-sig", 1, 0, 0,
(SCM status),
"Return the signal number which stopped the process, if any,\n"
@@ -769,7 +773,7 @@ SCM_DEFINE (scm_status_stop_sig, "status:stop-sig", 1, 0, 0,
return SCM_BOOL_F;
}
#undef FUNC_NAME
-#endif /* __MINGW32__ */
+#endif /* WIFSTOPPED */
#ifdef HAVE_GETPPID
SCM_DEFINE (scm_getppid, "getppid", 0, 0, 0,
- [Guile-commits] branch stable-2.0 updated (e2c1659 -> f6dd212), Andy Wingo, 2016/07/11
- [Guile-commits] 04/05: More specific status:exit-val et al compilation guards,
Andy Wingo <=
- [Guile-commits] 02/05: Provide `kill' only if supported by the host, Andy Wingo, 2016/07/11
- [Guile-commits] 01/05: More robust setuid, setgid, etc detection, Andy Wingo, 2016/07/11
- [Guile-commits] 05/05: Factor start_child out of open_process, Andy Wingo, 2016/07/11
- [Guile-commits] 03/05: getaffinity, setaffinity docstring cleanup, Andy Wingo, 2016/07/11