include/SDL_getenv.h
changeset 0 74212992fb08
child 337 9154ec9ca3d2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/SDL_getenv.h	Thu Apr 26 16:45:43 2001 +0000
     1.3 @@ -0,0 +1,30 @@
     1.4 +
     1.5 +/* Not all environments have a working getenv()/putenv() */
     1.6 +
     1.7 +#if defined(macintosh) || defined(_WIN32_WCE)
     1.8 +#define NEED_SDL_GETENV
     1.9 +#endif
    1.10 +
    1.11 +#ifdef NEED_SDL_GETENV
    1.12 +
    1.13 +#include "begin_code.h"
    1.14 +/* Set up for C function definitions, even when using C++ */
    1.15 +#ifdef __cplusplus
    1.16 +extern "C" {
    1.17 +#endif
    1.18 +
    1.19 +/* Put a variable of the form "name=value" into the environment */
    1.20 +extern DECLSPEC int SDL_putenv(const char *variable);
    1.21 +#define putenv(X)   SDL_putenv(X)
    1.22 +
    1.23 +/* Retrieve a variable named "name" from the environment */
    1.24 +extern DECLSPEC char *SDL_getenv(const char *name);
    1.25 +#define getenv(X)     SDL_getenv(X)
    1.26 +
    1.27 +/* Ends C function definitions when using C++ */
    1.28 +#ifdef __cplusplus
    1.29 +}
    1.30 +#endif
    1.31 +#include "close_code.h"
    1.32 +
    1.33 +#endif /* NEED_GETENV */