This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The current implementation of _setenv_r() looks to see if the environment variable being set (or changed) is TZ, calling tzset() when it is so that the timezone is automatically kept matching the environment without user intervention. However, _unsetenv_r() does not provide the same feature, likely leading to a problem when TZ is unset. POSIX says nothing about this feature under setenv() and unsetenv(), so it would be possible to make the behavior consistent by either adding to unset or removing from set. However, adding to unset seems far less likely to cause backwards-compatibility problems than removing from set. The attached patch addresses the issue by adding a tzset() call to _unsetenv_r() when TZ is unset. Craig 2011-07-08 Craig Howland <howland@LGSInnovations.com> * libc/stdlib/setenv_r.c (_unsetenv_r): Call tzset() when TZ is unset, to match similar _setenv_r() behavior.
Attachment:
setenv_r.patch.txt
Description: setenv_r.patch.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |