#ifdef WIN32
#define UNICODE
#include <windows.h>
-#endif
-
-#if defined (__linux__) || defined (__APPLE__)
+#else
#include <errno.h>
#include <unistd.h>
#endif
strcat( text, "\n" );
-#if defined (__linux__) || defined (__APPLE__)
- if (errno != 0)
- {
- strcat( text, "errno: " );
- strcat( text, strerror (errno));
- strcat( text, "\n");
- }
-#endif
-
#ifdef WIN32
if (GetLastError() != 0)
{
strcat( text, "\n");
LocalFree( lpMsgBuf );
}
+#else
+ if (errno != 0)
+ {
+ strcat( text, "errno: " );
+ strcat( text, strerror (errno));
+ strcat( text, "\n");
+ }
#endif
+
#if 0
// we need to have a current context to call glError()
if (g_glwindow_globals.d_glBase != 0)