Mail Archives: djgpp-workers/2002/10/26/22:42:25
27-Oct-2002 01:15 Eli Zaretskii wrote:
>> From: "Leonid Pauzner" <uue AT pauzner DOT dnttm DOT ru>
>> Date: Sun, 27 Oct 2002 02:37:32 +0400 (MSD)
>>
>> set_hash_env() now uses a single realloc, if any (literally: only the first
>> allocation in most cases), its weight is nearly as much as 2 old getenv calls
>> and definitely less then putenv().
> What will this do to programs that access environ[] directly? Since
If you mean such programs *change* environ[] and then call getenv() -
there will be a problem (with many libc functions!), unless the program
increment __environ_changed properly.
> this change resyncs environ[] with the hash table only when `getenv'
> is called (or did I understand your code wrongly?), won't such
> programs break?
My hash table is only used in `getenv', and is resynced inside getenv.
Perhaps it should be declared static - that was your question?
Let we declare my function and variables static.
- Raw text -