mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
Update.
1999-08-30 Ulrich Drepper <drepper@cygnus.com> * stdlib/tst-environ.c: Add cast to avoid warning. * timezone/test-tz.c: Use setenv instead of putenv.
This commit is contained in:
parent
b78513132b
commit
0742e50134
@ -1,3 +1,8 @@
|
||||
1999-08-30 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* stdlib/tst-environ.c: Add cast to avoid warning.
|
||||
* timezone/test-tz.c: Use setenv instead of putenv.
|
||||
|
||||
1999-08-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||
|
||||
* manual/libc.texinfo: Update version and date.
|
||||
|
@ -127,8 +127,9 @@ main (void)
|
||||
}
|
||||
|
||||
/* More fun ahead: we are now removing the variable. This should remove
|
||||
both values. */
|
||||
putenv (VAR);
|
||||
both values. The cast is ok: this call should never put the string
|
||||
in the environment and it should never modify it. */
|
||||
putenv ((char *) VAR);
|
||||
|
||||
/* Getting the value should now fail. */
|
||||
if (getenv (VAR) != NULL)
|
||||
|
@ -7,11 +7,11 @@ struct {
|
||||
const char * env;
|
||||
time_t expected;
|
||||
} tests[] = {
|
||||
{"TZ=MST", 832935315},
|
||||
{"TZ=", 832910115},
|
||||
{"TZ=:UTC", 832910115},
|
||||
{"TZ=UTC", 832910115},
|
||||
{"TZ=UTC0", 832910115}
|
||||
{"MST", 832935315},
|
||||
{"", 832910115},
|
||||
{":UTC", 832910115},
|
||||
{"UTC", 832910115},
|
||||
{"UTC0", 832910115}
|
||||
};
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ main (int argc, char ** argv)
|
||||
|
||||
for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
|
||||
{
|
||||
putenv (tests[i].env);
|
||||
setenv ("TZ", tests[i].env);
|
||||
t = mktime (&tm);
|
||||
if (t != tests[i].expected)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user