logo       

Re: Better environ handling w/ MacOS X: msg#00068

lisp.scheme.chicken

Subject: Re: Better environ handling w/ MacOS X

Thanks, patch is applied. I have also added configure.in checks,
as suggested by you (which simplifies the NSGetEnviron() invocation
somewhat).


cheers,
felix

On 12/16/05, Kon Lovett <klovett@xxxxxxxxxxx> wrote:
> Hi Felix,
>
> Here is a patch for posix.scm
> 103c103,106
> < #ifndef C_MACOSX
> ---
> > #ifdef C_MACOSX
> > #include <crt_externs.h>
> > static char **environ;
> > #else
> 185,189c188
> < #ifdef C_MACOSX
> < # define C_getenventry(i) NULL
> < #else
> < # define C_getenventry(i) environ[ i ]
> < #endif
> ---
> > #define C_getenventry(i) environ[ i ]
> 1330a1330,1337
> > (foreign-value #<<EOF
> >
> > # ifdef C_MACOSX
> > (environ = *_NSGetEnviron()),
> > # endif
> > 0
> > EOF
> > void)
>
> I think I am abusing 'foreign-value' but seemed the lowest overhead.
> With this method -flat_namespace is not rqrd.
>
> Could configure on AC_CHECK_HEADERS(crt_externs.h) &
> AC_CHECK_FUNCS(_NSGetEnviron) but Q&D seems fine for now.
>
> Best Wishes,
> Kon
>
>
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise