# HG changeset patch # User Sam Lantinga # Date 1261035973 0 # Node ID db4af3cb938e2858aed12e1a2360d51d037e7435 # Parent 493f252a455c9e36e45388c78157e5914d0c07a4 Updated test code to use SDL_setenv() diff -r 493f252a455c -r db4af3cb938e src/stdlib/SDL_getenv.c --- a/src/stdlib/SDL_getenv.c Thu Dec 17 07:22:48 2009 +0000 +++ b/src/stdlib/SDL_getenv.c Thu Dec 17 07:46:13 2009 +0000 @@ -214,7 +214,7 @@ } printf("Setting FIRST=VALUE1 in the environment... "); fflush(stdout); - if (SDL_putenv("FIRST=VALUE1") == 0) { + if (SDL_setenv("FIRST", "VALUE1", 0) == 0) { printf("okay\n"); } else { printf("failed\n"); @@ -229,7 +229,7 @@ } printf("Setting SECOND=VALUE2 in the environment... "); fflush(stdout); - if (SDL_putenv("SECOND=VALUE2") == 0) { + if (SDL_setenv("SECOND", "VALUE2", 0) == 0) { printf("okay\n"); } else { printf("failed\n"); @@ -244,7 +244,7 @@ } printf("Setting FIRST=NOVALUE in the environment... "); fflush(stdout); - if (SDL_putenv("FIRST=NOVALUE") == 0) { + if (SDL_setenv("FIRST", "NOVALUE", 1) == 0) { printf("okay\n"); } else { printf("failed\n"); @@ -267,4 +267,5 @@ return (0); } #endif /* TEST_MAIN */ + /* vi: set ts=4 sw=4 expandtab: */