help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] [PATCH] libgst: Fix compilation on FreeBSD in regard to


From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] [PATCH] libgst: Fix compilation on FreeBSD in regard to environ
Date: Sat, 14 Dec 2013 17:28:02 +0100

2013-12-14  Holger Hans Peter Freyther  <address@hidden>

        * configure.ac: Check for environ with AC_CHECK_DECLS.

2013-12-14  Holger Hans Peter Freyther  <address@hidden>

        * cint.c: Fix the compilation on FreeBSD.
---
 ChangeLog        | 4 ++++
 configure.ac     | 3 +++
 libgst/ChangeLog | 4 ++++
 libgst/cint.c    | 8 ++++++++
 4 files changed, 19 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 7b6f5e8..ea47151 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-14  Holger Hans Peter Freyther  <address@hidden>
+
+       * configure.ac: Check for environ with AC_CHECK_DECLS.
+
 2013-12-08  Holger Hans Peter Freyther  <address@hidden>
 
        * kernel/Regex.st: Check for isEmpty of the Interval before
diff --git a/configure.ac b/configure.ac
index 2d69fe0..dbc75a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -369,6 +369,9 @@ if test "$ac_cv_func__NSGetEnviron" = yes; then
      environ variable.])
 fi
 
+dnl FreeBSD does provide an environ but it is not declared in the headers
+AC_CHECK_DECLS([environ])
+
 AC_SEARCH_LIBS([nanosleep], [rt])
 if test "$ac_cv_search_nanosleep" != no; then
   AC_DEFINE(HAVE_NANOSLEEP, 1, 
diff --git a/libgst/ChangeLog b/libgst/ChangeLog
index 19fce63..2195e3f 100644
--- a/libgst/ChangeLog
+++ b/libgst/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-14  Holger Hans Peter Freyther  <address@hidden>
+
+       * cint.c: Fix the compilation on FreeBSD.
+
 2013-11-30  Holger Hans Peter Freyther  <address@hidden>
 
        * gst-parse.c: Check if currentClass is nil before calling
diff --git a/libgst/cint.c b/libgst/cint.c
index 9dd441e..510cc46 100644
--- a/libgst/cint.c
+++ b/libgst/cint.c
@@ -396,6 +396,14 @@ my_putenv (const char *str)
   return (putenv (clone));
 }
 
+/*
+ * On FreeBSD and other BSDs there is the environ but it is not
+ * declared in header. Import it like this.
+ */
+#if !HAVE_DECL_ENVIRON
+extern char **environ;
+#endif
+
 static char **
 get_environ (void)
 {
-- 
1.8.4.rc3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]