[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: Better environ handling w/ MacOS X
From: |
felix winkelmann |
Subject: |
[Chicken-users] Re: Better environ handling w/ MacOS X |
Date: |
Fri, 16 Dec 2005 09:58:54 +0100 |
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 <address@hidden> 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
>
>
>