[MLton-commit] r5754
Matthew Fluet
fluet at mlton.org
Tue Jul 10 11:56:24 PDT 2007
Avoid warnings when __LP64__ not defined
----------------------------------------------------------------------
U mlton/trunk/runtime/gc.h
U mlton/trunk/runtime/util/pointer.h
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/gc.h
===================================================================
--- mlton/trunk/runtime/gc.h 2007-07-10 07:39:05 UTC (rev 5753)
+++ mlton/trunk/runtime/gc.h 2007-07-10 18:56:23 UTC (rev 5754)
@@ -15,7 +15,7 @@
typedef struct GC_state *GC_state;
typedef GC_state GCState_t;
-#ifdef __WORDSIZE
+#if defined(__WORDSIZE)
#if __WORDSIZE == 32
#define GC_MODEL_NATIVE32
#elif __WORDSIZE == 64
@@ -23,7 +23,7 @@
#else
#error unknown __WORDSIZE
#endif
-#elif (defined __LP64__)
+#elif defined(__LP64__)
#define GC_MODEL_NATIVE64
#else
#define GC_MODEL_NATIVE32
Modified: mlton/trunk/runtime/util/pointer.h
===================================================================
--- mlton/trunk/runtime/util/pointer.h 2007-07-10 07:39:05 UTC (rev 5753)
+++ mlton/trunk/runtime/util/pointer.h 2007-07-10 18:56:23 UTC (rev 5754)
@@ -12,7 +12,7 @@
typedef pointerAux* pointer;
#define POINTER_SIZE sizeof(pointer)
-#ifdef __WORDSIZE
+#if defined(__WORDSIZE)
#if __WORDSIZE == 32
#define FMTPTR "0x%08"PRIxPTR
#elif __WORDSIZE == 64
@@ -20,7 +20,7 @@
#else
#error __WORDSIZE unknown
#endif
-#elif __LP64__
+#elif defined(__LP64__)
#define FMTPTR "0x%016"PRIxPTR
#else
#define FMTPTR "0x%08"PRIxPTR
More information about the MLton-commit
mailing list