[MLton-commit] r6682
Wesley Terpstra
wesley at mlton.org
Thu Jul 31 12:20:44 PDT 2008
Mark all of the runtime as internal. Otherwise the runtime, c-codegen, and
bytecode codegen produce assembler using lookup tables in PIC mode.
Special care was required for the MLTON_CODEGEN_WORDSQUOTREM marked functions.
The declarations should be marked INTERNAL for the C codegen, but nowhere else.
This required splitting the macro into one for the declaration and one for
the implementation (so that the implmenetation can still be elided).
Additionally patch gdtoa to not export its symbols beyond linkage with the
ML code. As this is only appropriate for use with MLton, I put this patch
in a separate file.
----------------------------------------------------------------------
U mlton/trunk/include/c-chunk.h
U mlton/trunk/include/c-common.h
U mlton/trunk/runtime/Makefile
U mlton/trunk/runtime/basis/Word/Word-ops.h
U mlton/trunk/runtime/bytecode/interpret.c
U mlton/trunk/runtime/bytecode/interpret.h
U mlton/trunk/runtime/gc/array-allocate.h
U mlton/trunk/runtime/gc/array.h
U mlton/trunk/runtime/gc/call-stack.h
U mlton/trunk/runtime/gc/copy-thread.h
U mlton/trunk/runtime/gc/done.h
U mlton/trunk/runtime/gc/garbage-collection.h
U mlton/trunk/runtime/gc/gc_state.h
U mlton/trunk/runtime/gc/handler.h
U mlton/trunk/runtime/gc/init.h
U mlton/trunk/runtime/gc/int-inf.h
U mlton/trunk/runtime/gc/pack.h
U mlton/trunk/runtime/gc/profiling.h
U mlton/trunk/runtime/gc/share.h
U mlton/trunk/runtime/gc/size.h
U mlton/trunk/runtime/gc/sources.h
U mlton/trunk/runtime/gc/switch-thread.h
U mlton/trunk/runtime/gc/weak.h
U mlton/trunk/runtime/gc/world.h
A mlton/trunk/runtime/gdtoa-patch.internal
A mlton/trunk/runtime/gdtoa-patch.mlton
U mlton/trunk/runtime/gen/gen-types.c
U mlton/trunk/runtime/platform.h
U mlton/trunk/runtime/util/die.h
U mlton/trunk/runtime/util/to-string.c
U mlton/trunk/runtime/util/to-string.h
U mlton/trunk/runtime/util.c
----------------------------------------------------------------------
Modified: mlton/trunk/include/c-chunk.h
===================================================================
--- mlton/trunk/include/c-chunk.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/include/c-chunk.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -204,8 +204,11 @@
* one of the arguments is a constant.
*/
#ifndef MLTON_CODEGEN_WORDSQUOTREM
-#define MLTON_CODEGEN_WORDSQUOTREM(func)
+#define MLTON_CODEGEN_WORDSQUOTREM(func) INTERNAL
#endif
+#ifndef MLTON_CODEGEN_WORDSQUOTREM_IMPL
+#define MLTON_CODEGEN_WORDSQUOTREM_IMPL(func)
+#endif
/* Declare memcpy, since <string.h> isn't included.
*/
#ifndef MLTON_CODEGEN_MEMCPY
Modified: mlton/trunk/include/c-common.h
===================================================================
--- mlton/trunk/include/c-common.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/include/c-common.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -19,10 +19,9 @@
void *nextChunk;
};
-extern uintptr_t nextFun;
-extern int returnToC;
-extern struct cont (*nextChunks []) (void);
-extern struct GC_state gcState;
+INTERNAL extern uintptr_t nextFun;
+INTERNAL extern int returnToC;
+INTERNAL extern struct cont (*nextChunks []) (void);
#define ChunkName(n) Chunk ## n
Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/Makefile 2008-07-31 19:20:40 UTC (rev 6682)
@@ -290,6 +290,8 @@
gdtoa/arithchk.c:
gzip -dc gdtoa.tgz | tar xf -
patch -s -p0 <gdtoa-patch
+ patch -s -p0 <gdtoa-patch.internal
+ patch -s -p0 <gdtoa-patch.mlton
gdtoa/arithchk.out: gdtoa/arithchk.c
cd gdtoa && $(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -w -O1 -o arithchk.out arithchk.c
Modified: mlton/trunk/runtime/basis/Word/Word-ops.h
===================================================================
--- mlton/trunk/runtime/basis/Word/Word-ops.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/basis/Word/Word-ops.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -96,8 +96,8 @@
* bytecode-codegen, since they will be used in a context where the \
* arguments are variables. \
*/ \
-MLTON_CODEGEN_WORDSQUOTREM(binary (S##size, quot, /)) \
-MLTON_CODEGEN_WORDSQUOTREM(binary (S##size, rem, %)) \
+MLTON_CODEGEN_WORDSQUOTREM_IMPL(binary (S##size, quot, /)) \
+MLTON_CODEGEN_WORDSQUOTREM_IMPL(binary (S##size, rem, %)) \
binary (U##size, quot, /) \
binary (U##size, rem, %) \
binary (size, orb, |) \
Modified: mlton/trunk/runtime/bytecode/interpret.c
===================================================================
--- mlton/trunk/runtime/bytecode/interpret.c 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/bytecode/interpret.c 2008-07-31 19:20:40 UTC (rev 6682)
@@ -23,6 +23,9 @@
#ifndef MLTON_CODEGEN_WORDSQUOTREM
#define MLTON_CODEGEN_WORDSQUOTREM(func) func
#endif
+#ifndef MLTON_CODEGEN_WORDSQUOTREM_IMPL
+#define MLTON_CODEGEN_WORDSQUOTREM_IMPL(func) func
+#endif
/* No need to declare memcpy, since <string.h> comes with platform.h.
*/
#ifndef MLTON_CODEGEN_MEMCPY
Modified: mlton/trunk/runtime/bytecode/interpret.h
===================================================================
--- mlton/trunk/runtime/bytecode/interpret.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/bytecode/interpret.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -12,8 +12,8 @@
#include "assert.h"
#define regs(ty) \
- extern int ty##RegI; \
- extern ty ty##Reg[]
+ INTERNAL extern int ty##RegI; \
+ INTERNAL extern ty ty##Reg[]
regs(CPointer);
regs(Objptr);
@@ -59,7 +59,7 @@
#define PushReg(ty) ty##Reg [ty##RegI++]
#define PushRegX(ty) PushReg(ty)
-void MLton_callC (int i); // provided by client
-void MLton_Bytecode_interpret (Bytecode b, CodeOffset codeOffset);
+INTERNAL void MLton_callC (int i); // provided by client
+INTERNAL void MLton_Bytecode_interpret (Bytecode b, CodeOffset codeOffset);
#endif
Modified: mlton/trunk/runtime/gc/array-allocate.h
===================================================================
--- mlton/trunk/runtime/gc/array-allocate.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/array-allocate.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -8,9 +8,9 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-pointer GC_arrayAllocate (GC_state s,
- size_t ensureBytesFree,
- GC_arrayLength numElements,
- GC_header header);
+INTERNAL pointer GC_arrayAllocate (GC_state s,
+ size_t ensureBytesFree,
+ GC_arrayLength numElements,
+ GC_header header);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/array.h
===================================================================
--- mlton/trunk/runtime/gc/array.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/array.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -56,4 +56,4 @@
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
-uintmax_t GC_getArrayLength (pointer a);
+INTERNAL uintmax_t GC_getArrayLength (pointer a);
Modified: mlton/trunk/runtime/gc/call-stack.h
===================================================================
--- mlton/trunk/runtime/gc/call-stack.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/call-stack.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -25,8 +25,8 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-uint32_t GC_numStackFrames (GC_state s);
-void GC_callStack (GC_state s, pointer p);
-uint32_t* GC_frameIndexSourceSeq (GC_state s, GC_frameIndex frameIndex);
+INTERNAL uint32_t GC_numStackFrames (GC_state s);
+INTERNAL void GC_callStack (GC_state s, pointer p);
+INTERNAL uint32_t* GC_frameIndexSourceSeq (GC_state s, GC_frameIndex frameIndex);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/copy-thread.h
===================================================================
--- mlton/trunk/runtime/gc/copy-thread.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/copy-thread.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -14,7 +14,7 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_copyCurrentThread (GC_state s);
-pointer GC_copyThread (GC_state s, pointer p);
+INTERNAL void GC_copyCurrentThread (GC_state s);
+INTERNAL pointer GC_copyThread (GC_state s, pointer p);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/done.h
===================================================================
--- mlton/trunk/runtime/gc/done.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/done.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -6,4 +6,4 @@
* See the file MLton-LICENSE for details.
*/
-void GC_done (GC_state s);
+INTERNAL void GC_done (GC_state s);
Modified: mlton/trunk/runtime/gc/garbage-collection.h
===================================================================
--- mlton/trunk/runtime/gc/garbage-collection.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/garbage-collection.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -27,7 +27,7 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_collect (GC_state s, size_t bytesRequested, bool force,
- char *file, int line);
+INTERNAL void GC_collect (GC_state s, size_t bytesRequested, bool force,
+ char *file, int line);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/gc_state.h
===================================================================
--- mlton/trunk/runtime/gc/gc_state.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/gc_state.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -85,32 +85,32 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-bool GC_getAmOriginal (GC_state s);
-void GC_setAmOriginal (GC_state s, bool b);
-void GC_setControlsMessages (GC_state s, bool b);
-void GC_setControlsSummary (GC_state s, bool b);
-void GC_setControlsRusageMeasureGC (GC_state s, bool b);
-uintmax_t GC_getCumulativeStatisticsBytesAllocated (GC_state s);
-uintmax_t GC_getCumulativeStatisticsNumCopyingGCs (GC_state s);
-uintmax_t GC_getCumulativeStatisticsNumMarkCompactGCs (GC_state s);
-uintmax_t GC_getCumulativeStatisticsNumMinorGCs (GC_state s);
-size_t GC_getCumulativeStatisticsMaxBytesLive (GC_state s);
-void GC_setHashConsDuringGC (GC_state s, bool b);
-size_t GC_getLastMajorStatisticsBytesLive (GC_state s);
+INTERNAL bool GC_getAmOriginal (GC_state s);
+INTERNAL void GC_setAmOriginal (GC_state s, bool b);
+INTERNAL void GC_setControlsMessages (GC_state s, bool b);
+INTERNAL void GC_setControlsSummary (GC_state s, bool b);
+INTERNAL void GC_setControlsRusageMeasureGC (GC_state s, bool b);
+INTERNAL uintmax_t GC_getCumulativeStatisticsBytesAllocated (GC_state s);
+INTERNAL uintmax_t GC_getCumulativeStatisticsNumCopyingGCs (GC_state s);
+INTERNAL uintmax_t GC_getCumulativeStatisticsNumMarkCompactGCs (GC_state s);
+INTERNAL uintmax_t GC_getCumulativeStatisticsNumMinorGCs (GC_state s);
+INTERNAL size_t GC_getCumulativeStatisticsMaxBytesLive (GC_state s);
+INTERNAL void GC_setHashConsDuringGC (GC_state s, bool b);
+INTERNAL size_t GC_getLastMajorStatisticsBytesLive (GC_state s);
-pointer GC_getCallFromCHandlerThread (GC_state s);
-void GC_setCallFromCHandlerThread (GC_state s, pointer p);
-pointer GC_getCurrentThread (GC_state s);
-pointer GC_getSavedThread (GC_state s);
-void GC_setSavedThread (GC_state s, pointer p);
-void GC_setSignalHandlerThread (GC_state s, pointer p);
+INTERNAL pointer GC_getCallFromCHandlerThread (GC_state s);
+INTERNAL void GC_setCallFromCHandlerThread (GC_state s, pointer p);
+INTERNAL pointer GC_getCurrentThread (GC_state s);
+INTERNAL pointer GC_getSavedThread (GC_state s);
+INTERNAL void GC_setSavedThread (GC_state s, pointer p);
+INTERNAL void GC_setSignalHandlerThread (GC_state s, pointer p);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
-struct rusage* GC_getRusageGCAddr (GC_state s);
+INTERNAL struct rusage* GC_getRusageGCAddr (GC_state s);
-sigset_t* GC_getSignalsHandledAddr (GC_state s);
-sigset_t* GC_getSignalsPendingAddr (GC_state s);
-void GC_setGCSignalHandled (GC_state s, bool b);
-bool GC_getGCSignalPending (GC_state s);
-void GC_setGCSignalPending (GC_state s, bool b);
+INTERNAL sigset_t* GC_getSignalsHandledAddr (GC_state s);
+INTERNAL sigset_t* GC_getSignalsPendingAddr (GC_state s);
+INTERNAL void GC_setGCSignalHandled (GC_state s, bool b);
+INTERNAL bool GC_getGCSignalPending (GC_state s);
+INTERNAL void GC_setGCSignalPending (GC_state s, bool b);
Modified: mlton/trunk/runtime/gc/handler.h
===================================================================
--- mlton/trunk/runtime/gc/handler.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/handler.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -14,9 +14,9 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_startSignalHandler (GC_state s);
-void GC_finishSignalHandler (GC_state s);
+INTERNAL void GC_startSignalHandler (GC_state s);
+INTERNAL void GC_finishSignalHandler (GC_state s);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
-void GC_handler (GC_state s, int signum);
+INTERNAL void GC_handler (GC_state s, int signum);
Modified: mlton/trunk/runtime/gc/init.h
===================================================================
--- mlton/trunk/runtime/gc/init.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/init.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -13,4 +13,4 @@
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
-int GC_init (GC_state s, int argc, char **argv);
+INTERNAL int GC_init (GC_state s, int argc, char **argv);
Modified: mlton/trunk/runtime/gc/int-inf.h
===================================================================
--- mlton/trunk/runtime/gc/int-inf.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/int-inf.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -56,7 +56,7 @@
sizeof(mp_limb_t) >= sizeof(objptr) ? \
1 : (int)(sizeof(objptr) / sizeof(mp_limb_t)))
-void initIntInf (GC_state s);
+INTERNAL void initIntInf (GC_state s);
static inline void fillIntInfArg (GC_state s, objptr arg, __mpz_struct *res,
mp_limb_t space[LIMBS_PER_OBJPTR + 1]);
static inline void initIntInfRes (GC_state s, __mpz_struct *res, size_t bytes);
@@ -66,21 +66,21 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-objptr IntInf_add (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_andb (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_gcd (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_mul (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_quot (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_orb (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_rem (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_sub (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_xorb (objptr lhs, objptr rhs, size_t bytes);
-objptr IntInf_neg (objptr arg, size_t bytes);
-objptr IntInf_notb (objptr arg, size_t bytes);
-objptr IntInf_arshift (objptr arg, Word32_t shift, size_t bytes);
-objptr IntInf_lshift (objptr arg, Word32_t shift, size_t bytes);
-Int32_t IntInf_compare (objptr lhs, objptr rhs);
-Bool_t IntInf_equal (objptr lhs, objptr rhs);
-objptr IntInf_toString (objptr arg, Int32_t base, size_t bytes);
+INTERNAL objptr IntInf_add (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_andb (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_gcd (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_mul (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_quot (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_orb (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_rem (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_sub (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_xorb (objptr lhs, objptr rhs, size_t bytes);
+INTERNAL objptr IntInf_neg (objptr arg, size_t bytes);
+INTERNAL objptr IntInf_notb (objptr arg, size_t bytes);
+INTERNAL objptr IntInf_arshift (objptr arg, Word32_t shift, size_t bytes);
+INTERNAL objptr IntInf_lshift (objptr arg, Word32_t shift, size_t bytes);
+INTERNAL Int32_t IntInf_compare (objptr lhs, objptr rhs);
+INTERNAL Bool_t IntInf_equal (objptr lhs, objptr rhs);
+INTERNAL objptr IntInf_toString (objptr arg, Int32_t base, size_t bytes);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/pack.h
===================================================================
--- mlton/trunk/runtime/gc/pack.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/pack.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -8,7 +8,7 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_pack (GC_state s);
-void GC_unpack (GC_state s);
+INTERNAL void GC_pack (GC_state s);
+INTERNAL void GC_unpack (GC_state s);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/profiling.h
===================================================================
--- mlton/trunk/runtime/gc/profiling.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/profiling.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -100,9 +100,9 @@
static void writeProfileCount (GC_state s, FILE *f, GC_profileData p, GC_profileMasterIndex i);
-GC_profileData profileMalloc (GC_state s);
-void profileWrite (GC_state s, GC_profileData p, const char* fileName);
-void profileFree (GC_state s, GC_profileData p);
+INTERNAL GC_profileData profileMalloc (GC_state s);
+INTERNAL void profileWrite (GC_state s, GC_profileData p, const char* fileName);
+INTERNAL void profileFree (GC_state s, GC_profileData p);
static void setProfTimer (long usec);
static void initProfilingTime (GC_state s);
@@ -113,21 +113,21 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_profileEnter (GC_state s);
-void GC_profileLeave (GC_state s);
-void GC_profileInc (GC_state s, size_t amount);
-void GC_profileAllocInc (GC_state s, size_t amount);
+INTERNAL void GC_profileEnter (GC_state s);
+INTERNAL void GC_profileLeave (GC_state s);
+INTERNAL void GC_profileInc (GC_state s, size_t amount);
+INTERNAL void GC_profileAllocInc (GC_state s, size_t amount);
-GC_profileData GC_getProfileCurrent (GC_state s);
-void GC_setProfileCurrent (GC_state s, GC_profileData p);
+INTERNAL GC_profileData GC_getProfileCurrent (GC_state s);
+INTERNAL void GC_setProfileCurrent (GC_state s, GC_profileData p);
-GC_profileData GC_profileMalloc (GC_state s);
-void GC_profileWrite (GC_state s, GC_profileData p, NullString8_t fileName);
-void GC_profileFree (GC_state s, GC_profileData p);
+INTERNAL GC_profileData GC_profileMalloc (GC_state s);
+INTERNAL void GC_profileWrite (GC_state s, GC_profileData p, NullString8_t fileName);
+INTERNAL void GC_profileFree (GC_state s, GC_profileData p);
-void GC_profileDone (GC_state s);
+INTERNAL void GC_profileDone (GC_state s);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
-void GC_handleSigProf (code_pointer pc);
+INTERNAL void GC_handleSigProf (code_pointer pc);
Modified: mlton/trunk/runtime/gc/share.h
===================================================================
--- mlton/trunk/runtime/gc/share.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/share.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -8,6 +8,6 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_share (GC_state s, pointer object);
+INTERNAL void GC_share (GC_state s, pointer object);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/size.h
===================================================================
--- mlton/trunk/runtime/gc/size.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/size.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -8,6 +8,6 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-size_t GC_size (GC_state s, pointer root);
+INTERNAL size_t GC_size (GC_state s, pointer root);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/sources.h
===================================================================
--- mlton/trunk/runtime/gc/sources.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/sources.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -91,6 +91,6 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-char* GC_sourceName (GC_state s, GC_sourceIndex i);
+INTERNAL char* GC_sourceName (GC_state s, GC_sourceIndex i);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/switch-thread.h
===================================================================
--- mlton/trunk/runtime/gc/switch-thread.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/switch-thread.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -14,6 +14,6 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_switchToThread (GC_state s, pointer p, size_t ensureBytesFree);
+INTERNAL void GC_switchToThread (GC_state s, pointer p, size_t ensureBytesFree);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/weak.h
===================================================================
--- mlton/trunk/runtime/gc/weak.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/weak.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -53,8 +53,8 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-uint32_t GC_weakCanGet (GC_state s, pointer p);
-pointer GC_weakGet (GC_state s, pointer p);
-pointer GC_weakNew (GC_state s, GC_header header, pointer p);
+INTERNAL uint32_t GC_weakCanGet (GC_state s, pointer p);
+INTERNAL pointer GC_weakGet (GC_state s, pointer p);
+INTERNAL pointer GC_weakNew (GC_state s, GC_header header, pointer p);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/trunk/runtime/gc/world.h
===================================================================
--- mlton/trunk/runtime/gc/world.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gc/world.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -16,8 +16,8 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
-void GC_saveWorld (GC_state s, NullString8_t fileName);
+INTERNAL void GC_saveWorld (GC_state s, NullString8_t fileName);
/* TRUE = success, FALSE = failure */
-C_Errno_t(Bool_t) GC_getSaveWorldStatus (GC_state s);
+INTERNAL C_Errno_t(Bool_t) GC_getSaveWorldStatus (GC_state s);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Added: mlton/trunk/runtime/gdtoa-patch.internal
===================================================================
--- mlton/trunk/runtime/gdtoa-patch.internal 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gdtoa-patch.internal 2008-07-31 19:20:40 UTC (rev 6682)
@@ -0,0 +1,110 @@
+--- gdtoa/gdtoaimp.h.orig 2008-07-31 18:06:25.097868376 +0200
++++ gdtoa/gdtoaimp.h 2008-07-31 18:09:15.882512312 +0200
+@@ -176,6 +176,7 @@
+ #ifndef GDTOAIMP_H_INCLUDED
+ #define GDTOAIMP_H_INCLUDED
+ #include "gdtoa.h"
++#include "../export.h"
+
+ #ifdef DEBUG
+ #include "stdio.h"
+@@ -528,53 +529,53 @@
+ #define trailz trailz_D2A
+ #define ulp ulp_D2A
+
+- extern char *dtoa_result;
+- extern CONST double bigtens[], tens[], tinytens[];
+- extern unsigned char hexdig[];
+-
+- extern Bigint *Balloc ANSI((int));
+- extern void Bfree ANSI((Bigint*));
+- extern void ULtof ANSI((ULong*, ULong*, Long, int));
+- extern void ULtod ANSI((ULong*, ULong*, Long, int));
+- extern void ULtodd ANSI((ULong*, ULong*, Long, int));
+- extern void ULtoQ ANSI((ULong*, ULong*, Long, int));
+- extern void ULtox ANSI((UShort*, ULong*, Long, int));
+- extern void ULtoxL ANSI((ULong*, ULong*, Long, int));
+- extern ULong any_on ANSI((Bigint*, int));
+- extern double b2d ANSI((Bigint*, int*));
+- extern int cmp ANSI((Bigint*, Bigint*));
+- extern void copybits ANSI((ULong*, int, Bigint*));
+- extern Bigint *d2b ANSI((double, int*, int*));
+- extern int decrement ANSI((Bigint*));
+- extern Bigint *diff ANSI((Bigint*, Bigint*));
+- extern char *dtoa ANSI((double d, int mode, int ndigits,
++INTERNAL extern char *dtoa_result;
++INTERNAL extern CONST double bigtens[], tens[], tinytens[];
++INTERNAL extern unsigned char hexdig[];
++
++INTERNAL extern Bigint *Balloc ANSI((int));
++INTERNAL extern void Bfree ANSI((Bigint*));
++INTERNAL extern void ULtof ANSI((ULong*, ULong*, Long, int));
++INTERNAL extern void ULtod ANSI((ULong*, ULong*, Long, int));
++INTERNAL extern void ULtodd ANSI((ULong*, ULong*, Long, int));
++INTERNAL extern void ULtoQ ANSI((ULong*, ULong*, Long, int));
++INTERNAL extern void ULtox ANSI((UShort*, ULong*, Long, int));
++INTERNAL extern void ULtoxL ANSI((ULong*, ULong*, Long, int));
++INTERNAL extern ULong any_on ANSI((Bigint*, int));
++INTERNAL extern double b2d ANSI((Bigint*, int*));
++INTERNAL extern int cmp ANSI((Bigint*, Bigint*));
++INTERNAL extern void copybits ANSI((ULong*, int, Bigint*));
++INTERNAL extern Bigint *d2b ANSI((double, int*, int*));
++INTERNAL extern int decrement ANSI((Bigint*));
++INTERNAL extern Bigint *diff ANSI((Bigint*, Bigint*));
++INTERNAL extern char *dtoa ANSI((double d, int mode, int ndigits,
+ int *decpt, int *sign, char **rve));
+- extern char *g__fmt ANSI((char*, char*, char*, int, ULong));
+- extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
+- extern void hexdig_init_D2A(Void);
+- extern int hexnan ANSI((CONST char**, FPI*, ULong*));
+- extern int hi0bits ANSI((ULong));
+- extern Bigint *i2b ANSI((int));
+- extern Bigint *increment ANSI((Bigint*));
+- extern int lo0bits ANSI((ULong*));
+- extern Bigint *lshift ANSI((Bigint*, int));
+- extern int match ANSI((CONST char**, char*));
+- extern Bigint *mult ANSI((Bigint*, Bigint*));
+- extern Bigint *multadd ANSI((Bigint*, int, int));
+- extern char *nrv_alloc ANSI((char*, char **, int));
+- extern Bigint *pow5mult ANSI((Bigint*, int));
+- extern int quorem ANSI((Bigint*, Bigint*));
+- extern double ratio ANSI((Bigint*, Bigint*));
+- extern void rshift ANSI((Bigint*, int));
+- extern char *rv_alloc ANSI((int));
+- extern Bigint *s2b ANSI((CONST char*, int, int, ULong));
+- extern Bigint *set_ones ANSI((Bigint*, int));
+- extern char *strcp ANSI((char*, const char*));
+- extern int gdtoa__strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
+- extern double gdtoa__strtod ANSI((const char *s00, char **se));
+- extern Bigint *sum ANSI((Bigint*, Bigint*));
+- extern int trailz ANSI((Bigint*));
+- extern double ulp ANSI((double));
++INTERNAL extern char *g__fmt ANSI((char*, char*, char*, int, ULong));
++INTERNAL extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
++INTERNAL extern void hexdig_init_D2A(Void);
++INTERNAL extern int hexnan ANSI((CONST char**, FPI*, ULong*));
++INTERNAL extern int hi0bits ANSI((ULong));
++INTERNAL extern Bigint *i2b ANSI((int));
++INTERNAL extern Bigint *increment ANSI((Bigint*));
++INTERNAL extern int lo0bits ANSI((ULong*));
++INTERNAL extern Bigint *lshift ANSI((Bigint*, int));
++INTERNAL extern int match ANSI((CONST char**, char*));
++INTERNAL extern Bigint *mult ANSI((Bigint*, Bigint*));
++INTERNAL extern Bigint *multadd ANSI((Bigint*, int, int));
++INTERNAL extern char *nrv_alloc ANSI((char*, char **, int));
++INTERNAL extern Bigint *pow5mult ANSI((Bigint*, int));
++INTERNAL extern int quorem ANSI((Bigint*, Bigint*));
++INTERNAL extern double ratio ANSI((Bigint*, Bigint*));
++INTERNAL extern void rshift ANSI((Bigint*, int));
++INTERNAL extern char *rv_alloc ANSI((int));
++INTERNAL extern Bigint *s2b ANSI((CONST char*, int, int, ULong));
++INTERNAL extern Bigint *set_ones ANSI((Bigint*, int));
++INTERNAL extern char *strcp ANSI((char*, const char*));
++INTERNAL extern int gdtoa__strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
++INTERNAL extern double gdtoa__strtod ANSI((const char *s00, char **se));
++INTERNAL extern Bigint *sum ANSI((Bigint*, Bigint*));
++INTERNAL extern int trailz ANSI((Bigint*));
++INTERNAL extern double ulp ANSI((double));
+
+ #ifdef __cplusplus
+ }
Added: mlton/trunk/runtime/gdtoa-patch.mlton
===================================================================
--- mlton/trunk/runtime/gdtoa-patch.mlton 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gdtoa-patch.mlton 2008-07-31 19:20:40 UTC (rev 6682)
@@ -0,0 +1,86 @@
+--- gdtoa/gdtoa.h.orig 2008-07-31 18:07:23.128804424 +0200
++++ gdtoa/gdtoa.h 2008-07-31 18:09:01.333773640 +0200
+@@ -39,6 +39,7 @@
+ #define GDTOA_H_INCLUDED
+
+ #include "arith.h"
++#include "../export.h"
+
+ #ifndef Long
+ #define Long long
+@@ -108,42 +109,42 @@
+ extern "C" {
+ #endif
+
+-extern char* gdtoa__dtoa ANSI((double d, int mode, int ndigits, int *decpt,
++INTERNAL extern char* gdtoa__dtoa ANSI((double d, int mode, int ndigits, int *decpt,
+ int *sign, char **rve));
+-extern char* gdtoa__gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
++INTERNAL extern char* gdtoa__gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
+ int mode, int ndigits, int *decpt, char **rve));
+-extern void gdtoa__freedtoa ANSI((char*));
+-extern float gdtoa__strtof ANSI((CONST char *, char **));
+-extern double gdtoa__strtod ANSI((CONST char *, char **));
+-extern int gdtoa__strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
+-
+-extern char* gdtoa__g_ddfmt ANSI((char*, double*, int, unsigned));
+-extern char* gdtoa__g_dfmt ANSI((char*, double*, int, unsigned));
+-extern char* gdtoa__g_ffmt ANSI((char*, float*, int, unsigned));
+-extern char* gdtoa__g_Qfmt ANSI((char*, void*, int, unsigned));
+-extern char* gdtoa__g_xfmt ANSI((char*, void*, int, unsigned));
+-extern char* gdtoa__g_xLfmt ANSI((char*, void*, int, unsigned));
+-
+-extern int gdtoa__strtoId ANSI((CONST char*, char**, double*, double*));
+-extern int gdtoa__strtoIdd ANSI((CONST char*, char**, double*, double*));
+-extern int gdtoa__strtoIf ANSI((CONST char*, char**, float*, float*));
+-extern int gdtoa__strtoIQ ANSI((CONST char*, char**, void*, void*));
+-extern int gdtoa__strtoIx ANSI((CONST char*, char**, void*, void*));
+-extern int gdtoa__strtoIxL ANSI((CONST char*, char**, void*, void*));
+-extern int gdtoa__strtord ANSI((CONST char*, char**, int, double*));
+-extern int gdtoa__strtordd ANSI((CONST char*, char**, int, double*));
+-extern int gdtoa__strtorf ANSI((CONST char*, char**, int, float*));
+-extern int gdtoa__strtorQ ANSI((CONST char*, char**, int, void*));
+-extern int gdtoa__strtorx ANSI((CONST char*, char**, int, void*));
+-extern int gdtoa__strtorxL ANSI((CONST char*, char**, int, void*));
++INTERNAL extern void gdtoa__freedtoa ANSI((char*));
++INTERNAL extern float gdtoa__strtof ANSI((CONST char *, char **));
++INTERNAL extern double gdtoa__strtod ANSI((CONST char *, char **));
++INTERNAL extern int gdtoa__strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
++
++INTERNAL extern char* gdtoa__g_ddfmt ANSI((char*, double*, int, unsigned));
++INTERNAL extern char* gdtoa__g_dfmt ANSI((char*, double*, int, unsigned));
++INTERNAL extern char* gdtoa__g_ffmt ANSI((char*, float*, int, unsigned));
++INTERNAL extern char* gdtoa__g_Qfmt ANSI((char*, void*, int, unsigned));
++INTERNAL extern char* gdtoa__g_xfmt ANSI((char*, void*, int, unsigned));
++INTERNAL extern char* gdtoa__g_xLfmt ANSI((char*, void*, int, unsigned));
++
++INTERNAL extern int gdtoa__strtoId ANSI((CONST char*, char**, double*, double*));
++INTERNAL extern int gdtoa__strtoIdd ANSI((CONST char*, char**, double*, double*));
++INTERNAL extern int gdtoa__strtoIf ANSI((CONST char*, char**, float*, float*));
++INTERNAL extern int gdtoa__strtoIQ ANSI((CONST char*, char**, void*, void*));
++INTERNAL extern int gdtoa__strtoIx ANSI((CONST char*, char**, void*, void*));
++INTERNAL extern int gdtoa__strtoIxL ANSI((CONST char*, char**, void*, void*));
++INTERNAL extern int gdtoa__strtord ANSI((CONST char*, char**, int, double*));
++INTERNAL extern int gdtoa__strtordd ANSI((CONST char*, char**, int, double*));
++INTERNAL extern int gdtoa__strtorf ANSI((CONST char*, char**, int, float*));
++INTERNAL extern int gdtoa__strtorQ ANSI((CONST char*, char**, int, void*));
++INTERNAL extern int gdtoa__strtorx ANSI((CONST char*, char**, int, void*));
++INTERNAL extern int gdtoa__strtorxL ANSI((CONST char*, char**, int, void*));
+ #if 1
+-extern int gdtoa__strtodI ANSI((CONST char*, char**, double*));
+-extern int gdtoa__strtopd ANSI((CONST char*, char**, double*));
+-extern int gdtoa__strtopdd ANSI((CONST char*, char**, double*));
+-extern int gdtoa__strtopf ANSI((CONST char*, char**, float*));
+-extern int gdtoa__strtopQ ANSI((CONST char*, char**, void*));
+-extern int gdtoa__strtopx ANSI((CONST char*, char**, void*));
+-extern int gdtoa__strtopxL ANSI((CONST char*, char**, void*));
++INTERNAL extern int gdtoa__strtodI ANSI((CONST char*, char**, double*));
++INTERNAL extern int gdtoa__strtopd ANSI((CONST char*, char**, double*));
++INTERNAL extern int gdtoa__strtopdd ANSI((CONST char*, char**, double*));
++INTERNAL extern int gdtoa__strtopf ANSI((CONST char*, char**, float*));
++INTERNAL extern int gdtoa__strtopQ ANSI((CONST char*, char**, void*));
++INTERNAL extern int gdtoa__strtopx ANSI((CONST char*, char**, void*));
++INTERNAL extern int gdtoa__strtopxL ANSI((CONST char*, char**, void*));
+ #else
+ #define gdtoa__strtopd(s,se,x) gdtoa__strtord(s,se,1,x)
+ #define gdtoa__strtopdd(s,se,x) gdtoa__strtordd(s,se,1,x)
Modified: mlton/trunk/runtime/gen/gen-types.c
===================================================================
--- mlton/trunk/runtime/gen/gen-types.c 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/gen/gen-types.c 2008-07-31 19:20:40 UTC (rev 6682)
@@ -6,6 +6,7 @@
*/
#include "cenv.h"
+#include "export.h"
#include "util.h"
static const char* mlTypesHPrefix[] = {
Modified: mlton/trunk/runtime/platform.h
===================================================================
--- mlton/trunk/runtime/platform.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/platform.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -10,10 +10,10 @@
#define _MLTON_PLATFORM_H_
#include "cenv.h"
+#include "export.h"
#include "util.h"
#include "ml-types.h"
#include "c-types.h"
-#include "export.h"
#ifndef MLton_Platform_Arch_host
#error MLton_Platform_Arch_host not defined
@@ -120,6 +120,9 @@
#ifndef MLTON_CODEGEN_WORDSQUOTREM
#define MLTON_CODEGEN_WORDSQUOTREM(func) func
#endif
+#ifndef MLTON_CODEGEN_WORDSQUOTREM_IMPL
+#define MLTON_CODEGEN_WORDSQUOTREM_IMPL(func) func
+#endif
#include "basis-ffi.h"
#include "gc.h"
@@ -128,9 +131,9 @@
/* Runtime Init/Exit/Alloc */
/* ---------------------------------------------------------------- */
-void MLton_init (int argc, char **argv, GC_state s);
-__attribute__ ((noreturn)) void MLton_exit (GC_state s, C_Int_t status);
-__attribute__ ((noreturn)) void MLton_allocTooLarge (void);
+INTERNAL void MLton_init (int argc, char **argv, GC_state s);
+INTERNAL __attribute__ ((noreturn)) void MLton_exit (GC_state s, C_Int_t status);
+INTERNAL __attribute__ ((noreturn)) void MLton_allocTooLarge (void);
/* ---------------------------------------------------------------- */
/* Utility libraries */
@@ -149,37 +152,37 @@
/* GC_displayMem displays the virtual memory mapping to stdout.
* It is used to diagnose memory problems.
*/
-void GC_displayMem (void);
+INTERNAL void GC_displayMem (void);
-void *GC_mmapAnon (void *start, size_t length);
-void *GC_mmapAnon_safe (void *start, size_t length);
-void *GC_mmapAnon_safe_protect (void *start, size_t length,
- size_t dead_low, size_t dead_high);
-void *GC_mremap (void *start, size_t oldLength, size_t newLength);
-void GC_release (void *base, size_t length);
-void GC_decommit (void *base, size_t length);
+INTERNAL void *GC_mmapAnon (void *start, size_t length);
+INTERNAL void *GC_mmapAnon_safe (void *start, size_t length);
+INTERNAL void *GC_mmapAnon_safe_protect (void *start, size_t length,
+ size_t dead_low, size_t dead_high);
+INTERNAL void *GC_mremap (void *start, size_t oldLength, size_t newLength);
+INTERNAL void GC_release (void *base, size_t length);
+INTERNAL void GC_decommit (void *base, size_t length);
-size_t GC_pageSize (void);
-uintmax_t GC_physMem (void);
+INTERNAL size_t GC_pageSize (void);
+INTERNAL uintmax_t GC_physMem (void);
-void GC_setCygwinUseMmap (bool b);
+INTERNAL void GC_setCygwinUseMmap (bool b);
-void GC_diskBack_close (void *data);
-void GC_diskBack_read (void *data, pointer buf, size_t size);
-void *GC_diskBack_write (pointer buf, size_t size);
+INTERNAL void GC_diskBack_close (void *data);
+INTERNAL void GC_diskBack_read (void *data, pointer buf, size_t size);
+INTERNAL void *GC_diskBack_write (pointer buf, size_t size);
/* ------------------------------------------------- */
/* Text Segment */
/* ------------------------------------------------- */
-code_pointer GC_getTextEnd (void);
-code_pointer GC_getTextStart (void);
+INTERNAL code_pointer GC_getTextEnd (void);
+INTERNAL code_pointer GC_getTextStart (void);
/* ------------------------------------------------- */
/* SigProf Handler */
/* ------------------------------------------------- */
-void GC_setSigProfHandler (struct sigaction *sa);
+INTERNAL void GC_setSigProfHandler (struct sigaction *sa);
/* ---------------------------------------------------------------- */
/* MLton libraries */
@@ -195,14 +198,14 @@
#define MLton_Platform_Arch_bigendian isBigEndian()
-extern Bool MLton_Platform_CygwinUseMmap;
+INTERNAL extern Bool MLton_Platform_CygwinUseMmap;
/* ------------------------------------------------- */
/* Socket */
/* ------------------------------------------------- */
#if (defined (__MSVCRT__))
-void MLton_initSockets (void);
+INTERNAL void MLton_initSockets (void);
#else
static inline void MLton_initSockets (void) {}
#endif
@@ -213,8 +216,8 @@
#else
/* Platform has no MSG_DONTWAIT flag for recv(), so these must be
defined to simulate that flag. */
-int MLton_recv(int s, void *buf, int len, int flags);
-int MLton_recvfrom(int s, void *buf, int len, int flags, void *from, socklen_t *fromlen);
+INTERNAL int MLton_recv(int s, void *buf, int len, int flags);
+INTERNAL int MLton_recvfrom(int s, void *buf, int len, int flags, void *from, socklen_t *fromlen);
#endif
#endif /* _MLTON_PLATFORM_H_ */
Modified: mlton/trunk/runtime/util/die.h
===================================================================
--- mlton/trunk/runtime/util/die.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/util/die.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -7,10 +7,10 @@
*/
/* issue error message and exit */
-extern void die (const char *fmt, ...)
+INTERNAL extern void die (const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)))
__attribute__ ((noreturn));
/* issue error message and exit. Also print strerror(errno). */
-extern void diee (const char *fmt, ...)
+INTERNAL extern void diee (const char *fmt, ...)
__attribute__ ((format(printf, 1, 2)))
__attribute__ ((noreturn));
Modified: mlton/trunk/runtime/util/to-string.c
===================================================================
--- mlton/trunk/runtime/util/to-string.c 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/util/to-string.c 2008-07-31 19:20:40 UTC (rev 6682)
@@ -5,6 +5,7 @@
* See the file MLton-LICENSE for details.
*/
+#include "export.h"
#include "util.h"
const char* boolToString (bool b) {
Modified: mlton/trunk/runtime/util/to-string.h
===================================================================
--- mlton/trunk/runtime/util/to-string.h 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/util/to-string.h 2008-07-31 19:20:40 UTC (rev 6682)
@@ -5,6 +5,6 @@
* See the file MLton-LICENSE for details.
*/
-const char* boolToString (bool b);
-char* intmaxToCommaString (intmax_t n);
-char* uintmaxToCommaString (uintmax_t n);
+INTERNAL const char* boolToString (bool b);
+INTERNAL char* intmaxToCommaString (intmax_t n);
+INTERNAL char* uintmaxToCommaString (uintmax_t n);
Modified: mlton/trunk/runtime/util.c
===================================================================
--- mlton/trunk/runtime/util.c 2008-07-31 15:49:11 UTC (rev 6681)
+++ mlton/trunk/runtime/util.c 2008-07-31 19:20:40 UTC (rev 6682)
@@ -5,5 +5,6 @@
* See the file MLton-LICENSE for details.
*/
+#include "export.h"
#include "util/die.c"
#include "util/to-string.c"
More information about the MLton-commit
mailing list