[MLton-commit] r4437
Matthew Fluet
MLton@mlton.org
Mon, 1 May 2006 19:52:43 -0700
Merge trunk revisions 4402:4436 into x86_64 branch
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/pack-word32.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/primitive.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/real/pack-real.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/sml-nj/sml-nj.sml
U mlton/branches/on-20050822-x86_64-branch/bin/platform
U mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis
U mlton/branches/on-20050822-x86_64-branch/doc/changelog
U mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile
U mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile
U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml
U mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/platform.sig
U mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile
U mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun
A mlton/branches/on-20050822-x86_64-branch/regression/mlton.share.hppa-hpux.ok
A mlton/branches/on-20050822-x86_64-branch/regression/mlton.share.sparc-solaris.ok
A mlton/branches/on-20050822-x86_64-branch/regression/pack-real.2.ok
A mlton/branches/on-20050822-x86_64-branch/regression/pack-real.2.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
A mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c
A mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h
A mlton/branches/on-20050822-x86_64-branch/runtime/platform/setenv.putenv.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/pack-word32.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/pack-word32.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/pack-word32.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -22,14 +22,16 @@
Primitive.Word8Array.updateWordRev,
Primitive.Word8Vector.subWordRev)
-fun start (i, n) =
+fun offset (i, n) =
let
val i = Int.* (bytesPerElem, i)
- val _ =
+ val () =
if Primitive.safe
- andalso Primitive.Int.geu (Int.+ (i, Int.- (bytesPerElem, 1)), n)
- then raise Subscript
- else ()
+ andalso (Primitive.Int.geu
+ (Int.+ (i, Int.- (bytesPerElem, 1)), n)) then
+ raise Subscript
+ else
+ ()
in
i
end handle Overflow => raise Subscript
@@ -37,7 +39,7 @@
local
fun make (sub, length, toPoly) (av, i) =
let
- val _ = start (i, length av)
+ val _ = offset (i, length av)
in
Word.toLarge (sub (toPoly av, i))
end
@@ -51,7 +53,7 @@
fun update (a, i, w) =
let
val a = Word8Array.toPoly a
- val _ = start (i, Array.length a)
+ val _ = offset (i, Array.length a)
in
up (a, i, Word.fromLarge w)
end
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sig 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2003-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2003-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -23,6 +23,7 @@
Cygwin
| Darwin
| FreeBSD
+ | HPUX
| Linux
| MinGW
| NetBSD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/platform.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2003-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2003-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -46,6 +46,7 @@
val all = [(Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
+ (HPUX, "HPUX"),
(Linux, "Linux"),
(MinGW, "MinGW"),
(NetBSD, "NetBSD"),
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/primitive.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/primitive.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/primitive.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -783,6 +783,7 @@
Cygwin
| Darwin
| FreeBSD
+ | HPUX
| Linux
| MinGW
| NetBSD
@@ -794,6 +795,7 @@
"cygwin" => Cygwin
| "darwin" => Darwin
| "freebsd" => FreeBSD
+ | "hpux" => HPUX
| "linux" => Linux
| "mingw" => MinGW
| "netbsd" => NetBSD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/real/pack-real.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/real/pack-real.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/real/pack-real.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -24,15 +24,23 @@
then (subVec, update)
else (subVecRev, updateRev)
-fun check (size, i) =
- if Int.< (i, 0) orelse Int.> (i, size -? bytesPerElem) then
- raise Subscript
- else
- ()
+fun offset (i, n) =
+ let
+ val i = Int.* (bytesPerElem, i)
+ val () =
+ if Primitive.safe
+ andalso (Primitive.Int.geu
+ (Int.+ (i, Int.- (bytesPerElem, 1)), n)) then
+ raise Subscript
+ else
+ ()
+ in
+ i
+ end handle Overflow => raise Subscript
fun update (a, i, r) =
let
- val () = check (Word8Array.length a, i)
+ val i = offset (i, Word8Array.length a)
val a = Word8Array.toPoly a
in
up (a, i, r)
@@ -48,7 +56,7 @@
fun subVec (v, i) =
let
- val () = check (Word8Vector.length v, i)
+ val i = offset (i, Word8Vector.length v)
val v = Word8Vector.toPoly v
in
sub (v, i)
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/sml-nj/sml-nj.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -33,6 +33,7 @@
Cygwin => UNIX
| Darwin => MACOS
| FreeBSD => UNIX
+ | HPUX => UNIX
| Linux => UNIX
| MinGW => WIN32
| NetBSD => UNIX
@@ -68,4 +69,3 @@
| Original => false
end
end
-
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sig 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sig 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2003-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2003-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -23,6 +23,7 @@
Cygwin
| Darwin
| FreeBSD
+ | HPUX
| Linux
| MinGW
| NetBSD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/mlton/platform.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2003-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2003-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -46,6 +46,7 @@
val all = [(Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
+ (HPUX, "HPUX"),
(Linux, "Linux"),
(MinGW, "MinGW"),
(NetBSD, "NetBSD"),
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/primitive/prim-mlton.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -193,6 +193,7 @@
Cygwin
| Darwin
| FreeBSD
+ | HPUX
| Linux
| MinGW
| NetBSD
@@ -204,6 +205,7 @@
"cygwin" => Cygwin
| "darwin" => Darwin
| "freebsd" => FreeBSD
+ | "hpux" => HPUX
| "linux" => Linux
| "mingw" => MinGW
| "netbsd" => NetBSD
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/sml-nj/sml-nj.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/sml-nj/sml-nj.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library.refactor/sml-nj/sml-nj.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -33,6 +33,7 @@
Cygwin => UNIX
| Darwin => MACOS
| FreeBSD => UNIX
+ | HPUX => UNIX
| Linux => UNIX
| MinGW => WIN32
| NetBSD => UNIX
@@ -68,4 +69,3 @@
| Original => false
end
end
-
Modified: mlton/branches/on-20050822-x86_64-branch/bin/platform
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/platform 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/bin/platform 2006-05-02 02:52:39 UTC (rev 4437)
@@ -35,6 +35,9 @@
FreeBSD*)
HOST_OS='freebsd'
;;
+HP-UX)
+ HOST_OS='hpux'
+;;
Linux)
HOST_OS='linux'
;;
@@ -74,6 +77,9 @@
parisc*)
HOST_ARCH=hppa
;;
+9000/*)
+ HOST_ARCH=hppa
+;;
ia64*)
HOST_ARCH=ia64
;;
Modified: mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis 2006-05-02 02:52:39 UTC (rev 4437)
@@ -144,6 +144,9 @@
freebsd)
os='FreeBSD'
;;
+hpux)
+ os="HPUX"
+;;
linux)
os='Linux'
;;
@@ -206,12 +209,13 @@
structure OS =
struct
- datatype t = Cygwin | Darwin | FreeBSD | Linux | MinGW | NetBSD
- | OpenBSD | Solaris
+ datatype t = Cygwin | Darwin | FreeBSD | HPUX | Linux | MinGW
+ | NetBSD | OpenBSD | Solaris
val all = [(Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
+ (HPUX, "HPUX"),
(Linux, "Linux"),
(MinGW, "MinGW"),
(NetBSD, "NetBSD"),
Modified: mlton/branches/on-20050822-x86_64-branch/doc/changelog
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/doc/changelog 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/doc/changelog 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,5 +1,10 @@
Here are the changes since version 20051202.
+* 2006-04-25
+ - Ported to HPPA-HPUX.
+ - Fixed PackReal{,32,64}{Big,Little} to follow the Basis Library
+ specification.
+
* 2006-04-19
- Fixed a bug in MLton.share that could cause a segfault.
Modified: mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile 2006-05-02 02:52:39 UTC (rev 4437)
@@ -9,6 +9,7 @@
all: ckit/README.mlton
ckit/README.mlton: ckit.tgz ckit.patch
+ rm -rf ckit
gzip -dc ckit.tgz | tar xf -
chmod -R a+r ckit
chmod -R g-s ckit
Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile 2006-05-02 02:52:39 UTC (rev 4437)
@@ -9,6 +9,7 @@
all: MLRISC/README.mlton
MLRISC/README.mlton: MLRISC.tgz MLRISC.patch
+ rm -rf MLRISC
gzip -dc MLRISC.tgz | tar xf -
chmod -R a+r MLRISC
chmod -R g-s MLRISC
Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/mlton.sml 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -213,6 +213,7 @@
Cygwin
| Darwin
| FreeBSD
+ | HPUX
| Linux
| MinGW
| NetBSD
@@ -224,6 +225,7 @@
val all = [(Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
+ (HPUX, "HPUX"),
(Linux, "Linux"),
(MinGW, "MinGW"),
(NetBSD, "NetBSD"),
Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/platform.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/platform.sig 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/lib/mlton-stubs/platform.sig 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2003-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 2003-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
*
* MLton is released under a BSD-style license.
@@ -23,6 +23,7 @@
Cygwin
| Darwin
| FreeBSD
+ | HPUX
| Linux
| MinGW
| NetBSD
Modified: mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile 2006-05-02 02:52:39 UTC (rev 4437)
@@ -9,6 +9,7 @@
all: smlnj-lib/README.mlton
smlnj-lib/README.mlton: smlnj-lib.tgz smlnj-lib.patch
+ rm -rf smlnj-lib
gzip -dc smlnj-lib.tgz | tar xf -
chmod -R a+r smlnj-lib
chmod -R g-s smlnj-lib
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -649,6 +649,7 @@
case targetOS of
Darwin => ()
| FreeBSD => ()
+ | HPUX => ()
| Linux => ()
| NetBSD => ()
| OpenBSD => ()
Copied: mlton/branches/on-20050822-x86_64-branch/regression/mlton.share.hppa-hpux.ok (from rev 4436, mlton/trunk/regression/mlton.share.hppa-hpux.ok)
Copied: mlton/branches/on-20050822-x86_64-branch/regression/mlton.share.sparc-solaris.ok (from rev 4436, mlton/trunk/regression/mlton.share.sparc-solaris.ok)
Copied: mlton/branches/on-20050822-x86_64-branch/regression/pack-real.2.ok (from rev 4436, mlton/trunk/regression/pack-real.2.ok)
Copied: mlton/branches/on-20050822-x86_64-branch/regression/pack-real.2.sml (from rev 4436, mlton/trunk/regression/pack-real.2.sml)
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-## Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+## Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
# Jagannathan, and Stephen Weeks.
# Copyright (C) 1997-2000 NEC Research Institute.
#
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/Uname.c 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,27 +1,27 @@
#include "platform.h"
-static struct utsname utsname;
+static struct utsname mlton_utsname;
C_String_t Posix_ProcEnv_Uname_getSysName () {
- return (C_String_t)utsname.sysname;
+ return (C_String_t)mlton_utsname.sysname;
}
C_String_t Posix_ProcEnv_Uname_getNodeName () {
- return (C_String_t)utsname.nodename;
+ return (C_String_t)mlton_utsname.nodename;
}
C_String_t Posix_ProcEnv_Uname_getRelease () {
- return (C_String_t)utsname.release;
+ return (C_String_t)mlton_utsname.release;
}
C_String_t Posix_ProcEnv_Uname_getVersion () {
- return (C_String_t)utsname.version;
+ return (C_String_t)mlton_utsname.version;
}
C_String_t Posix_ProcEnv_Uname_getMachine () {
- return (C_String_t)utsname.machine;
+ return (C_String_t)mlton_utsname.machine;
}
C_Errno_t(C_Int_t) Posix_ProcEnv_uname () {
- return uname (&utsname);
+ return uname (&mlton_utsname);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c 2006-05-02 02:52:39 UTC (rev 4437)
@@ -24,7 +24,7 @@
* implements / and %.
*/
-#if ! (defined (__amd64__) || defined (__hppa__) || defined (__i386__) || defined (__ppc__) || defined (__powerpc__) || defined (__sparc__))
+#if ! (defined (__amd64__) || defined (__hppa__) || defined (__i386__) || defined(__ia64__)|| defined (__ppc__) || defined (__powerpc__) || defined (__sparc__))
#error check that C {/,%} correctly implement {quot,rem} from the basis library
#endif
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-05-02 02:52:39 UTC (rev 4437)
@@ -25,7 +25,7 @@
"#ifndef _ISOC99_SOURCE",
"#define _ISOC99_SOURCE",
"#endif",
- "#if (defined (__OpenBSD__))",
+ "#if (defined (__hpux__) || defined (__OpenBSD__))",
"#include <inttypes.h>",
"#elif (defined (__sun__))",
"#include <sys/int_types.h>",
Copied: mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.c (from rev 4436, mlton/trunk/runtime/platform/hpux.c)
Copied: mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h (from rev 4436, mlton/trunk/runtime/platform/hpux.h)
Copied: mlton/branches/on-20050822-x86_64-branch/runtime/platform/setenv.putenv.c (from rev 4436, mlton/trunk/runtime/platform/setenv.putenv.c)
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-05-02 02:52:39 UTC (rev 4437)
@@ -9,6 +9,7 @@
#include "signbit.c"
#include "ssmmap.c"
#include "totalRam.sysconf.c"
+#include "setenv.putenv.c"
static void catcher (int sig, siginfo_t *sip, ucontext_t *ucp) {
GC_handleSigProf ((pointer) ucp->uc_mcontext.gregs[REG_PC]);
@@ -85,17 +86,6 @@
smunmap (base, length);
}
-/* This implementation of setenv has a space leak, but I don't see how to avoid
- * it, since the specification of putenv is that it uses the memory for its arg.
- */
-int setenv (const char *name, const char *value, int overwrite) {
- char *b;
-
- b = malloc (strlen (name) + strlen (value) + 2 /* = and \000 */);
- sprintf (b, "%s=%s", name, value);
- return putenv (b);
-}
-
void showMem () {
static char buffer[256];
sprintf (buffer, "pmap %d\n", (int)(getpid ()));
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-02 02:35:42 UTC (rev 4436)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-02 02:52:39 UTC (rev 4437)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
+/* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
* Jagannathan, and Stephen Weeks.
* Copyright (C) 1997-2000 NEC Research Institute.
*
@@ -23,6 +23,8 @@
#include "platform/darwin.h"
#elif (defined (__FreeBSD__))
#include "platform/freebsd.h"
+#elif (defined (__hpux__))
+#include "platform/hpux.h"
#elif (defined (__linux__))
#include "platform/linux.h"
#elif (defined (__MINGW32__))