Thanks to horte for pointing this out on geeks3d comment.
if (WIN32)
# MSVC & MinGW only define & use APIENTRY
add_definitions (-DGLAPIENTRY=__stdcall)
+
+ # http://msdn.microsoft.com/en-us/library/aa383745.aspx
+ add_definitions (-D_WIN32_WINNT=0x0500 -DWINVER=0x0500)
else (WIN32)
CHECK_CXX_COMPILER_FLAG("-fvisibility=hidden" CXX_COMPILER_FLAG_VISIBILITY)
if (CXX_COMPILER_FLAG_VISIBILITY)
va_end(ap);
OutputDebugStringA(buf);
+
+ /*
+ * Also write the message to stderr, when a debugger is not present (to
+ * avoid duplicate messages in command line debuggers).
+ */
+#if _WIN32_WINNT > 0x0400
if (!IsDebuggerPresent()) {
fflush(stdout);
fputs(buf, stderr);
fflush(stderr);
}
+#endif
}
long long GetTime(void)