[MOAB-dev] r3112 - in MOAB/trunk: . tools/dagmc

jvporter at wisc.edu jvporter at wisc.edu
Thu Aug 20 16:23:31 CDT 2009


Author: jvporter
Date: 2009-08-20 16:23:30 -0500 (Thu, 20 Aug 2009)
New Revision: 3112

Modified:
   MOAB/trunk/MBEntityHandle.h.in
   MOAB/trunk/MBMatrix3.hpp
   MOAB/trunk/MBSysUtil.cpp
   MOAB/trunk/ReadSTL.cpp
   MOAB/trunk/WriteSTL.cpp
   MOAB/trunk/tools/dagmc/cubfile.c
Log:
* Consolidate fixed-width integer typedefs (stdint.h and friends)
* Fix compile failure in MBMatrix3.hpp due to lack of finite()


Modified: MOAB/trunk/MBEntityHandle.h.in
===================================================================
--- MOAB/trunk/MBEntityHandle.h.in	2009-08-20 19:19:03 UTC (rev 3111)
+++ MOAB/trunk/MBEntityHandle.h.in	2009-08-20 21:23:30 UTC (rev 3112)
@@ -32,6 +32,15 @@
 # include <inttypes.h>
 #elif defined (MOAB_HAVE_STDINT_H)
 # include <stdint.h>
+#elif defined (_MSC_VER)
+  typedef __int8 int8_t;
+  typedef __int16 int16_t;
+  typedef __int32 int32_t;
+  typedef __int64 int64_t;
+  typedef unsigned __int8 uint8_t;
+  typedef unsigned __int16 uint16_t;
+  typedef unsigned __int32 uint32_t;
+  typedef unsigned __int64 uint64_t;
 #endif
 
 #ifdef MOAB_HAVE_STDDEF_H

Modified: MOAB/trunk/MBMatrix3.hpp
===================================================================
--- MOAB/trunk/MBMatrix3.hpp	2009-08-20 19:19:03 UTC (rev 3111)
+++ MOAB/trunk/MBMatrix3.hpp	2009-08-20 21:23:30 UTC (rev 3112)
@@ -26,6 +26,10 @@
 #include <iosfwd>
 #include <limits>
 
+#ifdef _MSC_VER
+# define finite _finite
+#endif
+
 class MBMatrix3 
 {
   double d[9];

Modified: MOAB/trunk/MBSysUtil.cpp
===================================================================
--- MOAB/trunk/MBSysUtil.cpp	2009-08-20 19:19:03 UTC (rev 3111)
+++ MOAB/trunk/MBSysUtil.cpp	2009-08-20 21:23:30 UTC (rev 3112)
@@ -5,22 +5,7 @@
 #include <assert.h>
 
 #include "MBEntityHandle.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
 
-#if defined(_MSC_VER) /* windows */
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-#endif
-
 namespace MBSysUtil
 {
 

Modified: MOAB/trunk/ReadSTL.cpp
===================================================================
--- MOAB/trunk/ReadSTL.cpp	2009-08-20 19:19:03 UTC (rev 3111)
+++ MOAB/trunk/ReadSTL.cpp	2009-08-20 21:23:30 UTC (rev 3112)
@@ -29,20 +29,7 @@
 #include "MBSysUtil.hpp"
 
 #include "MBEntityHandle.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
 
-#if defined(_MSC_VER) /* Windows */
-typedef unsigned __int32 uint32_t;
-#endif
-
 #include <errno.h>
 #include <string.h>
 #include <limits.h>

Modified: MOAB/trunk/WriteSTL.cpp
===================================================================
--- MOAB/trunk/WriteSTL.cpp	2009-08-20 19:19:03 UTC (rev 3111)
+++ MOAB/trunk/WriteSTL.cpp	2009-08-20 21:23:30 UTC (rev 3112)
@@ -29,15 +29,6 @@
 #include "MBSysUtil.hpp"
 
 #include "MBEntityHandle.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>

Modified: MOAB/trunk/tools/dagmc/cubfile.c
===================================================================
--- MOAB/trunk/tools/dagmc/cubfile.c	2009-08-20 19:19:03 UTC (rev 3111)
+++ MOAB/trunk/tools/dagmc/cubfile.c	2009-08-20 21:23:30 UTC (rev 3112)
@@ -14,13 +14,9 @@
 #include <stdlib.h>
 
 #include "MBEntityHandle.h" // for MOAB_HAVE_STDINT_H
-#ifdef MOAB_HAVE_STDINT_H
-#  include <stdint.h>
-#endif
 
 #ifdef _MSC_VER /* windows */
 #  include <BaseTsd.h>
-typedef ULONG32 uint32_t;
 #endif
 
 #include <errno.h>



More information about the moab-dev mailing list