Subject: Re: bug#10155: 23.3; HEAD broken by recent commit for emacsclient

From: Eli Zaretskii <[email-masked]>
Date: Mon, 28 Nov 2011 20:54:54 +0200

> From: Dan Nicolaescu <[email-masked]>
> Cc: [email-masked] (Randal L. Schwartz),  [email-masked]
> Date: Mon, 28 Nov 2011 13:44:01 -0500
> 
> >  #if defined __APPLE__ && defined __MACH__
> >  extern char **environ;
> >  #endif
> 
> Can this be done in gnulib?

There's something there already, in lib/unistd.in.h:

  #if @GNULIB_ENVIRON@
  # if !@HAVE_DECL_ENVIRON@
  /* Set of environment variables and values.  An array of strings of the form
     "VARIABLE=VALUE", terminated with a NULL.  */
  #  if defined __APPLE__ && defined __MACH__
  #   include <crt_externs.h>
  #   define environ (*_NSGetEnviron ())
  #  else

So the question is, why doesn't this DTRT?  Paul, can you help here?
I don't have access to OS X to try.