Mercurial > mplayer.hg
comparison get_path.c @ 27727:48c1ae64255b
Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.
This avoids a pointless indirection that only obscures what is really done.
author | diego |
---|---|
date | Mon, 13 Oct 2008 16:23:55 +0000 |
parents | a593f936d330 |
children | fe1ef9daa92e |
comparison
equal
deleted
inserted
replaced
27726:5e3c7164f943 | 27727:48c1ae64255b |
---|---|
143 #endif | 143 #endif |
144 mp_msg(MSGT_GLOBAL,MSGL_V,"get_path('%s') -> '%s'\n",filename,buff); | 144 mp_msg(MSGT_GLOBAL,MSGL_V,"get_path('%s') -> '%s'\n",filename,buff); |
145 return buff; | 145 return buff; |
146 } | 146 } |
147 | 147 |
148 #if defined(WIN32) && defined(CONFIG_WIN32DLL) | 148 #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) |
149 void set_path_env() | 149 void set_path_env() |
150 { | 150 { |
151 /*make our codec dirs available for LoadLibraryA()*/ | 151 /*make our codec dirs available for LoadLibraryA()*/ |
152 char tmppath[MAX_PATH*2 + 1]; | 152 char tmppath[MAX_PATH*2 + 1]; |
153 char win32path[MAX_PATH]; | 153 char win32path[MAX_PATH]; |
179 #endif /*__CYGWIN__*/ | 179 #endif /*__CYGWIN__*/ |
180 mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath); | 180 mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath); |
181 if (!SetEnvironmentVariableA("PATH", tmppath)) | 181 if (!SetEnvironmentVariableA("PATH", tmppath)) |
182 mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!"); | 182 mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!"); |
183 } | 183 } |
184 #endif /*WIN32 && CONFIG_WIN32DLL*/ | 184 #endif /* (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) */ |