Rev 6350 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6350 | Rev 6386 | ||
---|---|---|---|
1 | /* Not all environments have a working getenv()/putenv() */ |
1 | /* Not all environments have a working getenv()/putenv() */ |
2 | 2 | ||
3 | #if defined(macintosh) || defined(_WIN32_WCE) |
3 | #if defined(macintosh) || defined(_WIN32_WCE) |
4 | #define NEED_SDL_GETENV |
4 | #define NEED_SDL_GETENV |
5 | #endif |
5 | #endif |
6 | 6 | ||
7 | #ifdef NEED_SDL_GETENV |
7 | #ifdef NEED_SDL_GETENV |
8 | 8 | ||
9 | #include "begin_code.h" |
9 | #include "begin_code.h" |
10 | /* Set up for C function definitions, even when using C++ */ |
10 | /* Set up for C function definitions, even when using C++ */ |
11 | #ifdef __cplusplus |
11 | #ifdef __cplusplus |
12 | extern "C" { |
12 | extern "C" { |
13 | #endif |
13 | #endif |
14 | 14 | ||
15 | /* Put a variable of the form "name=value" into the environment */ |
15 | /* Put a variable of the form "name=value" into the environment */ |
16 | extern DECLSPEC int SDL_putenv(const char *variable); |
16 | extern DECLSPEC int SDL_putenv(const char *variable); |
17 | #define sdlputenv(X) SDL_putenv(X) |
17 | #define putenv(X) SDL_putenv(X) |
18 | 18 | ||
19 | /* Retrieve a variable named "name" from the environment */ |
19 | /* Retrieve a variable named "name" from the environment */ |
20 | extern DECLSPEC char *SDL_getenv(const char *name); |
20 | extern DECLSPEC char *SDL_getenv(const char *name); |
21 | #define getenv(X) SDL_getenv(X) |
21 | #define getenv(X) SDL_getenv(X) |
22 | 22 | ||
23 | /* Ends C function definitions when using C++ */ |
23 | /* Ends C function definitions when using C++ */ |
24 | #ifdef __cplusplus |
24 | #ifdef __cplusplus |
25 | } |
25 | } |
26 | #endif |
26 | #endif |
27 | #include "close_code.h" |
27 | #include "close_code.h" |
28 | 28 | ||
29 | #endif /* NEED_GETENV */ |
29 | #endif /* NEED_GETENV */ |