gallium: Replace getenv by placeholder code on WinCE.

WinCE processes supposedly have environment, but it is not clear which API to use.
This commit is contained in:
José Fonseca
2008-05-29 19:24:53 +09:00
parent 529b3f4cc0
commit 2691c22870

View File

@@ -153,7 +153,9 @@ const char *
debug_get_option(const char *name, const char *dfault) debug_get_option(const char *name, const char *dfault)
{ {
const char *result; const char *result;
#ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY #if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
/* EngMapFile creates the file if it does not exists, so it must either be
* disabled on release versions (or put in a less conspicuous place). */
#ifdef DEBUG #ifdef DEBUG
ULONG_PTR iFile = 0; ULONG_PTR iFile = 0;
const void *pMap = NULL; const void *pMap = NULL;
@@ -161,9 +163,6 @@ debug_get_option(const char *name, const char *dfault)
static char output[1024]; static char output[1024];
result = dfault; result = dfault;
/* XXX: this creates the file if it does not exists, so it must either be
* disabled on release versions, or put in a less conspicuous place.
*/
pMap = EngMapFile(L"\\??\\c:\\gallium.cfg", 0, &iFile); pMap = EngMapFile(L"\\??\\c:\\gallium.cfg", 0, &iFile);
if(pMap) { if(pMap) {
sol = (const char *)pMap; sol = (const char *)pMap;
@@ -187,8 +186,10 @@ debug_get_option(const char *name, const char *dfault)
#else #else
result = dfault; result = dfault;
#endif #endif
#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE)
/* TODO: implement */
result = dfault;
#else #else
result = getenv(name); result = getenv(name);
if(!result) if(!result)
result = dfault; result = dfault;