src/stdlib/SDL_getenv.c
changeset 7351 668a3dc28361
parent 7003 eeaf77005c30
child 7828 1451063c8ecd
     1.1 --- a/src/stdlib/SDL_getenv.c	Fri Jul 05 21:37:27 2013 -0700
     1.2 +++ b/src/stdlib/SDL_getenv.c	Fri Jul 05 23:57:19 2013 -0700
     1.3 @@ -31,9 +31,12 @@
     1.4  
     1.5  
     1.6  /* Put a variable into the environment */
     1.7 -#ifdef SDL_setenv
     1.8 -#undef SDL_setenv
     1.9 -int SDL_setenv(const char *name, const char *value, int overwrite) { return SDL_setenv_inline(name, value, overwrite); }
    1.10 +#if defined(HAVE_SETENV)
    1.11 +int
    1.12 +SDL_setenv(const char *name, const char *value, int overwrite)
    1.13 +{
    1.14 +    return setenv(name, value, overwrite);
    1.15 +}
    1.16  #elif defined(__WIN32__)
    1.17  int
    1.18  SDL_setenv(const char *name, const char *value, int overwrite)
    1.19 @@ -143,9 +146,12 @@
    1.20  #endif
    1.21  
    1.22  /* Retrieve a variable named "name" from the environment */
    1.23 -#ifdef SDL_getenv
    1.24 -#undef SDL_getenv
    1.25 -char *SDL_getenv(const char *name) { return SDL_getenv_inline(name); }
    1.26 +#if defined(HAVE_GETENV)
    1.27 +char *
    1.28 +SDL_getenv(const char *name)
    1.29 +{
    1.30 +    return getenv(name);
    1.31 +}
    1.32  #elif defined(__WIN32__)
    1.33  char *
    1.34  SDL_getenv(const char *name)