From f34143b438071a51b15f9a4ab082addcc35aed92 Mon Sep 17 00:00:00 2001 From: sam Date: Fri, 26 Sep 2003 15:32:16 +0000 Subject: [PATCH] * Disabled the use of environ on OS X. git-svn-id: svn://svn.zoy.org/elk/trunk@199 55e467fa-43c5-0310-a8a2-de718669efc6 --- configure.ac | 3 +++ lib/unix/process.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 85d65ff..d8a8ee2 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,9 @@ case "${target_os}" in ELK_LDFLAGS="${ELK_LDFLAGS} -no-undefined" MATH_LIBS="" ;; + *darwin*) + AC_DEFINE(SYS_DARWIN, 1, Define if the system is Darwin)], + ;; esac ELK_LIBS="${ELK_LIBS} ${MATH_LIBS}" diff --git a/lib/unix/process.c b/lib/unix/process.c index 8e9d85c..2af9497 100644 --- a/lib/unix/process.c +++ b/lib/unix/process.c @@ -39,13 +39,13 @@ #ifndef WIN32 -#ifdef ENVIRON_IN_UNISTD_H +#ifndef ENVIRON_IN_UNISTD_H /* "extern" in front of the next declaration causes the Ultrix 4.2 linker * to fail, but omitting it no longer works with modern C compilers: */ extern char **environ; #endif -#ifdef HAVE_ENVIRON +#if defined(HAVE_ENVIRON) && !defined(SYS_DARWIN) static Object P_Environ() { Object ret, cell, str; char *p, **ep;