Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: environment handling rewrite



This rewrites environment handling to use system supplied putenv()/getenv() if
available. The main reason was Cygwin, where internal environment management
differs from Unix significantly.

There is no system dependencies (apart from existence of environ). The only
two assumptions are:

- if environ table is extended,  malloc() is used.
- if putenv() copies it's argument, malloc() is used (it is the case under
current Cygwin)

Else it dynamically checks, if putenv() has reused old memory or copied it's
argument.

I'm running it on both Unix and Cygwin and it works so far. With exception
of --enable-zsh-mem problem on Cygiwn, but ot cannot be related (error comes
even before we set up environment).

It depends on configure.in patch from my previous mail (patch for brk() on
Cygwin).

Could anybody commit them as I'd like to have clean state for Cygwin modules
stuff?

thanks

-andrej

Have a nice DOS!
B >>

Attachment: zsh-env.diff
Description: Binary data



Messages sorted by: Reverse Date, Date, Thread, Author