Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill broken portability bits for visual and macosx
[simgrid.git] / src / win32 / compiler / visualc.h
index cb19849..0bc76ea 100644 (file)
@@ -399,8 +399,6 @@ the double. For now, GRAS requires the structures to be compacted. */
  * Replace winsock2.h,ws2tcpip.h and winsock.h header files */
 #include <windows.h>
 
-/* types */
-typedef unsigned int uint32_t;
 
 /* Choose setjmp as exception implementation */
 #ifndef __EX_MCTX_SJLJ__
@@ -408,6 +406,28 @@ typedef unsigned int uint32_t;
 #endif 
 
 
+
+#include <sys/stat.h>
+
+#define S_IWUSR _S_IWRITE
+#define S_IRUSR _S_IREAD
+
+#ifdef _WIN32_WINNT
+       #if _WIN32_WINNT < 0x0400
+               #undef _WIN32_WINNT
+               #define _WIN32_WINNT 0x0400
+       #endif
+#else
+       #define _WIN32_WINNT 0x0400     
+#endif
+
+/* Visual C++ does not declare the ssize_t type */
 typedef int ssize_t;
 
+/* Visual C++ does not declare the mode_t type */
+typedef unsigned int mode_t;
+
+/* Visual C++ does not declare the uint32_t type */
+typedef unsigned int uint32_t;
+
 #endif /* #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__ */