]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/error.cpp
Fixed unnecessary warnings, see http://zerowing.idsoftware.com/bugzilla/show_bug...
[xonotic/netradiant.git] / radiant / error.cpp
index 66794e7aa228b47708703ae0dd6cc306ed0f76d8..0ff75d1cb1730a5508f0b582b58a4c7a75971968 100644 (file)
@@ -32,9 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #ifdef WIN32
 #define UNICODE
 #include <windows.h>
-#endif
-
-#if defined (__linux__) || defined (__APPLE__)
+#else
 #include <errno.h>
 #include <unistd.h>
 #endif
@@ -66,15 +64,6 @@ void Error (const char *error, ...)
 
   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)
   {
@@ -110,8 +99,16 @@ void Error (const char *error, ...)
     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)