|
Re: Better environ handling w/ MacOS X: msg#00068lisp.scheme.chicken
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> |
|---|---|---|
| Previous by Date: | Questions on changing Chicken runtime and some other stuff: 00068, Sergey Khorev |
|---|---|
| Next by Date: | Re: Prob w/ C_decode_seconds on MacOS X 10.4: 00068, felix winkelmann |
| Previous by Thread: | Better environ handling w/ MacOS Xi: 00068, Kon Lovett |
| Next by Thread: | Prob w/ C_decode_seconds on MacOS X 10.4: 00068, Kon Lovett |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |