bug-guile
[Top][All Lists]
Advanced

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

Re: patch to build guile CVS on Mac OS X


From: Kevin Ryde
Subject: Re: patch to build guile CVS on Mac OS X
Date: Wed, 07 Jan 2004 08:00:28 +1000
User-agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3 (gnu/linux)

Richard Todd <address@hidden> writes:
>
> +#if defined(__APPLE__) && defined(__DYNAMIC__)
> +#include<crt_externs.h>
> +static char ** environ;
> +#else
>  extern char ** environ;
> +#endif 
>  
>  #ifdef HAVE_GRP_H
>  #include <grp.h>
> @@ -1735,6 +1740,10 @@
>  void 
>  scm_init_posix ()
>  {
> +#if defined(__APPLE__) && defined(__DYNAMIC__)
> +  environ = *_NSGetEnviron();
> +#endif
> +

That's really weird.  I'd rather not do that if it can be avoided.

Surely they can't expect every library that accesses environ to get a
system-specific change?

Does it work to take the declaration of environ from <stdlib.h>
instead of giving an explicit "extern"?  The autoconf way is normally
to let the headers do the job where possible.




reply via email to

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