From 0742e50134bfc3db08895c020a940a62e5036cfb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Aug 1999 20:15:06 +0000 Subject: [PATCH] Update. 1999-08-30 Ulrich Drepper * stdlib/tst-environ.c: Add cast to avoid warning. * timezone/test-tz.c: Use setenv instead of putenv. --- ChangeLog | 5 +++++ stdlib/tst-environ.c | 5 +++-- timezone/test-tz.c | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8204a31..e7cb403 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-08-30 Ulrich Drepper + + * stdlib/tst-environ.c: Add cast to avoid warning. + * timezone/test-tz.c: Use setenv instead of putenv. + 1999-08-28 Andreas Jaeger * manual/libc.texinfo: Update version and date. diff --git a/stdlib/tst-environ.c b/stdlib/tst-environ.c index 01083f5..4d17634 100644 --- a/stdlib/tst-environ.c +++ b/stdlib/tst-environ.c @@ -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) diff --git a/timezone/test-tz.c b/timezone/test-tz.c index 6a330a5..28e1e37 100644 --- a/timezone/test-tz.c +++ b/timezone/test-tz.c @@ -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) { -- 2.7.4