From 25c92f739b8f3983726c8dce5e3ee14b0ba0b5bc Mon Sep 17 00:00:00 2001 From: sam Date: Fri, 26 Sep 2003 17:58:08 +0000 Subject: [PATCH] * Use __environ instead of environ on platforms where it exists. git-svn-id: svn://svn.zoy.org/elk/trunk@206 55e467fa-43c5-0310-a8a2-de718669efc6 --- lib/unix/process.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/unix/process.c b/lib/unix/process.c index f138e5a..2835ef5 100644 --- a/lib/unix/process.c +++ b/lib/unix/process.c @@ -42,7 +42,11 @@ #if defined(__APPLE__) # include # define environ (* _NSGetEnviron()) -#elif !defined(ENVIRON_IN_UNISTD_H) +#elif defined(__ENVIRON_IN_UNISTD_H) +# define environ __environ +#elif defined(ENVIRON_IN_UNISTD_H) +/* Nothing to do */ +#else /* "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;