Mercurial > hg > svcore
diff system/Init.cpp @ 658:29efe322ab47
* Build fixes
author | Chris Cannam |
---|---|
date | Mon, 18 Oct 2010 12:42:42 +0100 |
parents | 4884fba80e00 |
children | b0fde2a60188 |
line wrap: on
line diff
--- a/system/Init.cpp Fri Oct 08 13:30:47 2010 +0100 +++ b/system/Init.cpp Mon Oct 18 12:42:42 2010 +0100 @@ -15,6 +15,8 @@ #include <iostream> +#include <qglobal.h> + #ifdef Q_WS_X11 #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -38,6 +40,9 @@ #ifdef Q_WS_WIN32 #include <fcntl.h> + +// required for SetDllDirectory +#define _WIN32_WINNT 0x0502 #include <windows.h> // Set default file open mode to binary @@ -46,6 +51,7 @@ void redirectStderr() { +#ifdef NO_PROBABLY_NOT HANDLE stderrHandle = GetStdHandle(STD_ERROR_HANDLE); if (!stderrHandle) return; @@ -64,6 +70,7 @@ setvbuf(stderr, NULL, _IONBF, 0); } } +#endif } #endif @@ -76,6 +83,10 @@ #ifdef Q_WS_WIN32 redirectStderr(); + + // Remove the CWD from the DLL search path, just in case + SetDllDirectory(L""); + putenv("PATH="); #else #endif }