[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 09:30:41 +1000 |
User-agent: |
Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3 (gnu/linux) |
Richard Todd <address@hidden> writes:
>
> Here's a KDE project that tried to be cleaner by defining:
> #define environ (*_NSGetEnviron())
> http://cvs.sourceforge.net/viewcvs.py/kcvdphoto/kimg2mpg/aclocal.m4?rev=1.4
> (still have to #ifdef out the extern declaration, though...)
That sounds cleanest.
Does apple hide some advice on this somewhere in the man pages? (To
put a reference to.)
> You may prefer the #define approach...I avoided it because I thought
> the init_xxx() stuff in guile was a clean enough place for it, and
> though I'm sure it's not an issue it would technically be more
> efficient not to do the function call on each access.
Yep. But I'm guessing you need to hold the return from _NSGetEnviron,
ie. the address of the environ variable, not its contents a given
time.
Re: patch to build guile CVS on Mac OS X, Kevin Ryde, 2004/01/06