Getenv() in SDL

Hello, all!

I'm writing a 3d rendering engine using SDL and OpenGL. I found SDL uses getenv() function to retrieve environment variables in SDL_InitSubSystem() and several other places. This will be bad under WIN32 when my project was using diffrent runtime library linkage than SDL: I built SDL with multithread DLL runtime library but used multithread DEBUG DLL runtime in my own project. Thus the environment variable I set via putenv() will not be retrieved by SDL because they remains in diffrent DLL's instances. It is bad to force me using the same runtime library linkage as SDL. So I suggest SDL not to use getenv() but WIN32 API call GetEnvironmentVariableA() under WIN32.
Any suggestions ? Thank's.

                                                 GaoYakun.______________________________________

===================================================================
???2003??? (http://ad4.sina.com.cn/shc/zhuiyu_hprefresh.html)

Hello, all!

I'm writing a 3d rendering engine using SDL and OpenGL. I found SDL uses getenv() function to retrieve environment variables in SDL_InitSubSystem() and several other places. This will be bad under WIN32 when my project was using diffrent runtime library linkage than SDL: I built SDL with multithread DLL runtime library but used multithread DEBUG DLL runtime in my own project. Thus the environment variable I set via putenv() will not be retrieved by SDL because they remains in diffrent DLL's instances. It is bad to force me using the same runtime library linkage as SDL. So I suggest SDL not to use getenv() but WIN32 API call GetEnvironmentVariableA() under WIN32.

Thanks for the suggestion! I’ve implemented this in CVS.

See ya,
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment