[MOAB-dev] r1327 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Tue Oct 23 16:18:25 CDT 2007
Author: kraftche
Date: 2007-10-23 16:18:25 -0500 (Tue, 23 Oct 2007)
New Revision: 1327
Modified:
MOAB/trunk/ReadSTL.cpp
MOAB/trunk/WriteSTL.cpp
Log:
windows build fixes
Modified: MOAB/trunk/ReadSTL.cpp
===================================================================
--- MOAB/trunk/ReadSTL.cpp 2007-10-23 20:40:36 UTC (rev 1326)
+++ MOAB/trunk/ReadSTL.cpp 2007-10-23 21:18:25 UTC (rev 1327)
@@ -27,7 +27,22 @@
#include "MBRange.hpp"
#include "FileOptions.hpp"
-#include <inttypes.h> // for int32_t
+#include "config.h"
+#ifdef MOAB_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#ifdef MOAB_HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#ifdef MOAB_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#ifdef _MSC_VER /* windows */
+# include <BaseTsd.h>
+typedef ULONG32 uint32_t;
+#endif
+
#include <errno.h>
#include <string.h>
#include <limits.h>
Modified: MOAB/trunk/WriteSTL.cpp
===================================================================
--- MOAB/trunk/WriteSTL.cpp 2007-10-23 20:40:36 UTC (rev 1326)
+++ MOAB/trunk/WriteSTL.cpp 2007-10-23 21:18:25 UTC (rev 1327)
@@ -27,25 +27,29 @@
#include "MBWriteUtilIface.hpp"
#include "FileOptions.hpp"
+#include "config.h"
+#ifdef MOAB_HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#ifdef MOAB_HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#ifdef MOAB_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#include <inttypes.h>
-#include <unistd.h>
#include <math.h>
+#include <fcntl.h>
#ifdef _MSC_VER /* windows */
-# include <io.h>
-# define O_BINARY _O_BINARY
-# define O_CREAT _O_CREAT
-# define O_EXCL _O_EXCL
-# define O_TRUNC _O_TRUNC
-# define O_WRONLY _O_WRONLY
-# define fdopen(A,B) _fdopen( (A), (B) )
-# define open(A,B,C) _open( (A), (B), (C) )
+# include <BaseTsd.h>
+typedef ULONG32 uint32_t;
#else /* posix */
-# include <fcntl.h>
+# include <unistd.h>
# define _S_IREAD (S_IRUSR|S_IRGRP|S_IROTH)
# define _S_IWRITE (S_IWUSR|S_IWGRP|S_IWOTH)
#endif
More information about the moab-dev
mailing list