Browse Source

Fix & minor cleanup.

Florastamine 8 years ago
parent
commit
4b627f7f72
1 changed files with 8 additions and 4 deletions
  1. 8 4
      Source/Urho3D/Core/ProcessUtils.cpp

+ 8 - 4
Source/Urho3D/Core/ProcessUtils.cpp

@@ -42,14 +42,19 @@
 #ifdef _WIN32
 #ifdef _WIN32
 #include <windows.h>
 #include <windows.h>
 #include <io.h>
 #include <io.h>
-#include <Lmcons.h> // For UNLEN. 
 #if defined(_MSC_VER)
 #if defined(_MSC_VER)
 #include <float.h>
 #include <float.h>
-#endif
+#include <Lmcons.h> // For UNLEN. 
+#elif defined(__MINGW32__)
+#include <lmcons.h> // For UNLEN. Apparently MSVC defines "<Lmcons.h>" (with an upperscore 'L' but MinGW uses an underscore 'l'). 
+#include <ntdef.h> 
+#else 
+#endif 
 #else
 #else
 #include <pwd.h> 
 #include <pwd.h> 
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/sysinfo.h>
 #include <sys/sysinfo.h>
+#include <sys/utsname.h>
 #include <limits.h> // For HOST_NAME_MAX. 
 #include <limits.h> // For HOST_NAME_MAX. 
 #endif
 #endif
 
 
@@ -540,8 +545,7 @@ String GetHostName()
 }
 }
 
 
 #if defined(_WIN32)
 #if defined(_WIN32)
-#define STATUS_SUCCESS (0x00000000)
-typedef NTSTATUS       (WINAPI *RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
+typedef NTSTATUS (WINAPI *RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
 
 
 static void GetOS(RTL_OSVERSIONINFOW *r)
 static void GetOS(RTL_OSVERSIONINFOW *r)
 {
 {