]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use setenv instead of putenv.
authorUlrich Drepper <drepper@redhat.com>
Wed, 10 Nov 1999 02:52:35 +0000 (02:52 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 10 Nov 1999 02:52:35 +0000 (02:52 +0000)
timezone/test-tz.c

index 6a330a50212ade82d2a4744fa42b9b196e5d1e05..af37d8ae6aa6b1dca1472f599bd2bfa1198937d9 100644 (file)
@@ -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, 1);
       t = mktime (&tm);
       if (t != tests[i].expected)
        {