[gnumeric] compilation: conditionalize sys/wait.h



commit bf88383d99ed3136ac5918c13613801ecc201486
Author: Morten Welinder <terra gnome org>
Date:   Mon Nov 16 08:41:54 2009 -0500

    compilation: conditionalize sys/wait.h

 configure.in                  |    2 ++
 plugins/glpk/gnm-glpk.c       |    4 +++-
 plugins/lpsolve/gnm-lpsolve.c |    2 ++
 src/tools/gnm-solver.c        |    2 ++
 4 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index 814e0c5..07c8dda 100644
--- a/configure.in
+++ b/configure.in
@@ -651,6 +651,8 @@ unset SAVE_LIBS
 dnl Either of these seem to signal IEEE754 math, see mathfunc.c
 AC_CHECK_HEADERS(ieeefp.h ieee754.h)
 
+AC_HEADER_SYS_WAIT
+
 dnl Check for some functions
 AC_CHECK_FUNCS(memmove mkdtemp uname times sysconf)
 
diff --git a/plugins/glpk/gnm-glpk.c b/plugins/glpk/gnm-glpk.c
index 37ea7c7..6df34e2 100644
--- a/plugins/glpk/gnm-glpk.c
+++ b/plugins/glpk/gnm-glpk.c
@@ -12,8 +12,10 @@
 #include <glib/gi18n-lib.h>
 #include <glib/gstdio.h>
 #include <string.h>
-#include <sys/wait.h>
 #include <unistd.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
 
 #define PRIVATE_KEY "::glpk::"
 
diff --git a/plugins/lpsolve/gnm-lpsolve.c b/plugins/lpsolve/gnm-lpsolve.c
index d8f575a..4e2399f 100644
--- a/plugins/lpsolve/gnm-lpsolve.c
+++ b/plugins/lpsolve/gnm-lpsolve.c
@@ -8,7 +8,9 @@
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
 #include <string.h>
+#ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
+#endif
 
 #define PRIVATE_KEY "::lpsolve::"
 
diff --git a/src/tools/gnm-solver.c b/src/tools/gnm-solver.c
index 4e7d3cf..4ec4e86 100644
--- a/src/tools/gnm-solver.c
+++ b/src/tools/gnm-solver.c
@@ -18,7 +18,9 @@
 #include <unistd.h>
 #include <signal.h>
 #include <string.h>
+#ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
+#endif
 
 /* ------------------------------------------------------------------------- */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]