[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] How to access environment variables ?
From: |
Mehul Sanghvi |
Subject: |
Re: [Help-smalltalk] How to access environment variables ? |
Date: |
Sat, 26 Mar 2011 10:04:37 -0400 |
On Sat, Mar 26, 2011 at 03:10, Paolo Bonzini <address@hidden> wrote:
> On 03/26/2011 02:12 AM, Mehul Sanghvi wrote:
>>
>> OK so once I modify kernel/CFuncs.st and I believe I need to also
>> modify libgst/cint.c what else do I need to do in order to get this to
>> work ?
>>
>>
>> In kernel/CFuncs.st
>>
>> environ: aString [
>> <category: 'c call-outs'>
>> <cCall: 'environ' returning: #(#ptr #string) args: #()>
>>
>> ]
>
> Where did you add this?
>
I did that right below where there was a similar
bit of code for getenv. I just copied that piece of
code and adjusted it based on the information
in this mailing list thread.
>> and in libgst/cint.c
>>
>> _gst_define_cfunc ("getenv", getenv);
>> _gst_define_cfunc ("environ", environ);
>
> You should do
>
> static char **get_environ(void)
> {
> return environ;
> }
>
> ...
>
> _gst_define_cfunc ("get_environ", get_environ);
>
> Paolo
>
--
Mehul N. Sanghvi
email: address@hidden
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/20
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/21
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/25
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/25
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?,
Mehul Sanghvi <=
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/26
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/27
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/27
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/28
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/28
- Re: [Help-smalltalk] How to access environment variables ?, Paolo Bonzini, 2011/03/28
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/28
- Re: [Help-smalltalk] How to access environment variables ?, Mehul Sanghvi, 2011/03/28