[seed] Fix OS module build on OSX. OSX has a monolithic C library, and does not have pty.h



commit 3c6e33e7c0d30e5b76ccb186141dba9026fbbc0e
Author: Robert Carr <racarr svn gnome org>
Date:   Tue Apr 28 12:44:34 2009 -0400

    Fix OS module build on OSX. OSX has a monolithic C library, and does not have pty.h
---
 config.h.in     |    3 +++
 configure.ac    |    2 ++
 modules/os/os.c |    5 +++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/config.h.in b/config.h.in
index 8617d09..25050a3 100644
--- a/config.h.in
+++ b/config.h.in
@@ -33,6 +33,9 @@
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the <pty.h> header file. */
+#undef HAVE_PTY_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
diff --git a/configure.ac b/configure.ac
index 2a847e2..3acfaa1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,6 +239,8 @@ esac
 AC_SUBST(SEED_OSX_CFLAGS)
 AC_SUBST(SEED_OSX_LDFLAGS)
 
+AC_CHECK_HEADERS(pty.h)
+
 dnl =============================gtk-doc=======================================
 GTK_DOC_CHECK(1.9)
 
diff --git a/modules/os/os.c b/modules/os/os.c
index 880c720..0f0816b 100644
--- a/modules/os/os.c
+++ b/modules/os/os.c
@@ -1,4 +1,7 @@
 #define _GNU_SOURCE
+
+#include "../../config.h"
+
 #include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
@@ -10,7 +13,9 @@
 
 #include <fcntl.h>
 
+#ifdef HAVE_PTY_H
 #include <pty.h>
+#endif
 
 #include <seed.h>
 



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