You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(56) |
Sep
(40) |
Oct
(30) |
Nov
(144) |
Dec
(23) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(41) |
Feb
(29) |
Mar
(31) |
Apr
(39) |
May
(193) |
Jun
(45) |
Jul
(19) |
Aug
(3) |
Sep
(23) |
Oct
(83) |
Nov
(92) |
Dec
(123) |
| 2007 |
Jan
(90) |
Feb
(267) |
Mar
(120) |
Apr
(51) |
May
(40) |
Jun
(121) |
Jul
(109) |
Aug
(173) |
Sep
(77) |
Oct
(52) |
Nov
(121) |
Dec
(62) |
| 2008 |
Jan
(76) |
Feb
(53) |
Mar
(98) |
Apr
(87) |
May
(26) |
Jun
(27) |
Jul
(23) |
Aug
(136) |
Sep
(79) |
Oct
(68) |
Nov
(29) |
Dec
(14) |
| 2009 |
Jan
(7) |
Feb
(2) |
Mar
(11) |
Apr
(75) |
May
(1) |
Jun
(95) |
Jul
(19) |
Aug
(4) |
Sep
(8) |
Oct
(93) |
Nov
(43) |
Dec
(21) |
| 2010 |
Jan
(20) |
Feb
(23) |
Mar
(18) |
Apr
(6) |
May
(20) |
Jun
(23) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
(6) |
Mar
(15) |
Apr
(5) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(17) |
Jul
(37) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(4) |
| 2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(17) |
Nov
(4) |
Dec
(7) |
| 2018 |
Jan
(5) |
Feb
(14) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
| 2019 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(8) |
Jun
(14) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(16) |
Aug
(10) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
|
| 2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(13) |
Dec
|
| 2024 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(14) |
| 2025 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: Matthew F. <fl...@ml...> - 2006-06-24 07:53:58
|
Merge trunk revisions 4634:4662 into x86_64 branch
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/doc/changelog
U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/prim.sig
U mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-codegen.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ref-flatten.fun
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/doc/changelog
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/doc/changelog 2006-06-24 14:46:43 UTC (rev 4662)
+++ mlton/branches/on-20050822-x86_64-branch/doc/changelog 2006-06-24 14:53:54 UTC (rev 4663)
@@ -1,5 +1,9 @@
Here are the changes since version 20051202.
+* 2006-06-24
+ - Fixed a bug in pass to flatten data structures. Thanks to Joe Hurd
+ for the bug report.
+
* 2006-06-08
- Fixed a bug in the native codegen's implementation of the C-calling
convention.
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/prim.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/prim.sig 2006-06-24 14:46:43 UTC (rev 4662)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/prim.sig 2006-06-24 14:53:54 UTC (rev 4663)
@@ -62,7 +62,7 @@
*)
| MLton_bug (* ssa to rssa *)
| MLton_deserialize (* unused *)
- | MLton_eq (* codegen *)
+ | MLton_eq (* ssa to rssa *)
| MLton_equal (* polymorphic equality *)
| MLton_halt (* ssa to rssa *)
(* MLton_handlesSignals and MLton_installSignalHandler work together
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-codegen.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-codegen.fun 2006-06-24 14:46:43 UTC (rev 4662)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-codegen.fun 2006-06-24 14:53:54 UTC (rev 4663)
@@ -80,9 +80,8 @@
= let
val reserveEsp =
(* There is no sigaltstack on cygwin, we need to reserve %esp to
- * hold the C stack pointer. We need to do this even in programs
- * that don't handle signals, since signals get used under the hood
- * in Cygwin.
+ * hold the C stack pointer. We only need to do this in programs
+ * that handle signals.
*)
handlesSignals andalso let open Control in !targetOS = Cygwin end
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun 2006-06-24 14:46:43 UTC (rev 4662)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun 2006-06-24 14:53:54 UTC (rev 4663)
@@ -668,6 +668,7 @@
; result ())
fun equal () =
(Value.unify (arg 0, arg 1)
+ ; Value.dontFlatten (arg 0)
; result ())
in
case Prim.name prim of
@@ -909,13 +910,7 @@
end
end
end)
- | PrimApp {args, prim} =>
- let
- val () = simpleTree ()
- in
- doit (PrimApp {args = replaceVars args,
- prim = prim})
- end
+ | PrimApp {args, prim} => simple ()
| Select {base, offset} =>
(case var of
NONE => none ()
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ref-flatten.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ref-flatten.fun 2006-06-24 14:46:43 UTC (rev 4662)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ref-flatten.fun 2006-06-24 14:53:54 UTC (rev 4663)
@@ -511,7 +511,7 @@
* r: (t ref) = (t)
* ... <no uses of r> ...
* x: (... * (t ref) * ...) = (..., r, ...)
- * ... <othere assignments to r> ...
+ * ... <other assignments to r> ...
*
*)
datatype z = datatype VarInfo.t
|
|
From: Matthew F. <fl...@ml...> - 2006-06-24 07:46:47
|
Fix bug in deepFlatten
----------------------------------------------------------------------
U mlton/trunk/doc/changelog
U mlton/trunk/mlton/atoms/prim.sig
U mlton/trunk/mlton/ssa/deep-flatten.fun
U mlton/trunk/mlton/ssa/ref-flatten.fun
----------------------------------------------------------------------
Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog 2006-06-23 23:03:37 UTC (rev 4661)
+++ mlton/trunk/doc/changelog 2006-06-24 14:46:43 UTC (rev 4662)
@@ -1,5 +1,9 @@
Here are the changes since version 20051202.
+* 2006-06-24
+ - Fixed a bug in pass to flatten data structures. Thanks to Joe Hurd
+ for the bug report.
+
* 2006-06-08
- Fixed a bug in the native codegen's implementation of the C-calling
convention.
Modified: mlton/trunk/mlton/atoms/prim.sig
===================================================================
--- mlton/trunk/mlton/atoms/prim.sig 2006-06-23 23:03:37 UTC (rev 4661)
+++ mlton/trunk/mlton/atoms/prim.sig 2006-06-24 14:46:43 UTC (rev 4662)
@@ -62,7 +62,7 @@
*)
| MLton_bug (* ssa to rssa *)
| MLton_deserialize (* unused *)
- | MLton_eq (* codegen *)
+ | MLton_eq (* ssa to rssa *)
| MLton_equal (* polymorphic equality *)
| MLton_halt (* ssa to rssa *)
(* MLton_handlesSignals and MLton_installSignalHandler work together
Modified: mlton/trunk/mlton/ssa/deep-flatten.fun
===================================================================
--- mlton/trunk/mlton/ssa/deep-flatten.fun 2006-06-23 23:03:37 UTC (rev 4661)
+++ mlton/trunk/mlton/ssa/deep-flatten.fun 2006-06-24 14:46:43 UTC (rev 4662)
@@ -668,6 +668,7 @@
; result ())
fun equal () =
(Value.unify (arg 0, arg 1)
+ ; Value.dontFlatten (arg 0)
; result ())
in
case Prim.name prim of
@@ -909,13 +910,7 @@
end
end
end)
- | PrimApp {args, prim} =>
- let
- val () = simpleTree ()
- in
- doit (PrimApp {args = replaceVars args,
- prim = prim})
- end
+ | PrimApp {args, prim} => simple ()
| Select {base, offset} =>
(case var of
NONE => none ()
Modified: mlton/trunk/mlton/ssa/ref-flatten.fun
===================================================================
--- mlton/trunk/mlton/ssa/ref-flatten.fun 2006-06-23 23:03:37 UTC (rev 4661)
+++ mlton/trunk/mlton/ssa/ref-flatten.fun 2006-06-24 14:46:43 UTC (rev 4662)
@@ -511,7 +511,7 @@
* r: (t ref) = (t)
* ... <no uses of r> ...
* x: (... * (t ref) * ...) = (..., r, ...)
- * ... <othere assignments to r> ...
+ * ... <other assignments to r> ...
*
*)
datatype z = datatype VarInfo.t
|
|
From: Stephen W. <sw...@ml...> - 2006-06-23 16:03:38
|
Removed old #include.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.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-06-23 22:16:00 UTC (rev 4660)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-06-23 23:03:37 UTC (rev 4661)
@@ -10,7 +10,6 @@
#include "mmap-protect.c"
#include "sysconf.c"
#include "setenv.putenv.c"
-#include "tempFileDes.mkstemp.c"
int fegetround () {
int mode;
|
|
From: Stephen W. <sw...@ml...> - 2006-06-23 15:16:02
|
Added OMIT_BYTECODE control so that one can easily build the runtime
without building the bytecode interpreter. This is useful when doing
development on a slow machine.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/bin/add-cross
U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/bin/add-cross
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/add-cross 2006-06-23 22:13:52 UTC (rev 4659)
+++ mlton/branches/on-20050822-x86_64-branch/bin/add-cross 2006-06-23 22:16:00 UTC (rev 4660)
@@ -82,7 +82,7 @@
echo 'Making runtime.'
( cd "$src" && tar cf - bin runtime ) |
ssh $machine "cd $tmp && tar xf - && cd runtime &&
- ../bin/mmake COMPILE_FAST=yes TARGET_ARCH=$crossArch TARGET_OS=$crossOS clean all"
+ ../bin/mmake OMIT_BYTECODE=yes TARGET_ARCH=$crossArch TARGET_OS=$crossOS clean all"
ssh $machine "cd $tmp/runtime && tar cf - *.a" |
( cd "$lib/$crossTarget" && tar xf - )
( cd "$src" &&
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-06-23 22:13:52 UTC (rev 4659)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-06-23 22:16:00 UTC (rev 4660)
@@ -169,9 +169,12 @@
$(UTILCFILES) \
$(shell find basis -type f | grep '\.c$$' | grep -v Real/) \
gc.c \
- bytecode/interpret.c \
platform.c
+ifneq ($(OMIT_BYTECODE), yes)
+CFILES += bytecode/interpret.c
+endif
+
HFILES = \
cenv.h \
$(UTILHFILES) \
|
|
From: Stephen W. <sw...@ml...> - 2006-06-23 15:13:53
|
Added ignores. ---------------------------------------------------------------------- _U mlton/branches/on-20050822-x86_64-branch/lib/cml/tests/ A mlton/branches/on-20050822-x86_64-branch/lib/cml/tests/.ignore ---------------------------------------------------------------------- Property changes on: mlton/branches/on-20050822-x86_64-branch/lib/cml/tests ___________________________________________________________________ Name: svn:ignore + exit ping-pong primes primes-multicast print timeout Added: mlton/branches/on-20050822-x86_64-branch/lib/cml/tests/.ignore =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/cml/tests/.ignore 2006-06-22 22:37:58 UTC (rev 4658) +++ mlton/branches/on-20050822-x86_64-branch/lib/cml/tests/.ignore 2006-06-23 22:13:52 UTC (rev 4659) @@ -0,0 +1,6 @@ +exit +ping-pong +primes +primes-multicast +print +timeout |
|
From: Stephen W. <sw...@ml...> - 2006-06-22 15:38:00
|
Converted ints to bools (zero or one) by comparison against zero in
places where posix functions aren't guaranteed to return bools.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c 2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/FileSys/ST.c 2006-06-22 22:37:58 UTC (rev 4658)
@@ -1,29 +1,29 @@
#include "platform.h"
-Bool_t Posix_FileSys_ST_isBlk (C_Mode_t m) {
- return S_ISBLK(m);
+Bool Posix_FileSys_ST_isBlk (C_Mode_t m) {
+ return 0 != S_ISBLK(m);
}
-Bool_t Posix_FileSys_ST_isChr (C_Mode_t m) {
- return S_ISCHR(m);
+Bool Posix_FileSys_ST_isChr (C_Mode_t m) {
+ return 0 != S_ISCHR(m);
}
-Bool_t Posix_FileSys_ST_isDir (C_Mode_t m) {
- return S_ISDIR(m);
+Bool Posix_FileSys_ST_isDir (C_Mode_t m) {
+ return 0 != S_ISDIR(m);
}
-Bool_t Posix_FileSys_ST_isFIFO (C_Mode_t m) {
- return S_ISFIFO(m);
+Bool Posix_FileSys_ST_isFIFO (C_Mode_t m) {
+ return 0 != S_ISFIFO(m);
}
-Bool_t Posix_FileSys_ST_isLink (C_Mode_t m) {
- return S_ISLNK(m);
+Bool Posix_FileSys_ST_isLink (C_Mode_t m) {
+ return 0 != S_ISLNK(m);
}
-Bool_t Posix_FileSys_ST_isReg (C_Mode_t m) {
- return S_ISREG(m);
+Bool Posix_FileSys_ST_isReg (C_Mode_t m) {
+ return 0 != S_ISREG(m);
}
-Bool_t Posix_FileSys_ST_isSock (C_Mode_t m) {
- return S_ISSOCK(m);
+Bool Posix_FileSys_ST_isSock (C_Mode_t m) {
+ return 0 != S_ISSOCK(m);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c 2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/ProcEnv/isatty.c 2006-06-22 22:37:58 UTC (rev 4658)
@@ -1,5 +1,5 @@
#include "platform.h"
-Bool_t Posix_ProcEnv_isatty (C_Fd_t f) {
- return isatty (f);
+Bool Posix_ProcEnv_isatty (C_Fd_t f) {
+ return 0 != isatty (f);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c 2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifExited.c 2006-06-22 22:37:58 UTC (rev 4658)
@@ -4,5 +4,5 @@
int i;
i = s;
- return WIFEXITED (i);
+ return 0 != WIFEXITED (i);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c 2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifSignaled.c 2006-06-22 22:37:58 UTC (rev 4658)
@@ -4,5 +4,5 @@
int i;
i = s;
- return WIFSIGNALED (i);
+ return 0 != WIFSIGNALED (i);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c 2006-06-18 23:49:04 UTC (rev 4657)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Process/ifStopped.c 2006-06-22 22:37:58 UTC (rev 4658)
@@ -4,5 +4,5 @@
int i;
i = s;
- return WIFSTOPPED (i);
+ return 0 != WIFSTOPPED (i);
}
|
|
From: Matthew F. <fl...@ml...> - 2006-06-18 16:49:06
|
Avoid using functions OpenBSD deems too dangerous for mere mortals.
----------------------------------------------------------------------
D mlton/branches/on-20050822-x86_64-branch/runtime/gc/util.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c
U 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/util/read_write.h
U mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c
----------------------------------------------------------------------
Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/gc/util.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/util.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/util.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -1,100 +0,0 @@
-/* Copyright (C) 2004-2005 Henry Cejtin, Matthew Fluet, Suresh
- * Jagannathan, and Stephen Weeks.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- */
-
-const char* boolToString (bool b) {
- return b ? "TRUE" : "FALSE";
-}
-
-#define BUF_SIZE 81
-char* intmaxToCommaString (intmax_t n) {
- static char buf1[BUF_SIZE];
- static char buf2[BUF_SIZE];
- static char buf3[BUF_SIZE];
- static char buf4[BUF_SIZE];
- static char buf5[BUF_SIZE];
- static char *bufs[] = {buf1, buf2, buf3, buf4, buf5};
- static int bufIndex = 0;
- static char *buf;
- int i;
-
- buf = bufs[bufIndex++];
- bufIndex %= 5;
-
- i = BUF_SIZE - 1;
- buf[i--] = '\000';
-
- if (0 == n)
- buf[i--] = '0';
- else if (INTMAX_MIN == n) {
- /* must treat INTMAX_MIN specially, because I negate stuff later */
- switch (sizeof(intmax_t)) {
- case 1:
- strcpy (buf + 1, "-128");
- break;
- case 2:
- strcpy (buf + 1, "-32,768");
- break;
- case 4:
- strcpy (buf + 1, "-2,147,483,648");
- break;
- case 8:
- strcpy (buf + 1, "-9,223,372,036,854,775,808");
- break;
- case 16:
- strcpy (buf + 1, "-170,141,183,460,469,231,731,687,303,715,884,105,728");
- break;
- default:
- die ("intmaxToCommaString: sizeof(intmax_t) = %zu", sizeof(intmax_t));
- break;
- }
- i = 0;
- } else {
- intmax_t m;
-
- if (n > 0)
- m = n;
- else
- m = -n;
-
- while (m > 0) {
- buf[i--] = m % 10 + '0';
- m = m / 10;
- if (i % 4 == 0 and m > 0) buf[i--] = ',';
- }
- if (n < 0) buf[i--] = '-';
- }
- return buf + i + 1;
-}
-
-char* uintmaxToCommaString (uintmax_t n) {
- static char buf1[BUF_SIZE];
- static char buf2[BUF_SIZE];
- static char buf3[BUF_SIZE];
- static char buf4[BUF_SIZE];
- static char buf5[BUF_SIZE];
- static char *bufs[] = {buf1, buf2, buf3, buf4, buf5};
- static int bufIndex = 0;
- static char *buf;
- int i;
-
- buf = bufs[bufIndex++];
- bufIndex %= 5;
-
- i = BUF_SIZE - 1;
- buf[i--] = '\000';
- if (0 == n)
- buf[i--] = '0';
- else {
- while (n > 0) {
- buf[i--] = n % 10 + '0';
- n = n / 10;
- if (i % 4 == 0 and n > 0) buf[i--] = ',';
- }
- }
- return buf + i + 1;
-}
-#undef BUF_SIZE
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -59,10 +59,10 @@
fprintf (stderr, "saveWorldToFILE\n");
/* Compact the heap. */
performGC (s, 0, 0, TRUE, TRUE);
- sprintf (buf,
- "Heap file created by MLton.\nheap.start = "FMTPTR"\nbytesLive = %zu\n",
- (uintptr_t)s->heap.start,
- s->lastMajorStatistics.bytesLive);
+ snprintf (buf, cardof(buf),
+ "Heap file created by MLton.\nheap.start = "FMTPTR"\nbytesLive = %zu\n",
+ (uintptr_t)s->heap.start,
+ s->lastMajorStatistics.bytesLive);
len = strlen(buf) + 1; /* +1 to get the '\000' */
if (fwrite (buf, 1, len, f) != len) return -1;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -26,7 +26,7 @@
void GC_displayMem (void) {
static char buffer[256];
- sprintf (buffer, "/usr/bin/vmmap -w -interleaved %d\n", (int)getpid ());
+ snprintf (buffer, cardof(buffer), "/usr/bin/vmmap -w -interleaved %d\n", (int)getpid ());
(void)system (buffer);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -4,6 +4,7 @@
char *template;
const char *tmpDir;
const char *tag = "/TempFileXXXXXXXXXX";
+ size_t tmpDirLen, tagLen;
mode_t m;
tmpDir = getenv ("TMP");
@@ -12,9 +13,11 @@
if (NULL == tmpDir)
tmpDir = "/var/tmp";
}
- template = malloc_safe (strlen(tmpDir) + strlen(tag) + 1);
- strcpy (template, tmpDir);
- strcat (template, tag);
+ tmpDirLen = strlen(tmpDir);
+ tagLen = strlen(tag);
+ template = malloc_safe (tmpDirLen + tagLen + 1);
+ strncpy (template, tmpDir, tmpDirLen + 1);
+ strncpy (template + tmpDirLen, tag, tagLen + 1);
m = umask(077);
fd = mkstemp_safe (template);
f = fdopen_safe (fd, "w+");
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/displayMem.linux.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -1,6 +1,6 @@
void GC_displayMem (void) {
static char buffer[256];
- sprintf (buffer, "/bin/cat /proc/%d/maps\n", (int)(getpid ()));
+ snprintf (buffer, cardof(buffer), "/bin/cat /proc/%d/maps\n", (int)(getpid ()));
system (buffer);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -11,7 +11,7 @@
void GC_displayMem () {
static char buffer[256];
- sprintf (buffer, "/bin/cat /proc/%d/map\n", (int)getpid ());
+ snprintf (buffer, cardof(buffer), "/bin/cat /proc/%d/map\n", (int)getpid ());
(void)system (buffer);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/setenv.putenv.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/setenv.putenv.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/setenv.putenv.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -2,12 +2,14 @@
* 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) {
+ size_t len;
char *b;
if (!overwrite && getenv (name))
return 0;
- b = malloc (strlen (name) + strlen (value) + 2 /* = and \000 */);
- sprintf (b, "%s=%s", name, value);
+ len = strlen (name) + strlen (value) + 2 /* = and \000 */;
+ b = malloc (len);
+ snprintf (b, len, "%s=%s", name, value);
return putenv (b);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -66,7 +66,7 @@
void GC_displayMem () {
static char buffer[256];
- sprintf (buffer, "pmap %d\n", (int)(getpid ()));
+ snprintf (buffer, cardof(buffer), "pmap %d\n", (int)(getpid ()));
system (buffer);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h 2006-06-18 23:49:04 UTC (rev 4657)
@@ -54,21 +54,21 @@
static inline void writeUint32U (FILE *f, uint32_t u) {
static char buf[BUF_SIZE];
- sprintf (buf, "%"PRIu32, u);
+ snprintf (buf, BUF_SIZE, "%"PRIu32, u);
writeString (f, buf);
}
static inline void writeUintmaxU (FILE *f, uintmax_t u) {
static char buf[BUF_SIZE];
- sprintf (buf, "%"PRIuMAX, u);
+ snprintf (buf, BUF_SIZE, "%"PRIuMAX, u);
writeString (f, buf);
}
static inline void writeUint32X (FILE *f, uint32_t u) {
static char buf[BUF_SIZE];
- sprintf (buf, "0x%08"PRIx32, u);
+ snprintf (buf, BUF_SIZE, "0x%08"PRIx32, u);
writeString (f, buf);
}
@@ -76,11 +76,11 @@
static char buf[BUF_SIZE];
if (sizeof(uintmax_t) == 4) {
- sprintf (buf, "0x%08"PRIxMAX, u);
+ snprintf (buf, BUF_SIZE, "0x%08"PRIxMAX, u);
} else if (sizeof(uintmax_t) == 8) {
- sprintf (buf, "0x%016"PRIxMAX, u);
+ snprintf (buf, BUF_SIZE, "0x%016"PRIxMAX, u);
} else {
- sprintf (buf, "0x%"PRIxMAX, u);
+ snprintf (buf, BUF_SIZE, "0x%"PRIxMAX, u);
}
writeString (f, buf);
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c 2006-06-17 19:28:18 UTC (rev 4656)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/to-string.c 2006-06-18 23:49:04 UTC (rev 4657)
@@ -32,27 +32,29 @@
if (0 == n)
buf[i--] = '0';
else if (INTMAX_MIN == n) {
+ const char* s;
/* must treat INTMAX_MIN specially, because I negate stuff later */
switch (sizeof(intmax_t)) {
case 1:
- strcpy (buf + 1, "-128");
+ s = "-128";
break;
case 2:
- strcpy (buf + 1, "-32,768");
+ s = "-32,768";
break;
case 4:
- strcpy (buf + 1, "-2,147,483,648");
+ s = "-2,147,483,648";
break;
case 8:
- strcpy (buf + 1, "-9,223,372,036,854,775,808");
+ s = "-9,223,372,036,854,775,808";
break;
case 16:
- strcpy (buf + 1, "-170,141,183,460,469,231,731,687,303,715,884,105,728");
+ s = "-170,141,183,460,469,231,731,687,303,715,884,105,728";
break;
default:
die ("intmaxToCommaString: sizeof(intmax_t) = %zu", sizeof(intmax_t));
break;
}
+ strncpy (buf + 1, s, strlen(s) + 1);
i = 0;
} else {
intmax_t m;
@@ -122,7 +124,7 @@
amount /= factor;
suffixIndex++;
}
- sprintf (buf, "%zu%s", amount, suffixs[suffixIndex]);
+ snprintf (buf, BUF_SIZE, "%zu%s", amount, suffixs[suffixIndex]);
return buf;
}
#undef BUF_SIZE
|
|
From: Stephen W. <sw...@ml...> - 2006-06-17 12:28:20
|
Renamed variable.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Signal.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Signal.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Signal.c 2006-06-17 13:39:44 UTC (rev 4655)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Posix/Signal.c 2006-06-17 19:28:18 UTC (rev 4656)
@@ -44,13 +44,13 @@
return sigaction (signum, &sa, NULL);
}
-C_Errno_t(C_Int_t) Posix_Signal_isIgnore (C_Int_t signum, Ref(Bool_t) isDef) {
+C_Errno_t(C_Int_t) Posix_Signal_isIgnore (C_Int_t signum, Ref(Bool_t) isIgn) {
int res;
struct sigaction sa;
sa.sa_flags = SA_FLAGS;
res = sigaction (signum, NULL, &sa);
- *((Bool_t*)isDef) = sa.sa_handler == SIG_IGN;
+ *((Bool_t*)isIgn) = sa.sa_handler == SIG_IGN;
return res;
}
|
|
From: Matthew F. <fl...@ml...> - 2006-06-17 06:39:45
|
Inconsistent val names
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-17 04:03:56 UTC (rev 4654)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-17 13:39:44 UTC (rev 4655)
@@ -26,7 +26,7 @@
SysCall.simple'
({errVal = false},
fn () => (Prim.save (NullString.nullTerm file)
- ; Prim.saveStatus (gcState)))
+ ; Prim.getSaveStatus (gcState)))
in
if Prim.getAmOriginal gcState
then Original
|
|
From: Matthew F. <fl...@ml...> - 2006-06-16 21:04:04
|
Fixed problem introduced at r4642:
The second change is how the SML code saves the world:
Now the filename is passed to C, and a failure does not abort the program.
Instead, we check return codes and propogate the error code back to an SML
exception, raised with the correct error status.
The problem is due to changing the primtive from
val save = _prim "World_save": C.Fd.t -> unit
to
val save = _prim "World_save": NullString8_t -> bool C_Error.t
It is not possible to have the type of save as
NullString8.t -> bool C_Errno.t, because there are two different ways
to return from the call to save. One way is the direct obvious way,
in the program instance that called save. However, another way to
return is in the program instance that loads the world. Making save
return a bool creates nasty bugs where the return code from the CCall
expects to see a bool result according to the C return convention, but
there isn't one when returning in the load world.
So, save's result status is accessible via:
val getSaveStatus =
_import "GC_getSaveWorldStatus" : GCState.t -> bool C_Errno.t
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml
U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/hash-type.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ssa-tree2.fun
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-17 04:03:56 UTC (rev 4654)
@@ -25,7 +25,8 @@
val () =
SysCall.simple'
({errVal = false},
- fn () => Prim.save (NullString.nullTerm file))
+ fn () => (Prim.save (NullString.nullTerm file)
+ ; Prim.saveStatus (gcState)))
in
if Prim.getAmOriginal gcState
then Original
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml 2006-06-17 04:03:56 UTC (rev 4654)
@@ -316,7 +316,20 @@
struct
val getAmOriginal = _import "GC_getAmOriginal": GCState.t -> bool;
val setAmOriginal = _import "GC_setAmOriginal": GCState.t * bool -> unit;
- val save = _prim "World_save": NullString8.t -> bool C_Errno.t;
+ val getSaveStatus = _import "GC_getSaveWorldStatus": GCState.t -> bool C_Errno.t;
+ (* save's result status is accesible via getSaveStatus ().
+ * It is not possible to have the type of save as
+ * NullString8.t -> bool C_Errno.t, because there are two
+ * different ways to return from the call to save. One way is
+ * the direct obvious way, in the program instance that called
+ * save. However, another way to return is in the program
+ * instance that loads the world. Making save return a bool
+ * creates nasty bugs where the return code from the CCall
+ * expects to see a bool result according to the C return
+ * convention, but there isn't one when returning in the load
+ * world.
+ *)
+ val save = _prim "World_save": NullString8.t -> unit;
end
end
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/atoms/hash-type.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/atoms/hash-type.fun 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/atoms/hash-type.fun 2006-06-17 04:03:56 UTC (rev 4654)
@@ -362,7 +362,7 @@
| Word_toReal (s, s', _) => done ([word s], real s')
| Word_toWord (s, s', _) => done ([word s], word s')
| Word_xorb s => wordBinary s
- | World_save => done ([string], bool)
+ | World_save => done ([string], unit)
| _ => Error.bug (concat ["HashType.checkPrimApp: strange prim: ",
Prim.toString prim])
end
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun 2006-06-17 04:03:56 UTC (rev 4654)
@@ -228,10 +228,10 @@
prototype = let
open CType
in
- (Vector.new2 (Pointer, Pointer), SOME bool)
+ (Vector.new2 (Pointer, Pointer), NONE)
end,
readsStackTop = true,
- return = Type.bool,
+ return = unit,
target = Direct "GC_saveWorld",
writesStackTop = true}
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ssa-tree2.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ssa-tree2.fun 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ssa-tree2.fun 2006-06-17 04:03:56 UTC (rev 4654)
@@ -476,7 +476,7 @@
| Word_toReal (s, s', _) => done ([word s], real s')
| Word_toWord (s, s', _) => done ([word s], word s')
| Word_xorb s => wordBinary s
- | World_save => done ([string], bool)
+ | World_save => done ([string], unit)
| _ => Error.bug (concat ["SsaTree2.Type.checkPrimApp got strange prim: ",
Prim.toString prim])
end
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h 2006-06-17 04:03:56 UTC (rev 4654)
@@ -49,6 +49,7 @@
* Thread interrupted by arrival of signal.
*/
int (*saveGlobals)(FILE *f); /* saves the globals to the file. */
+ bool saveWorldStatus; /* */
struct GC_heap secondaryHeap; /* Used for major copying collection. */
objptr signalHandlerThread; /* Handler for signals (in heap). */
struct GC_signalsInfo signalsInfo;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2006-06-17 04:03:56 UTC (rev 4654)
@@ -222,7 +222,7 @@
assert (isAligned (sizeof (struct GC_stack), s->alignment));
assert (isAligned (GC_NORMAL_HEADER_SIZE + sizeof (struct GC_thread),
s->alignment));
- // While the following asserts is manifestly true,
+ // While the following assert is manifestly true,
// it checks the asserts in sizeofWeak.
assert (sizeofWeak (s) == sizeofWeak (s));
@@ -286,6 +286,7 @@
s->sysvals.totalRam = GC_totalRam ();
s->sysvals.pageSize = GC_pageSize ();
s->weaks = NULL;
+ s->saveWorldStatus = true;
initSignalStack (s);
worldFile = NULL;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-17 04:03:56 UTC (rev 4654)
@@ -86,24 +86,30 @@
return 0;
}
-C_Errno_t(Bool_t) GC_saveWorld (GC_state s, NullString8_t fileName) {
+void GC_saveWorld (GC_state s, NullString8_t fileName) {
FILE *f;
enter (s);
f = fopen ((const char*)fileName, "wb");
if (f == 0) {
- leave (s);
- return (Bool_t)FALSE;
+ s->saveWorldStatus = false;
+ goto done;
}
if (saveWorldToFILE (s, f) != 0) {
- leave (s);
- return (Bool_t)FALSE;
+ s->saveWorldStatus = false;
+ goto done;
}
if (fclose (f) != 0) {
- leave (s);
- return (Bool_t)FALSE;
+ s->saveWorldStatus = false;
+ goto done;
}
+ s->saveWorldStatus = true;
+done:
leave (s);
- return (Bool_t)TRUE;
+ return;
}
+
+C_Errno_t(Bool_t) GC_getSaveWorldStatus (GC_state s) {
+ return (Bool_t)(s->saveWorldStatus);
+}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h 2006-06-14 12:16:33 UTC (rev 4653)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h 2006-06-17 04:03:56 UTC (rev 4654)
@@ -16,7 +16,8 @@
#if (defined (MLTON_GC_INTERNAL_BASIS))
+void GC_saveWorld (GC_state s, NullString8_t fileName);
/* TRUE = success, FALSE = failure */
-C_Errno_t(Bool_t) GC_saveWorld (GC_state s, NullString8_t fileName);
+C_Errno_t(Bool_t) GC_getSaveWorldStatus (GC_state s);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
|
|
From: Matthew F. <fl...@ml...> - 2006-06-14 05:18:36
|
Possible buffer overrun; I believe this accounts for a second-stage bootstrap error on OpenBSD, which compiles programs with stack guard
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-14 01:39:58 UTC (rev 4652)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-14 12:16:33 UTC (rev 4653)
@@ -52,11 +52,11 @@
* Instead, check return values, and propogate them up to SML for an exception.
*/
int saveWorldToFILE (GC_state s, FILE *f) {
- char buf[80];
+ char buf[128];
size_t len;
if (DEBUG_WORLD)
- fprintf (stderr, "saveWorld.\n");
+ fprintf (stderr, "saveWorldToFILE\n");
/* Compact the heap. */
performGC (s, 0, 0, TRUE, TRUE);
sprintf (buf,
|
|
From: Matthew F. <fl...@ml...> - 2006-06-13 18:40:07
|
typo ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile 2006-06-14 01:10:07 UTC (rev 4651) +++ mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile 2006-06-14 01:39:58 UTC (rev 4652) @@ -13,7 +13,7 @@ gzip -dc MLRISC.tgz | tar xf - chmod -R a+r MLRISC chmod -R g-s MLRISC - patch -c -p0 < MLRISC.patch + patch -s -p0 < MLRISC.patch .PHONY: clean clean: |
|
From: Matthew F. <fl...@ml...> - 2006-06-13 18:10:08
|
*BSD patch is pretty verbose; be silent to limit noise
----------------------------------------------------------------------
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/smlnj-lib/Makefile
U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
U mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile 2006-06-13 02:32:23 UTC (rev 4650)
+++ mlton/branches/on-20050822-x86_64-branch/lib/ckit-lib/Makefile 2006-06-14 01:10:07 UTC (rev 4651)
@@ -13,7 +13,7 @@
gzip -dc ckit.tgz | tar xf -
chmod -R a+r ckit
chmod -R g-s ckit
- patch -p0 < ckit.patch
+ patch -s -p0 < ckit.patch
.PHONY: clean
clean:
Modified: mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile 2006-06-13 02:32:23 UTC (rev 4650)
+++ mlton/branches/on-20050822-x86_64-branch/lib/mlrisc-lib/Makefile 2006-06-14 01:10:07 UTC (rev 4651)
@@ -13,7 +13,7 @@
gzip -dc MLRISC.tgz | tar xf -
chmod -R a+r MLRISC
chmod -R g-s MLRISC
- patch -p0 < MLRISC.patch
+ patch -c -p0 < MLRISC.patch
.PHONY: clean
clean:
Modified: mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile 2006-06-13 02:32:23 UTC (rev 4650)
+++ mlton/branches/on-20050822-x86_64-branch/lib/smlnj-lib/Makefile 2006-06-14 01:10:07 UTC (rev 4651)
@@ -13,7 +13,7 @@
gzip -dc smlnj-lib.tgz | tar xf -
chmod -R a+r smlnj-lib
chmod -R g-s smlnj-lib
- patch -p0 < smlnj-lib.patch
+ patch -s -p0 < smlnj-lib.patch
mv smlnj-lib/LICENSE ../../doc/license/SMLNJ-LIB-LICENSE
.PHONY: clean
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-06-13 02:32:23 UTC (rev 4650)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-06-14 01:10:07 UTC (rev 4651)
@@ -222,7 +222,7 @@
gdtoa/arithchk.c:
gzip -dc gdtoa.tgz | tar xf -
- patch -p0 <gdtoa-patch
+ patch -s -p0 <gdtoa-patch
gdtoa/arithchk.out: gdtoa/arithchk.c
cd gdtoa && $(CC) -o arithchk.out arithchk.c
@@ -341,7 +341,7 @@
.PHONY: gdtoa-patch
gdtoa-patch:
- cd gdtoa && $(MAKE) clean && rm -f *~
+ cd gdtoa && $(MAKE) clean && rm -f *~ *.orig
mv gdtoa gdtoa-new
gzip -dc gdtoa.tgz | tar xf -
diff -P -C 2 -r gdtoa gdtoa-new >gdtoa-patch || exit 0
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch 2006-06-13 02:32:23 UTC (rev 4650)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch 2006-06-14 01:10:07 UTC (rev 4651)
@@ -14,7 +14,6 @@
! int main()
{
Akind *a = 0;
-Binary files gdtoa/arithchk.out and gdtoa-new/arithchk.out differ
diff -P -C 2 -r gdtoa/dtoa.c gdtoa-new/dtoa.c
*** gdtoa/dtoa.c 2000-11-02 07:09:01.000000000 -0800
--- gdtoa-new/dtoa.c 2006-05-24 17:04:27.987435180 -0700
|
|
From: Matthew F. <fl...@ml...> - 2006-06-12 19:32:24
|
OpenBSD include path for gmp
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/mlton-script 2006-06-12 17:39:57 UTC (rev 4649)
+++ mlton/branches/on-20050822-x86_64-branch/bin/mlton-script 2006-06-13 02:32:23 UTC (rev 4650)
@@ -82,6 +82,7 @@
-target-cc-opts darwin '-I/sw/include' \
-target-cc-opts freebsd '-I/usr/local/include' \
-target-cc-opts netbsd '-I/usr/pkg/include' \
+ -target-cc-opts openbsd '-I/usr/local/include' \
-target-cc-opts solaris \
'-Wa,-xarch=v8plusa
-mcpu=ultrasparc' \
|
|
From: Stephen W. <sw...@ml...> - 2006-06-12 10:39:58
|
Added MinGW-specific regression output (filename case). ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/regression/exnHistory.x86-mingw.ok A mlton/branches/on-20050822-x86_64-branch/regression/exnHistory3.x86-mingw.ok ---------------------------------------------------------------------- Added: mlton/branches/on-20050822-x86_64-branch/regression/exnHistory.x86-mingw.ok =================================================================== --- mlton/branches/on-20050822-x86_64-branch/regression/exnHistory.x86-mingw.ok 2006-06-12 16:50:57 UTC (rev 4648) +++ mlton/branches/on-20050822-x86_64-branch/regression/exnHistory.x86-mingw.ok 2006-06-12 17:39:57 UTC (rev 4649) @@ -0,0 +1,12 @@ +f.raise exnhistory.sml 3.18 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 +f exnhistory.sml 1.5 Added: mlton/branches/on-20050822-x86_64-branch/regression/exnHistory3.x86-mingw.ok =================================================================== --- mlton/branches/on-20050822-x86_64-branch/regression/exnHistory3.x86-mingw.ok 2006-06-12 16:50:57 UTC (rev 4648) +++ mlton/branches/on-20050822-x86_64-branch/regression/exnHistory3.x86-mingw.ok 2006-06-12 17:39:57 UTC (rev 4649) @@ -0,0 +1,25 @@ +f.raise exnhistory3.sml 5.18 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +ZZZ +f.raise exnhistory3.sml 5.18 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 +f exnhistory3.sml 3.5 |
|
From: Matthew F. <fl...@ml...> - 2006-06-12 09:50:59
|
Have GC_saveWorld return a boolean indicating whether or not it
succeeded; this seems more natural than returning a boolean indicating
whether or not it failed.
Properly leave the runtime on error paths.
Naming of world.{h,c} functions.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-12 16:25:12 UTC (rev 4647)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-12 16:50:57 UTC (rev 4648)
@@ -24,7 +24,7 @@
let
val () =
SysCall.simple'
- ({errVal = true},
+ ({errVal = false},
fn () => Prim.save (NullString.nullTerm file))
in
if Prim.getAmOriginal gcState
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-12 16:25:12 UTC (rev 4647)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-12 16:50:57 UTC (rev 4648)
@@ -6,12 +6,12 @@
* See the file MLton-LICENSE for details.
*/
-void loadWorldFromFD (GC_state s, FILE *f) {
+void loadWorldFromFILE (GC_state s, FILE *f) {
uint32_t magic;
pointer start;
if (DEBUG_WORLD)
- fprintf (stderr, "loadWorldFromFD\n");
+ fprintf (stderr, "loadWorldFromFILE\n");
until (readChar (f) == '\000') ;
magic = readUint32 (f);
unless (s->magic == magic)
@@ -44,14 +44,14 @@
if (DEBUG_WORLD)
fprintf (stderr, "loadWorldFromFileName (%s)\n", fileName);
f = fopen_safe (fileName, "rb");
- loadWorldFromFD (s, f);
+ loadWorldFromFILE (s, f);
fclose_safe (f);
}
/* Don't use 'safe' functions, because we don't want the ML program to die.
* Instead, check return values, and propogate them up to SML for an exception.
*/
-int saveWorldToFD (GC_state s, FILE *f) {
+int saveWorldToFILE (GC_state s, FILE *f) {
char buf[80];
size_t len;
@@ -86,18 +86,24 @@
return 0;
}
-uint32_t GC_saveWorld (GC_state s, NullString8_t fileName) {
+C_Errno_t(Bool_t) GC_saveWorld (GC_state s, NullString8_t fileName) {
FILE *f;
enter (s);
- f = fopen((const char*)fileName, "wb");
- if (0 == f) {
+ f = fopen ((const char*)fileName, "wb");
+ if (f == 0) {
leave (s);
- return 1;
+ return (Bool_t)FALSE;
}
- if (saveWorldToFD (s, f) != 0) return 1;
- if (fclose (f) != 0) return 1;
+ if (saveWorldToFILE (s, f) != 0) {
+ leave (s);
+ return (Bool_t)FALSE;
+ }
+ if (fclose (f) != 0) {
+ leave (s);
+ return (Bool_t)FALSE;
+ }
+
leave (s);
-
- return 0;
+ return (Bool_t)TRUE;
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h 2006-06-12 16:25:12 UTC (rev 4647)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h 2006-06-12 16:50:57 UTC (rev 4648)
@@ -8,15 +8,15 @@
#if (defined (MLTON_GC_INTERNAL_FUNCS))
-static void loadWorldFromFD (GC_state s, FILE *f);
+static void loadWorldFromFILE (GC_state s, FILE *f);
static void loadWorldFromFileName (GC_state s, const char *fileName);
-static int saveWorldToFD (GC_state s, FILE *f);
+static int saveWorldToFILE (GC_state s, FILE *f);
#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */
#if (defined (MLTON_GC_INTERNAL_BASIS))
-/* 0 = success, 1 = failure (a bool) */
-uint32_t GC_saveWorld (GC_state s, NullString8_t fileName);
+/* TRUE = success, FALSE = failure */
+C_Errno_t(Bool_t) GC_saveWorld (GC_state s, NullString8_t fileName);
#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc.h 2006-06-12 16:25:12 UTC (rev 4647)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc.h 2006-06-12 16:50:57 UTC (rev 4648)
@@ -12,6 +12,7 @@
#include "cenv.h"
#include "util.h"
#include "ml-types.h"
+#include "c-types.h"
#include "gc/debug.h"
|
|
From: Matthew F. <fl...@ml...> - 2006-06-12 09:25:14
|
dos2unix ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml 2006-06-12 16:24:06 UTC (rev 4646) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml 2006-06-12 16:25:12 UTC (rev 4647) @@ -1,1411 +1,1411 @@ -(* This file is automatically generated. Do not edit. *) - -local open Primitive in -structure PrimitiveFFI = -struct -structure CommandLine = -struct -val (argcGet, argcSet) = _symbol "CommandLine_argc": (unit -> (C_Int.t)) * ((C_Int.t) -> unit); -val (argvGet, argvSet) = _symbol "CommandLine_argv": (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit); -val (commandNameGet, commandNameSet) = _symbol "CommandLine_commandName": (unit -> (C_String.t)) * ((C_String.t) -> unit); -end -structure Cygwin = -struct -val toFullWindowsPath = _import "Cygwin_toFullWindowsPath" : NullString8.t -> C_String.t; -end -structure Date = -struct -val gmTime = _import "Date_gmTime" : (C_Time.t) ref -> (C_Int.t) C_Errno.t; -val localOffset = _import "Date_localOffset" : unit -> C_Double.t; -val localTime = _import "Date_localTime" : (C_Time.t) ref -> (C_Int.t) C_Errno.t; -val mkTime = _import "Date_mkTime" : unit -> (C_Time.t) C_Errno.t; -val strfTime = _import "Date_strfTime" : (Char8.t) array * C_Size.t * NullString8.t -> C_Size.t; -structure Tm = -struct -val getHour = _import "Date_Tm_getHour" : unit -> C_Int.t; -val getIsDst = _import "Date_Tm_getIsDst" : unit -> C_Int.t; -val getMDay = _import "Date_Tm_getMDay" : unit -> C_Int.t; -val getMin = _import "Date_Tm_getMin" : unit -> C_Int.t; -val getMon = _import "Date_Tm_getMon" : unit -> C_Int.t; -val getSec = _import "Date_Tm_getSec" : unit -> C_Int.t; -val getWDay = _import "Date_Tm_getWDay" : unit -> C_Int.t; -val getYDay = _import "Date_Tm_getYDay" : unit -> C_Int.t; -val getYear = _import "Date_Tm_getYear" : unit -> C_Int.t; -val setHour = _import "Date_Tm_setHour" : C_Int.t -> unit; -val setIsDst = _import "Date_Tm_setIsDst" : C_Int.t -> unit; -val setMDay = _import "Date_Tm_setMDay" : C_Int.t -> unit; -val setMin = _import "Date_Tm_setMin" : C_Int.t -> unit; -val setMon = _import "Date_Tm_setMon" : C_Int.t -> unit; -val setSec = _import "Date_Tm_setSec" : C_Int.t -> unit; -val setWDay = _import "Date_Tm_setWDay" : C_Int.t -> unit; -val setYDay = _import "Date_Tm_setYDay" : C_Int.t -> unit; -val setYear = _import "Date_Tm_setYear" : C_Int.t -> unit; -end -end -structure IEEEReal = -struct -structure FloatClass = -struct -val FP_INFINITE = _const "IEEEReal_FloatClass_FP_INFINITE" : C_Int.t; -val FP_NAN = _const "IEEEReal_FloatClass_FP_NAN" : C_Int.t; -val FP_NORMAL = _const "IEEEReal_FloatClass_FP_NORMAL" : C_Int.t; -val FP_SUBNORMAL = _const "IEEEReal_FloatClass_FP_SUBNORMAL" : C_Int.t; -val FP_ZERO = _const "IEEEReal_FloatClass_FP_ZERO" : C_Int.t; -end -val getRoundingMode = _import "IEEEReal_getRoundingMode" : unit -> C_Int.t; -structure RoundingMode = -struct -val FE_DOWNWARD = _const "IEEEReal_RoundingMode_FE_DOWNWARD" : C_Int.t; -val FE_NOSUPPORT = _const "IEEEReal_RoundingMode_FE_NOSUPPORT" : C_Int.t; -val FE_TONEAREST = _const "IEEEReal_RoundingMode_FE_TONEAREST" : C_Int.t; -val FE_TOWARDZERO = _const "IEEEReal_RoundingMode_FE_TOWARDZERO" : C_Int.t; -val FE_UPWARD = _const "IEEEReal_RoundingMode_FE_UPWARD" : C_Int.t; -end -val setRoundingMode = _import "IEEEReal_setRoundingMode" : C_Int.t -> unit; -end -structure MLton = -struct -val bug = _import "MLton_bug" : NullString8.t -> unit; -structure Itimer = -struct -val PROF = _const "MLton_Itimer_PROF" : C_Int.t; -val REAL = _const "MLton_Itimer_REAL" : C_Int.t; -val set = _import "MLton_Itimer_set" : C_Int.t * C_Time.t * C_SUSeconds.t * C_Time.t * C_SUSeconds.t -> (C_Int.t) C_Errno.t; -val VIRTUAL = _const "MLton_Itimer_VIRTUAL" : C_Int.t; -end -structure Process = -struct -val cwait = _import "MLton_Process_cwait" : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t; -val spawne = _import "MLton_Process_spawne" : NullString8.t * NullString8Array.t * NullString8Array.t -> (C_Int.t) C_Errno.t; -val spawnp = _import "MLton_Process_spawnp" : NullString8.t * NullString8Array.t -> (C_Int.t) C_Errno.t; -end -structure Rlimit = -struct -val AS = _const "MLton_Rlimit_AS" : C_Int.t; -val CORE = _const "MLton_Rlimit_CORE" : C_Int.t; -val CPU = _const "MLton_Rlimit_CPU" : C_Int.t; -val DATA = _const "MLton_Rlimit_DATA" : C_Int.t; -val FSIZE = _const "MLton_Rlimit_FSIZE" : C_Int.t; -val get = _import "MLton_Rlimit_get" : C_Int.t -> (C_Int.t) C_Errno.t; -val getHard = _import "MLton_Rlimit_getHard" : unit -> C_RLim.t; -val getSoft = _import "MLton_Rlimit_getSoft" : unit -> C_RLim.t; -val INFINITY = _const "MLton_Rlimit_INFINITY" : C_RLim.t; -val NOFILE = _const "MLton_Rlimit_NOFILE" : C_Int.t; -val set = _import "MLton_Rlimit_set" : C_Int.t * C_RLim.t * C_RLim.t -> (C_Int.t) C_Errno.t; -val STACK = _const "MLton_Rlimit_STACK" : C_Int.t; -end -structure Rusage = -struct -val children_stime_sec = _import "MLton_Rusage_children_stime_sec" : unit -> C_Time.t; -val children_stime_usec = _import "MLton_Rusage_children_stime_usec" : unit -> C_SUSeconds.t; -val children_utime_sec = _import "MLton_Rusage_children_utime_sec" : unit -> C_Time.t; -val children_utime_usec = _import "MLton_Rusage_children_utime_usec" : unit -> C_SUSeconds.t; -val gc_stime_sec = _import "MLton_Rusage_gc_stime_sec" : unit -> C_Time.t; -val gc_stime_usec = _import "MLton_Rusage_gc_stime_usec" : unit -> C_SUSeconds.t; -val gc_utime_sec = _import "MLton_Rusage_gc_utime_sec" : unit -> C_Time.t; -val gc_utime_usec = _import "MLton_Rusage_gc_utime_usec" : unit -> C_SUSeconds.t; -val getrusage = _import "MLton_Rusage_getrusage" : unit -> unit; -val self_stime_sec = _import "MLton_Rusage_self_stime_sec" : unit -> C_Time.t; -val self_stime_usec = _import "MLton_Rusage_self_stime_usec" : unit -> C_SUSeconds.t; -val self_utime_sec = _import "MLton_Rusage_self_utime_sec" : unit -> C_Time.t; -val self_utime_usec = _import "MLton_Rusage_self_utime_usec" : unit -> C_SUSeconds.t; -end -structure Syslog = -struct -val closelog = _import "MLton_Syslog_closelog" : unit -> unit; -structure Facility = -struct -val LOG_AUTH = _const "MLton_Syslog_Facility_LOG_AUTH" : C_Int.t; -val LOG_CRON = _const "MLton_Syslog_Facility_LOG_CRON" : C_Int.t; -val LOG_DAEMON = _const "MLton_Syslog_Facility_LOG_DAEMON" : C_Int.t; -val LOG_KERN = _const "MLton_Syslog_Facility_LOG_KERN" : C_Int.t; -val LOG_LOCAL0 = _const "MLton_Syslog_Facility_LOG_LOCAL0" : C_Int.t; -val LOG_LOCAL1 = _const "MLton_Syslog_Facility_LOG_LOCAL1" : C_Int.t; -val LOG_LOCAL2 = _const "MLton_Syslog_Facility_LOG_LOCAL2" : C_Int.t; -val LOG_LOCAL3 = _const "MLton_Syslog_Facility_LOG_LOCAL3" : C_Int.t; -val LOG_LOCAL4 = _const "MLton_Syslog_Facility_LOG_LOCAL4" : C_Int.t; -val LOG_LOCAL5 = _const "MLton_Syslog_Facility_LOG_LOCAL5" : C_Int.t; -val LOG_LOCAL6 = _const "MLton_Syslog_Facility_LOG_LOCAL6" : C_Int.t; -val LOG_LOCAL7 = _const "MLton_Syslog_Facility_LOG_LOCAL7" : C_Int.t; -val LOG_LPR = _const "MLton_Syslog_Facility_LOG_LPR" : C_Int.t; -val LOG_MAIL = _const "MLton_Syslog_Facility_LOG_MAIL" : C_Int.t; -val LOG_NEWS = _const "MLton_Syslog_Facility_LOG_NEWS" : C_Int.t; -val LOG_USER = _const "MLton_Syslog_Facility_LOG_USER" : C_Int.t; -val LOG_UUCP = _const "MLton_Syslog_Facility_LOG_UUCP" : C_Int.t; -end -structure Logopt = -struct -val LOG_CONS = _const "MLton_Syslog_Logopt_LOG_CONS" : C_Int.t; -val LOG_NDELAY = _const "MLton_Syslog_Logopt_LOG_NDELAY" : C_Int.t; -val LOG_NOWAIT = _const "MLton_Syslog_Logopt_LOG_NOWAIT" : C_Int.t; -val LOG_ODELAY = _const "MLton_Syslog_Logopt_LOG_ODELAY" : C_Int.t; -val LOG_PID = _const "MLton_Syslog_Logopt_LOG_PID" : C_Int.t; -end -val openlog = _import "MLton_Syslog_openlog" : NullString8.t * C_Int.t * C_Int.t -> unit; -structure Severity = -struct -val LOG_ALERT = _const "MLton_Syslog_Severity_LOG_ALERT" : C_Int.t; -val LOG_CRIT = _const "MLton_Syslog_Severity_LOG_CRIT" : C_Int.t; -val LOG_DEBUG = _const "MLton_Syslog_Severity_LOG_DEBUG" : C_Int.t; -val LOG_EMERG = _const "MLton_Syslog_Severity_LOG_EMERG" : C_Int.t; -val LOG_ERR = _const "MLton_Syslog_Severity_LOG_ERR" : C_Int.t; -val LOG_INFO = _const "MLton_Syslog_Severity_LOG_INFO" : C_Int.t; -val LOG_NOTICE = _const "MLton_Syslog_Severity_LOG_NOTICE" : C_Int.t; -val LOG_WARNING = _const "MLton_Syslog_Severity_LOG_WARNING" : C_Int.t; -end -val syslog = _import "MLton_Syslog_syslog" : C_Int.t * NullString8.t -> unit; -end -end -structure Net = -struct -val htonl = _import "Net_htonl" : Word32.t -> Word32.t; -val htons = _import "Net_htons" : Word16.t -> Word16.t; -val ntohl = _import "Net_ntohl" : Word32.t -> Word32.t; -val ntohs = _import "Net_ntohs" : Word16.t -> Word16.t; -end -structure NetHostDB = -struct -val getByAddress = _import "NetHostDB_getByAddress" : (Word8.t) vector * C_Socklen.t -> Bool.t; -val getByName = _import "NetHostDB_getByName" : NullString8.t -> Bool.t; -val getEntryAddrsN = _import "NetHostDB_getEntryAddrsN" : C_Int.t * (Word8.t) array -> unit; -val getEntryAddrsNum = _import "NetHostDB_getEntryAddrsNum" : unit -> C_Int.t; -val getEntryAddrType = _import "NetHostDB_getEntryAddrType" : unit -> C_Int.t; -val getEntryAliasesN = _import "NetHostDB_getEntryAliasesN" : C_Int.t -> C_String.t; -val getEntryAliasesNum = _import "NetHostDB_getEntryAliasesNum" : unit -> C_Int.t; -val getEntryLength = _import "NetHostDB_getEntryLength" : unit -> C_Int.t; -val getEntryName = _import "NetHostDB_getEntryName" : unit -> C_String.t; -val getHostName = _import "NetHostDB_getHostName" : (Char8.t) array * C_Size.t -> (C_Int.t) C_Errno.t; -val INADDR_ANY = _const "NetHostDB_INADDR_ANY" : C_Int.t; -val inAddrSize = _const "NetHostDB_inAddrSize" : C_Size.t; -end -structure NetProtDB = -struct -val getByName = _import "NetProtDB_getByName" : NullString8.t -> Bool.t; -val getByNumber = _import "NetProtDB_getByNumber" : C_Int.t -> Bool.t; -val getEntryAliasesN = _import "NetProtDB_getEntryAliasesN" : C_Int.t -> C_String.t; -val getEntryAliasesNum = _import "NetProtDB_getEntryAliasesNum" : unit -> C_Int.t; -val getEntryName = _import "NetProtDB_getEntryName" : unit -> C_String.t; -val getEntryProto = _import "NetProtDB_getEntryProto" : unit -> C_Int.t; -end -structure NetServDB = -struct -val getByName = _import "NetServDB_getByName" : NullString8.t * NullString8.t -> Bool.t; -val getByNameNull = _import "NetServDB_getByNameNull" : NullString8.t -> Bool.t; -val getByPort = _import "NetServDB_getByPort" : C_Int.t * NullString8.t -> Bool.t; -val getByPortNull = _import "NetServDB_getByPortNull" : C_Int.t -> Bool.t; -val getEntryAliasesN = _import "NetServDB_getEntryAliasesN" : C_Int.t -> C_String.t; -val getEntryAliasesNum = _import "NetServDB_getEntryAliasesNum" : unit -> C_Int.t; -val getEntryName = _import "NetServDB_getEntryName" : unit -> C_String.t; -val getEntryPort = _import "NetServDB_getEntryPort" : unit -> C_Int.t; -val getEntryProto = _import "NetServDB_getEntryProto" : unit -> C_String.t; -end -structure OS = -struct -structure IO = -struct -val poll = _import "OS_IO_poll" : (C_Fd.t) vector * (C_Short.t) vector * C_NFds.t * C_Int.t * (C_Short.t) array -> (C_Int.t) C_Errno.t; -val POLLIN = _const "OS_IO_POLLIN" : C_Short.t; -val POLLOUT = _const "OS_IO_POLLOUT" : C_Short.t; -val POLLPRI = _const "OS_IO_POLLPRI" : C_Short.t; -end -end -structure PackReal32 = -struct -val subArr = _import "PackReal32_subArr" : (Word8.t) array * C_Ptrdiff.t -> Real32.t; -val subArrRev = _import "PackReal32_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Real32.t; -val subVec = _import "PackReal32_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Real32.t; -val subVecRev = _import "PackReal32_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Real32.t; -val update = _import "PackReal32_update" : (Word8.t) array * C_Ptrdiff.t * Real32.t -> unit; -val updateRev = _import "PackReal32_updateRev" : (Word8.t) array * C_Ptrdiff.t * Real32.t -> unit; -end -structure PackReal64 = -struct -val subArr = _import "PackReal64_subArr" : (Word8.t) array * C_Ptrdiff.t -> Real64.t; -val subArrRev = _import "PackReal64_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Real64.t; -val subVec = _import "PackReal64_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Real64.t; -val subVecRev = _import "PackReal64_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Real64.t; -val update = _import "PackReal64_update" : (Word8.t) array * C_Ptrdiff.t * Real64.t -> unit; -val updateRev = _import "PackReal64_updateRev" : (Word8.t) array * C_Ptrdiff.t * Real64.t -> unit; -end -structure PackWord16 = -struct -val subArr = _import "PackWord16_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word16.t; -val subArrRev = _import "PackWord16_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word16.t; -val subVec = _import "PackWord16_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word16.t; -val subVecRev = _import "PackWord16_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word16.t; -val update = _import "PackWord16_update" : (Word8.t) array * C_Ptrdiff.t * Word16.t -> unit; -val updateRev = _import "PackWord16_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word16.t -> unit; -end -structure PackWord32 = -struct -val subArr = _import "PackWord32_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word32.t; -val subArrRev = _import "PackWord32_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word32.t; -val subVec = _import "PackWord32_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word32.t; -val subVecRev = _import "PackWord32_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word32.t; -val update = _import "PackWord32_update" : (Word8.t) array * C_Ptrdiff.t * Word32.t -> unit; -val updateRev = _import "PackWord32_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word32.t -> unit; -end -structure PackWord64 = -struct -val subArr = _import "PackWord64_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word64.t; -val subArrRev = _import "PackWord64_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word64.t; -val subVec = _import "PackWord64_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word64.t; -val subVecRev = _import "PackWord64_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word64.t; -val update = _import "PackWord64_update" : (Word8.t) array * C_Ptrdiff.t * Word64.t -> unit; -val updateRev = _import "PackWord64_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word64.t -> unit; -end -structure PackWord8 = -struct -val subArr = _import "PackWord8_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word8.t; -val subArrRev = _import "PackWord8_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word8.t; -val subVec = _import "PackWord8_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word8.t; -val subVecRev = _import "PackWord8_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word8.t; -val update = _import "PackWord8_update" : (Word8.t) array * C_Ptrdiff.t * Word8.t -> unit; -val updateRev = _import "PackWord8_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word8.t -> unit; -end -structure Posix = -struct -structure Error = -struct -val clearErrno = _import "Posix_Error_clearErrno" : unit -> unit; -val E2BIG = _const "Posix_Error_E2BIG" : C_Int.t; -val EACCES = _const "Posix_Error_EACCES" : C_Int.t; -val EADDRINUSE = _const "Posix_Error_EADDRINUSE" : C_Int.t; -val EADDRNOTAVAIL = _const "Posix_Error_EADDRNOTAVAIL" : C_Int.t; -val EAFNOSUPPORT = _const "Posix_Error_EAFNOSUPPORT" : C_Int.t; -val EAGAIN = _const "Posix_Error_EAGAIN" : C_Int.t; -val EALREADY = _const "Posix_Error_EALREADY" : C_Int.t; -val EBADF = _const "Posix_Error_EBADF" : C_Int.t; -val EBADMSG = _const "Posix_Error_EBADMSG" : C_Int.t; -val EBUSY = _const "Posix_Error_EBUSY" : C_Int.t; -val ECANCELED = _const "Posix_Error_ECANCELED" : C_Int.t; -val ECHILD = _const "Posix_Error_ECHILD" : C_Int.t; -val ECONNABORTED = _const "Posix_Error_ECONNABORTED" : C_Int.t; -val ECONNREFUSED = _const "Posix_Error_ECONNREFUSED" : C_Int.t; -val ECONNRESET = _const "Posix_Error_ECONNRESET" : C_Int.t; -val EDEADLK = _const "Posix_Error_EDEADLK" : C_Int.t; -val EDESTADDRREQ = _const "Posix_Error_EDESTADDRREQ" : C_Int.t; -val EDOM = _const "Posix_Error_EDOM" : C_Int.t; -val EDQUOT = _const "Posix_Error_EDQUOT" : C_Int.t; -val EEXIST = _const "Posix_Error_EEXIST" : C_Int.t; -val EFAULT = _const "Posix_Error_EFAULT" : C_Int.t; -val EFBIG = _const "Posix_Error_EFBIG" : C_Int.t; -val EHOSTUNREACH = _const "Posix_Error_EHOSTUNREACH" : C_Int.t; -val EIDRM = _const "Posix_Error_EIDRM" : C_Int.t; -val EILSEQ = _const "Posix_Error_EILSEQ" : C_Int.t; -val EINPROGRESS = _const "Posix_Error_EINPROGRESS" : C_Int.t; -val EINTR = _const "Posix_Error_EINTR" : C_Int.t; -val EINVAL = _const "Posix_Error_EINVAL" : C_Int.t; -val EIO = _const "Posix_Error_EIO" : C_Int.t; -val EISCONN = _const "Posix_Error_EISCONN" : C_Int.t; -val EISDIR = _const "Posix_Error_EISDIR" : C_Int.t; -val ELOOP = _const "Posix_Error_ELOOP" : C_Int.t; -val EMFILE = _const "Posix_Error_EMFILE" : C_Int.t; -val EMLINK = _const "Posix_Error_EMLINK" : C_Int.t; -val EMSGSIZE = _const "Posix_Error_EMSGSIZE" : C_Int.t; -val EMULTIHOP = _const "Posix_Error_EMULTIHOP" : C_Int.t; -val ENAMETOOLONG = _const "Posix_Error_ENAMETOOLONG" : C_Int.t; -val ENETDOWN = _const "Posix_Error_ENETDOWN" : C_Int.t; -val ENETRESET = _const "Posix_Error_ENETRESET" : C_Int.t; -val ENETUNREACH = _const "Posix_Error_ENETUNREACH" : C_Int.t; -val ENFILE = _const "Posix_Error_ENFILE" : C_Int.t; -val ENOBUFS = _const "Posix_Error_ENOBUFS" : C_Int.t; -val ENODATA = _const "Posix_Error_ENODATA" : C_Int.t; -val ENODEV = _const "Posix_Error_ENODEV" : C_Int.t; -val ENOENT = _const "Posix_Error_ENOENT" : C_Int.t; -val ENOEXEC = _const "Posix_Error_ENOEXEC" : C_Int.t; -val ENOLCK = _const "Posix_Error_ENOLCK" : C_Int.t; -val ENOLINK = _const "Posix_Error_ENOLINK" : C_Int.t; -val ENOMEM = _const "Posix_Error_ENOMEM" : C_Int.t; -val ENOMSG = _const "Posix_Error_ENOMSG" : C_Int.t; -val ENOPROTOOPT = _const "Posix_Error_ENOPROTOOPT" : C_Int.t; -val ENOSPC = _const "Posix_Error_ENOSPC" : C_Int.t; -val ENOSR = _const "Posix_Error_ENOSR" : C_Int.t; -val ENOSTR = _const "Posix_Error_ENOSTR" : C_Int.t; -val ENOSYS = _const "Posix_Error_ENOSYS" : C_Int.t; -val ENOTCONN = _const "Posix_Error_ENOTCONN" : C_Int.t; -val ENOTDIR = _const "Posix_Error_ENOTDIR" : C_Int.t; -val ENOTEMPTY = _const "Posix_Error_ENOTEMPTY" : C_Int.t; -val ENOTSOCK = _const "Posix_Error_ENOTSOCK" : C_Int.t; -val ENOTSUP = _const "Posix_Error_ENOTSUP" : C_Int.t; -val ENOTTY = _const "Posix_Error_ENOTTY" : C_Int.t; -val ENXIO = _const "Posix_Error_ENXIO" : C_Int.t; -val EOPNOTSUPP = _const "Posix_Error_EOPNOTSUPP" : C_Int.t; -val EOVERFLOW = _const "Posix_Error_EOVERFLOW" : C_Int.t; -val EPERM = _const "Posix_Error_EPERM" : C_Int.t; -val EPIPE = _const "Posix_Error_EPIPE" : C_Int.t; -val EPROTO = _const "Posix_Error_EPROTO" : C_Int.t; -val EPROTONOSUPPORT = _const "Posix_Error_EPROTONOSUPPORT" : C_Int.t; -val EPROTOTYPE = _const "Posix_Error_EPROTOTYPE" : C_Int.t; -val ERANGE = _const "Posix_Error_ERANGE" : C_Int.t; -val EROFS = _const "Posix_Error_EROFS" : C_Int.t; -val ESPIPE = _const "Posix_Error_ESPIPE" : C_Int.t; -val ESRCH = _const "Posix_Error_ESRCH" : C_Int.t; -val ESTALE = _const "Posix_Error_ESTALE" : C_Int.t; -val ETIME = _const "Posix_Error_ETIME" : C_Int.t; -val ETIMEDOUT = _const "Posix_Error_ETIMEDOUT" : C_Int.t; -val ETXTBSY = _const "Posix_Error_ETXTBSY" : C_Int.t; -val EWOULDBLOCK = _const "Posix_Error_EWOULDBLOCK" : C_Int.t; -val EXDEV = _const "Posix_Error_EXDEV" : C_Int.t; -val getErrno = _import "Posix_Error_getErrno" : unit -> C_Int.t; -val strError = _import "Posix_Error_strError" : C_Int.t -> C_String.t; -end -structure FileSys = -struct -structure A = -struct -val F_OK = _const "Posix_FileSys_A_F_OK" : C_Int.t; -val R_OK = _const "Posix_FileSys_A_R_OK" : C_Int.t; -val W_OK = _const "Posix_FileSys_A_W_OK" : C_Int.t; -val X_OK = _const "Posix_FileSys_A_X_OK" : C_Int.t; -end -val access = _import "Posix_FileSys_access" : NullString8.t * C_Int.t -> (C_Int.t) C_Errno.t; -val chdir = _import "Posix_FileSys_chdir" : NullString8.t -> (C_Int.t) C_Errno.t; -val chmod = _import "Posix_FileSys_chmod" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t; -val chown = _import "Posix_FileSys_chown" : NullString8.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t; -structure Dirstream = -struct -val closeDir = _import "Posix_FileSys_Dirstream_closeDir" : C_DirP.t -> (C_Int.t) C_Errno.t; -val openDir = _import "Posix_FileSys_Dirstream_openDir" : NullString8.t -> (C_DirP.t) C_Errno.t; -val readDir = _import "Posix_FileSys_Dirstream_readDir" : C_DirP.t -> (C_String.t) C_Errno.t; -val rewindDir = _import "Posix_FileSys_Dirstream_rewindDir" : C_DirP.t -> unit; -end -val fchdir = _import "Posix_FileSys_fchdir" : C_Fd.t -> (C_Int.t) C_Errno.t; -val fchmod = _import "Posix_FileSys_fchmod" : C_Fd.t * C_Mode.t -> (C_Int.t) C_Errno.t; -val fchown = _import "Posix_FileSys_fchown" : C_Fd.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t; -val fpathconf = _import "Posix_FileSys_fpathconf" : C_Fd.t * C_Int.t -> (C_Long.t) C_Errno.t; -val ftruncate = _import "Posix_FileSys_ftruncate" : C_Fd.t * C_Off.t -> (C_Int.t) C_Errno.t; -val getcwd = _import "Posix_FileSys_getcwd" : (Char8.t) array * C_Size.t -> (C_String.t) C_Errno.t; -val link = _import "Posix_FileSys_link" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t; -val mkdir = _import "Posix_FileSys_mkdir" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t; -val mkfifo = _import "Posix_FileSys_mkfifo" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t; -structure O = -struct -val APPEND = _const "Posix_FileSys_O_APPEND" : C_Int.t; -val BINARY = _const "Posix_FileSys_O_BINARY" : C_Int.t; -val CREAT = _const "Posix_FileSys_O_CREAT" : C_Int.t; -val DSYNC = _const "Posix_FileSys_O_DSYNC" : C_Int.t; -val EXCL = _const "Posix_FileSys_O_EXCL" : C_Int.t; -val NOCTTY = _const "Posix_FileSys_O_NOCTTY" : C_Int.t; -val NONBLOCK = _const "Posix_FileSys_O_NONBLOCK" : C_Int.t; -val RDONLY = _const "Posix_FileSys_O_RDONLY" : C_Int.t; -val RDWR = _const "Posix_FileSys_O_RDWR" : C_Int.t; -val RSYNC = _const "Posix_FileSys_O_RSYNC" : C_Int.t; -val SYNC = _const "Posix_FileSys_O_SYNC" : C_Int.t; -val TEXT = _const "Posix_FileSys_O_TEXT" : C_Int.t; -val TRUNC = _const "Posix_FileSys_O_TRUNC" : C_Int.t; -val WRONLY = _const "Posix_FileSys_O_WRONLY" : C_Int.t; -end -val open2 = _import "Posix_FileSys_open2" : NullString8.t * C_Int.t -> (C_Fd.t) C_Errno.t; -val open3 = _import "Posix_FileSys_open3" : NullString8.t * C_Int.t * C_Mode.t -> (C_Fd.t) C_Errno.t; -val pathconf = _import "Posix_FileSys_pathconf" : NullString8.t * C_Int.t -> (C_Long.t) C_Errno.t; -structure PC = -struct -val ALLOC_SIZE_MIN = _const "Posix_FileSys_PC_ALLOC_SIZE_MIN" : C_Int.t; -val ASYNC_IO = _const "Posix_FileSys_PC_ASYNC_IO" : C_Int.t; -val CHOWN_RESTRICTED = _const "Posix_FileSys_PC_CHOWN_RESTRICTED" : C_Int.t; -val FILESIZEBITS = _const "Posix_FileSys_PC_FILESIZEBITS" : C_Int.t; -val LINK_MAX = _const "Posix_FileSys_PC_LINK_MAX" : C_Int.t; -val MAX_CANON = _const "Posix_FileSys_PC_MAX_CANON" : C_Int.t; -val MAX_INPUT = _const "Posix_FileSys_PC_MAX_INPUT" : C_Int.t; -val NAME_MAX = _const "Posix_FileSys_PC_NAME_MAX" : C_Int.t; -val NO_TRUNC = _const "Posix_FileSys_PC_NO_TRUNC" : C_Int.t; -val PATH_MAX = _const "Posix_FileSys_PC_PATH_MAX" : C_Int.t; -val PIPE_BUF = _const "Posix_FileSys_PC_PIPE_BUF" : C_Int.t; -val PRIO_IO = _const "Posix_FileSys_PC_PRIO_IO" : C_Int.t; -val REC_INCR_XFER_SIZE = _const "Posix_FileSys_PC_REC_INCR_XFER_SIZE" : C_Int.t; -val REC_MAX_XFER_SIZE = _const "Posix_FileSys_PC_REC_MAX_XFER_SIZE" : C_Int.t; -val REC_MIN_XFER_SIZE = _const "Posix_FileSys_PC_REC_MIN_XFER_SIZE" : C_Int.t; -val REC_XFER_ALIGN = _const "Posix_FileSys_PC_REC_XFER_ALIGN" : C_Int.t; -val SYMLINK_MAX = _const "Posix_FileSys_PC_SYMLINK_MAX" : C_Int.t; -val SYNC_IO = _const "Posix_FileSys_PC_SYNC_IO" : C_Int.t; -val TWO_SYMLINKS = _const "Posix_FileSys_PC_TWO_SYMLINKS" : C_Int.t; -val VDISABLE = _const "Posix_FileSys_PC_VDISABLE" : C_Int.t; -end -val readlink = _import "Posix_FileSys_readlink" : NullString8.t * (Char8.t) array * C_Size.t -> (C_SSize.t) C_Errno.t; -val rename = _import "Posix_FileSys_rename" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t; -val rmdir = _import "Posix_FileSys_rmdir" : NullString8.t -> (C_Int.t) C_Errno.t; -structure S = -struct -val IFBLK = _const "Posix_FileSys_S_IFBLK" : C_Mode.t; -val IFCHR = _const "Posix_FileSys_S_IFCHR" : C_Mode.t; -val IFDIR = _const "Posix_FileSys_S_IFDIR" : C_Mode.t; -val IFIFO = _const "Posix_FileSys_S_IFIFO" : C_Mode.t; -val IFLNK = _const "Posix_FileSys_S_IFLNK" : C_Mode.t; -val IFMT = _const "Posix_FileSys_S_IFMT" : C_Mode.t; -val IFREG = _const "Posix_FileSys_S_IFREG" : C_Mode.t; -val IFSOCK = _const "Posix_FileSys_S_IFSOCK" : C_Mode.t; -val IRGRP = _const "Posix_FileSys_S_IRGRP" : C_Mode.t; -val IROTH = _const "Posix_FileSys_S_IROTH" : C_Mode.t; -val IRUSR = _const "Posix_FileSys_S_IRUSR" : C_Mode.t; -val IRWXG = _const "Posix_FileSys_S_IRWXG" : C_Mode.t; -val IRWXO = _const "Posix_FileSys_S_IRWXO" : C_Mode.t; -val IRWXU = _const "Posix_FileSys_S_IRWXU" : C_Mode.t; -val ISGID = _const "Posix_FileSys_S_ISGID" : C_Mode.t; -val ISUID = _const "Posix_FileSys_S_ISUID" : C_Mode.t; -val ISVTX = _const "Posix_FileSys_S_ISVTX" : C_Mode.t; -val IWGRP = _const "Posix_FileSys_S_IWGRP" : C_Mode.t; -val IWOTH = _const "Posix_FileSys_S_IWOTH" : C_Mode.t; -val IWUSR = _const "Posix_FileSys_S_IWUSR" : C_Mode.t; -val IXGRP = _const "Posix_FileSys_S_IXGRP" : C_Mode.t; -val IXOTH = _const "Posix_FileSys_S_IXOTH" : C_Mode.t; -val IXUSR = _const "Posix_FileSys_S_IXUSR" : C_Mode.t; -end -structure ST = -struct -val isBlk = _import "Posix_FileSys_ST_isBlk" : C_Mode.t -> Bool.t; -val isChr = _import "Posix_FileSys_ST_isChr" : C_Mode.t -> Bool.t; -val isDir = _import "Posix_FileSys_ST_isDir" : C_Mode.t -> Bool.t; -val isFIFO = _import "Posix_FileSys_ST_isFIFO" : C_Mode.t -> Bool.t; -val isLink = _import "Posix_FileSys_ST_isLink" : C_Mode.t -> Bool.t; -val isReg = _import "Posix_FileSys_ST_isReg" : C_Mode.t -> Bool.t; -val isSock = _import "Posix_FileSys_ST_isSock" : C_Mode.t -> Bool.t; -end -structure Stat = -struct -val fstat = _import "Posix_FileSys_Stat_fstat" : C_Fd.t -> (C_Int.t) C_Errno.t; -val getATime = _import "Posix_FileSys_Stat_getATime" : unit -> C_Time.t; -val getCTime = _import "Posix_FileSys_Stat_getCTime" : unit -> C_Time.t; -val getDev = _import "Posix_FileSys_Stat_getDev" : unit -> C_Dev.t; -val getGId = _import "Posix_FileSys_Stat_getGId" : unit -> C_GId.t; -val getINo = _import "Posix_FileSys_Stat_getINo" : unit -> C_INo.t; -val getMode = _import "Posix_FileSys_Stat_getMode" : unit -> C_Mode.t; -val getMTime = _import "Posix_FileSys_Stat_getMTime" : unit -> C_Time.t; -val getNLink = _import "Posix_FileSys_Stat_getNLink" : unit -> C_NLink.t; -val getRDev = _import "Posix_FileSys_Stat_getRDev" : unit -> C_Dev.t; -val getSize = _import "Posix_FileSys_Stat_getSize" : unit -> C_Off.t; -val getUId = _import "Posix_FileSys_Stat_getUId" : unit -> C_UId.t; -val lstat = _import "Posix_FileSys_Stat_lstat" : NullString8.t -> (C_Int.t) C_Errno.t; -val stat = _import "Posix_FileSys_Stat_stat" : NullString8.t -> (C_Int.t) C_Errno.t; -end -val symlink = _import "Posix_FileSys_symlink" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t; -val truncate = _import "Posix_FileSys_truncate" : NullString8.t * C_Off.t -> (C_Int.t) C_Errno.t; -val umask = _import "Posix_FileSys_umask" : C_Mode.t -> C_Mode.t; -val unlink = _import "Posix_FileSys_unlink" : NullString8.t -> (C_Int.t) C_Errno.t; -structure Utimbuf = -struct -val setAcTime = _import "Posix_FileSys_Utimbuf_setAcTime" : C_Time.t -> unit; -val setModTime = _import "Posix_FileSys_Utimbuf_setModTime" : C_Time.t -> unit; -val utime = _import "Posix_FileSys_Utimbuf_utime" : NullString8.t -> (C_Int.t) C_Errno.t; -end -end -structure IO = -struct -val close = _import "Posix_IO_close" : C_Fd.t -> (C_Int.t) C_Errno.t; -val dup = _import "Posix_IO_dup" : C_Fd.t -> (C_Fd.t) C_Errno.t; -val dup2 = _import "Posix_IO_dup2" : C_Fd.t * C_Fd.t -> (C_Fd.t) C_Errno.t; -val F_DUPFD = _const "Posix_IO_F_DUPFD" : C_Int.t; -val F_GETFD = _const "Posix_IO_F_GETFD" : C_Int.t; -val F_GETFL = _const "Posix_IO_F_GETFL" : C_Int.t; -val F_GETOWN = _const "Posix_IO_F_GETOWN" : C_Int.t; -val F_SETFD = _const "Posix_IO_F_SETFD" : C_Int.t; -val F_SETFL = _const "Posix_IO_F_SETFL" : C_Int.t; -val F_SETOWN = _const "Posix_IO_F_SETOWN" : C_Int.t; -val fcntl2 = _import "Posix_IO_fcntl2" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t; -val fcntl3 = _import "Posix_IO_fcntl3" : C_Fd.t * C_Int.t * C_Int.t -> (C_Int.t) C_Errno.t; -structure FD = -struct -val CLOEXEC = _const "Posix_IO_FD_CLOEXEC" : C_Int.t; -end -structure FLock = -struct -val F_GETLK = _const "Posix_IO_FLock_F_GETLK" : C_Int.t; -val F_RDLCK = _const "Posix_IO_FLock_F_RDLCK" : C_Short.t; -val F_SETLK = _const "Posix_IO_FLock_F_SETLK" : C_Int.t; -val F_SETLKW = _const "Posix_IO_FLock_F_SETLKW" : C_Int.t; -val F_UNLCK = _const "Posix_IO_FLock_F_UNLCK" : C_Short.t; -val F_WRLCK = _const "Posix_IO_FLock_F_WRLCK" : C_Short.t; -val fcntl = _import "Posix_IO_FLock_fcntl" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t; -val getLen = _import "Posix_IO_FLock_getLen" : unit -> C_Off.t; -val getPId = _import "Posix_IO_FLock_getPId" : unit -> C_PId.t; -val getStart = _import "Posix_IO_FLock_getStart" : unit -> C_Off.t; -val getType = _import "Posix_IO_FLock_getType" : unit -> C_Short.t; -val getWhence = _import "Posix_IO_FLock_getWhence" : unit -> C_Short.t; -val SEEK_CUR = _const "Posix_IO_FLock_SEEK_CUR" : C_Short.t; -val SEEK_END = _const "Posix_IO_FLock_SEEK_END" : C_Short.t; -val SEEK_SET = _const "Posix_IO_FLock_SEEK_SET" : C_Short.t; -val setLen = _import "Posix_IO_FLock_setLen" : C_Off.t -> unit; -val setPId = _import "Posix_IO_FLock_setPId" : C_PId.t -> unit; -val setStart = _import "Posix_IO_FLock_setStart" : C_Off.t -> unit; -val setType = _import "Posix_IO_FLock_setType" : C_Short.t -> unit; -val setWhence = _import "Posix_IO_FLock_setWhence" : C_Short.t -> unit; -end -val fsync = _import "Posix_IO_fsync" : C_Fd.t -> (C_Int.t) C_Errno.t; -val lseek = _import "Posix_IO_lseek" : C_Fd.t * C_Off.t * C_Int.t -> (C_Off.t) C_Errno.t; -val O_ACCMODE = _const "Posix_IO_O_ACCMODE" : C_Int.t; -val pipe = _import "Posix_IO_pipe" : (C_Fd.t) array -> (C_Int.t) C_Errno.t; -val readChar8 = _import "Posix_IO_readChar8" : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t; -val readWord8 = _import "Posix_IO_readWord8" : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t; -val SEEK_CUR = _const "Posix_IO_SEEK_CUR" : C_Int.t; -val SEEK_END = _const "Posix_IO_SEEK_END" : C_Int.t; -val SEEK_SET = _const "Posix_IO_SEEK_SET" : C_Int.t; -val setbin = _import "Posix_IO_setbin" : C_Fd.t -> unit; -val settext = _import "Posix_IO_settext" : C_Fd.t -> unit; -val writeChar8Arr = _import "Posix_IO_writeChar8Arr" : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t; -val writeChar8Vec = _import "Posix_IO_writeChar8Vec" : C_Fd.t * (Char8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t; -val writeWord8Arr = _import "Posix_IO_writeWord8Arr" : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t; -val writeWord8Vec = _import "Posix_IO_writeWord8Vec" : C_Fd.t * (Word8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t; -end -structure ProcEnv = -struct -val ctermid = _import "Posix_ProcEnv_ctermid" : unit -> C_String.t; -val (environGet, environSet) = _symbol "Posix_ProcEnv_environ": (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit); -val getegid = _import "Posix_ProcEnv_getegid" : unit -> C_GId.t; -val getenv = _import "Posix_ProcEnv_getenv" : NullString8.t -> C_String.t; -val geteuid = _import "Posix_ProcEnv_geteuid" : unit -> C_UId.t; -val getgid = _import "Posix_ProcEnv_getgid" : unit -> C_GId.t; -val getgroups = _import "Posix_ProcEnv_getgroups" : C_Int.t * (C_GId.t) array -> (C_Int.t) C_Errno.t; -val getgroupsN = _import "Posix_ProcEnv_getgroupsN" : unit -> C_Int.t; -val getlogin = _import "Posix_ProcEnv_getlogin" : unit -> (C_String.t) C_Errno.t; -val getpgrp = _import "Posix_ProcEnv_getpgrp" : unit -> C_PId.t; -val getpid = _import "Posix_ProcEnv_getpid" : unit -> C_PId.t; -val getppid = _import "Posix_ProcEnv_getppid" : unit -> C_PId.t; -val getuid = _import "Posix_ProcEnv_getuid" : unit -> C_UId.t; -val isatty = _import "Posix_ProcEnv_isatty" : C_Fd.t -> Bool.t; -val SC_2_C_BIND = _const "Posix_ProcEnv_SC_2_C_BIND" : C_Int.t; -val SC_2_C_DEV = _const "Posix_ProcEnv_SC_2_C_DEV" : C_Int.t; -val SC_2_CHAR_TERM = _const "Posix_ProcEnv_SC_2_CHAR_TERM" : C_Int.t; -val SC_2_FORT_DEV = _const "Posix_ProcEnv_SC_2_FORT_DEV" : C_Int.t; -val SC_2_FORT_RUN = _const "Posix_ProcEnv_SC_2_FORT_RUN" : C_Int.t; -val SC_2_LOCALEDEF = _const "Posix_ProcEnv_SC_2_LOCALEDEF" : C_Int.t; -val SC_2_PBS = _const "Posix_ProcEnv_SC_2_PBS" : C_Int.t; -val SC_2_PBS_ACCOUNTING = _const "Posix_ProcEnv_SC_2_PBS_ACCOUNTING" : C_Int.t; -val SC_2_PBS_CHECKPOINT = _const "Posix_ProcEnv_SC_2_PBS_CHECKPOINT" : C_Int.t; -val SC_2_PBS_LOCATE = _const "Posix_ProcEnv_SC_2_PBS_LOCATE" : C_Int.t; -val SC_2_PBS_MESSAGE = _const "Posix_ProcEnv_SC_2_PBS_MESSAGE" : C_Int.t; -val SC_2_PBS_TRACK = _const "Posix_ProcEnv_SC_2_PBS_TRACK" : C_Int.t; -val SC_2_SW_DEV = _const "Posix_ProcEnv_SC_2_SW_DEV" : C_Int.t; -val SC_2_UPE = _const "Posix_ProcEnv_SC_2_UPE" : C_Int.t; -val SC_2_VERSION = _const "Posix_ProcEnv_SC_2_VERSION" : C_Int.t; -val SC_ADVISORY_INFO = _const "Posix_ProcEnv_SC_ADVISORY_INFO" : C_Int.t; -val SC_AIO_LISTIO_MAX = _const "Posix_ProcEnv_SC_AIO_LISTIO_MAX" : C_Int.t; -val SC_AIO_MAX = _const "Posix_ProcEnv_SC_AIO_MAX" : C_Int.t; -val SC_AIO_PRIO_DELTA_MAX = _const "Posix_ProcEnv_SC_AIO_PRIO_DELTA_MAX" : C_Int.t; -val SC_ARG_MAX = _const "Posix_ProcEnv_SC_ARG_MAX" : C_Int.t; -val SC_ASYNCHRONOUS_IO = _const "Posix_ProcEnv_SC_ASYNCHRONOUS_IO" : C_Int.t; -val SC_ATEXIT_MAX = _const "Posix_ProcEnv_SC_ATEXIT_MAX" : C_Int.t; -val SC_BARRIERS = _const "Posix_ProcEnv_SC_BARRIERS" : C_Int.t; -val SC_BC_BASE_MAX = _const "Posix_ProcEnv_SC_BC_BASE_MAX" : C_Int.t; -val SC_BC_DIM_MAX = _const "Posix_ProcEnv_SC_BC_DIM_MAX" : C_Int.t; -val SC_BC_SCALE_MAX = _const "Posix_ProcEnv_SC_BC_SCALE_MAX" : C_Int.t; -val SC_BC_STRING_MAX = _const "Posix_ProcEnv_SC_BC_STRING_MAX" : C_Int.t; -val SC_CHILD_MAX = _const "Posix_ProcEnv_SC_CHILD_MAX" : C_Int.t; -val SC_CLK_TCK = _const "Posix_ProcEnv_SC_CLK_TCK" : C_Int.t; -val SC_CLOCK_SELECTION = _const "Posix_ProcEnv_SC_CLOCK_SELECTION" : C_Int.t; -val SC_COLL_WEIGHTS_MAX = _const "Posix_ProcEnv_SC_COLL_WEIGHTS_MAX" : C_Int.t; -val SC_CPUTIME = _const "Posix_ProcEnv_SC_CPUTIME" : C_Int.t; -val SC_DELAYTIMER_MAX = _const "Posix_ProcEnv_SC_DELAYTIMER_MAX" : C_Int.t; -val SC_EXPR_NEST_MAX = _const "Posix_ProcEnv_SC_EXPR_NEST_MAX" : C_Int.t; -val SC_FSYNC = _const "Posix_ProcEnv_SC_FSYNC" : C_Int.t; -val SC_GETGR_R_SIZE_MAX = _const "Posix_ProcEnv_SC_GETGR_R_SIZE_MAX" : C_Int.t; -val SC_GETPW_R_SIZE_MAX = _const "Posix_ProcEnv_SC_GETPW_R_SIZE_MAX" : C_Int.t; -val SC_HOST_NAME_MAX = _const "Posix_ProcEnv_SC_HOST_NAME_MAX" : C_Int.t; -val SC_IOV_MAX = _const "Posix_ProcEnv_SC_IOV_MAX" : C_Int.t; -val SC_IPV6 = _const "Posix_ProcEnv_SC_IPV6" : C_Int.t; -val SC_JOB_CONTROL = _const "Posix_ProcEnv_SC_JOB_CONTROL" : C_Int.t; -val SC_LINE_MAX = _const "Posix_ProcEnv_SC_LINE_MAX" : C_Int.t; -val SC_LOGIN_NAME_MAX = _const "Posix_ProcEnv_SC_LOGIN_NAME_MAX" : C_Int.t; -val SC_MAPPED_FILES = _const "Posix_ProcEnv_SC_MAPPED_FILES" : C_Int.t; -val SC_MEMLOCK = _const "Posix_ProcEnv_SC_MEMLOCK" : C_Int.t; -val SC_MEMLOCK_RANGE = _const "Posix_ProcEnv_SC_MEMLOCK_RANGE" : C_Int.t; -val SC_MEMORY_PROTECTION = _const "Posix_ProcEnv_SC_MEMORY_PROTECTION" : C_Int.t; -val SC_MESSAGE_PASSING = _const "Posix_ProcEnv_SC_MESSAGE_PASSING" : C_Int.t; -val SC_MONOTONIC_CLOCK = _const "Posix_ProcEnv_SC_MONOTONIC_CLOCK" : C_Int.t; -val SC_MQ_OPEN_MAX = _const "Posix_ProcEnv_SC_MQ_OPEN_MAX" : C_Int.t; -val SC_MQ_PRIO_MAX = _const "Posix_ProcEnv_SC_MQ_PRIO_MAX" : C_Int.t; -val SC_NGROUPS_MAX = _const "Posix_ProcEnv_SC_NGROUPS_MAX" : C_Int.t; -val SC_OPEN_MAX = _const "Posix_ProcEnv_SC_OPEN_MAX" : C_Int.t; -val SC_PAGE_SIZE = _const "Posix_ProcEnv_SC_PAGE_SIZE" : C_Int.t; -val SC_PAGESIZE = _const "Posix_ProcEnv_SC_PAGESIZE" : C_Int.t; -val SC_PRIORITIZED_IO = _const "Posix_ProcEnv_SC_PRIORITIZED_IO" : C_Int.t; -val SC_PRIORITY_SCHEDULING = _const "Posix_ProcEnv_SC_PRIORITY_SCHEDULING" : C_Int.t; -val SC_RAW_SOCKETS = _const "Posix_ProcEnv_SC_RAW_SOCKETS" : C_Int.t; -val SC_RE_DUP_MAX = _const "Posix_ProcEnv_SC_RE_DUP_MAX" : C_Int.t; -val SC_READER_WRITER_LOCKS = _const "Posix_ProcEnv_SC_READER_WRITER_LOCKS" : C_Int.t; -val SC_REALTIME_SIGNALS = _const "Posix_ProcEnv_SC_REALTIME_SIGNALS" : C_Int.t; -val SC_REGEXP = _const "Posix_ProcEnv_SC_REGEXP" : C_Int.t; -val SC_RTSIG_MAX = _const "Posix_ProcEnv_SC_RTSIG_MAX" : C_Int.t; -val SC_SAVED_IDS = _const "Posix_ProcEnv_SC_SAVED_IDS" : C_Int.t; -val SC_SEM_NSEMS_MAX = _const "Posix_ProcEnv_SC_SEM_NSEMS_MAX" : C_Int.t; -val SC_SEM_VALUE_MAX = _const "Posix_ProcEnv_SC_SEM_VALUE_MAX" : C_Int.t; -val SC_SEMAPHORES = _const "Posix_ProcEnv_SC_SEMAPHORES" : C_Int.t; -val SC_SHARED_MEMORY_OBJECTS = _const "Posix_ProcEnv_SC_SHARED_MEMORY_OBJECTS" : C_Int.t; -val SC_SHELL = _const "Posix_ProcEnv_SC_SHELL" : C_Int.t; -val SC_SIGQUEUE_MAX = _const "Posix_ProcEnv_SC_SIGQUEUE_MAX" : C_Int.t; -val SC_SPAWN = _const "Posix_ProcEnv_SC_SPAWN" : C_Int.t; -val SC_SPIN_LOCKS = _const "Posix_ProcEnv_SC_SPIN_LOCKS" : C_Int.t; -val SC_SPORADIC_SERVER = _const "Posix_ProcEnv_SC_SPORADIC_SERVER" : C_Int.t; -val SC_SS_REPL_MAX = _const "Posix_ProcEnv_SC_SS_REPL_MAX" : C_Int.t; -val SC_STREAM_MAX = _const "Posix_ProcEnv_SC_STREAM_MAX" : C_Int.t; -val SC_SYMLOOP_MAX = _const "Posix_ProcEnv_SC_SYMLOOP_MAX" : C_Int.t; -val SC_SYNCHRONIZED_IO = _const "Posix_ProcEnv_SC_SYNCHRONIZED_IO" : C_Int.t; -val SC_THREAD_ATTR_STACKADDR = _const "Posix_ProcEnv_SC_THREAD_ATTR_STACKADDR" : C_Int.t; -val SC_THREAD_ATTR_STACKSIZE = _const "Posix_ProcEnv_SC_THREAD_ATTR_STACKSIZE" : C_Int.t; -val SC_THREAD_CPUTIME = _const "Posix_ProcEnv_SC_THREAD_CPUTIME" : C_Int.t; -val SC_THREAD_DESTRUCTOR_ITERATIONS = _const "Posix_ProcEnv_SC_THREAD_DESTRUCTOR_ITERATIONS" : C_Int.t; -val SC_THREAD_KEYS_MAX = _const "Posix_ProcEnv_SC_THREAD_KEYS_MAX" : C_Int.t; -val SC_THREAD_PRIO_INHERIT = _const "Posix_ProcEnv_SC_THREAD_PRIO_INHERIT" : C_Int.t; -val SC_THREAD_PRIO_PROTECT = _const "Posix_ProcEnv_SC_THREAD_PRIO_PROTECT" : C_Int.t; -val SC_THREAD_PRIORITY_SCHEDULING = _const "Posix_ProcEnv_SC_THREAD_PRIORITY_SCHEDULING" : C_Int.t; -val SC_THREAD_PROCESS_SHARED = _const "Posix_ProcEnv_SC_THREAD_PROCESS_SHARED" : C_Int.t; -val SC_THREAD_SAFE_FUNCTIONS = _const "Posix_ProcEnv_SC_THREAD_SAFE_FUNCTIONS" : C_Int.t; -val SC_THREAD_SPORADIC_SERVER = _const "Posix_ProcEnv_SC_THREAD_SPORADIC_SERVER" : C_Int.t; -val SC_THREAD_STACK_MIN = _const "Posix_ProcEnv_SC_THREAD_STACK_MIN" : C_Int.t; -val SC_THREAD_THREADS_MAX = _const "Posix_ProcEnv_SC_THREAD_THREADS_MAX" : C_Int.t; -val SC_THREADS = _const "Posix_ProcEnv_SC_THREADS" : C_Int.t; -val SC_TIMEOUTS = _const "Posix_ProcEnv_SC_TIMEOUTS" : C_Int.t; -val SC_TIMER_MAX = _const "Posix_ProcEnv_SC_TIMER_MAX" : C_Int.t; -val SC_TIMERS = _const "Posix_ProcEnv_SC_TIMERS" : C_Int.t; -val SC_TRACE = _const "Posix_ProcEnv_SC_TRACE" : C_Int.t; -val SC_TRACE_EVENT_FILTER = _const "Posix_ProcEnv_SC_TRACE_EVENT_FILTER" : C_Int.t; -val SC_TRACE_EVENT_NAME_MAX = _const "Posix_ProcEnv_SC_TRACE_EVENT_NAME_MAX" : C_Int.t; -val SC_TRACE_INHERIT = _const "Posix_ProcEnv_SC_TRACE_INHERIT" : C_Int.t; -val SC_TRACE_LOG = _const "Posix_ProcEnv_SC_TRACE_LOG" : C_Int.t; -val SC_TRACE_NAME_MAX = _const "Posix_ProcEnv_SC_TRACE_NAME_MAX" : C_Int.t; -val SC_TRACE_SYS_MAX = _const "Posix_ProcEnv_SC_TRACE_SYS_MAX" : C_Int.t; -val SC_TRACE_USER_EVENT_MAX = _const "Posix_ProcEnv_SC_TRACE_USER_EVENT_MAX" : C_Int.t; -val SC_TTY_NAME_MAX = _const "Posix_ProcEnv_SC_TTY_NAME_MAX" : C_Int.t; -val SC_TYPED_MEMORY_OBJECTS = _const "Posix_ProcEnv_SC_TYPED_MEMORY_OBJECTS" : C_Int.t; -val SC_TZNAME_MAX = _const "Posix_ProcEnv_SC_TZNAME_MAX" : C_Int.t; -val SC_V6_ILP32_OFF32 = _const "Posix_ProcEnv_SC_V6_ILP32_OFF32" : C_Int.t; -val SC_V6_ILP32_OFFBIG = _const "Posix_ProcEnv_SC_V6_ILP32_OFFBIG" : C_Int.t; -val SC_V6_LP64_OFF64 = _const "Posix_ProcEnv_SC_V6_LP64_OFF64" : C_Int.t; -val SC_V6_LPBIG_OFFBIG = _const "Posix_ProcEnv_SC_V6_LPBIG_OFFBIG" : C_Int.t; -val SC_VERSION = _const "Posix_ProcEnv_SC_VERSION" : C_Int.t; -val SC_XBS5_ILP32_OFF32 = _const "Posix_ProcEnv_SC_XBS5_ILP32_OFF32" : C_Int.t; -val SC_XBS5_ILP32_OFFBIG = _const "Posix_ProcEnv_SC_XBS5_ILP32_OFFBIG" : C_Int.t; -val SC_XBS5_LP64_OFF64 = _const "Posix_ProcEnv_SC_XBS5_LP64_OFF64" : C_Int.t; -val SC_XBS5_LPBIG_OFFBIG = _const "Posix_ProcEnv_SC_XBS5_LPBIG_OFFBIG" : C_Int.t; -val SC_XOPEN_CRYPT = _const "Posix_ProcEnv_SC_XOPEN_CRYPT" : C_Int.t; -val SC_XOPEN_ENH_I18N = _const "Posix_ProcEnv_SC_XOPEN_ENH_I18N" : C_Int.t; -val SC_XOPEN_LEGACY = _const "Posix_ProcEnv_SC_XOPEN_LEGACY" : C_Int.t; -val SC_XOPEN_REALTIME = _const "Posix_ProcEnv_SC_XOPEN_REALTIME" : C_Int.t; -val SC_XOPEN_REALTIME_THREADS = _const "Posix_ProcEnv_SC_XOPEN_REALTIME_THREADS" : C_Int.t; -val SC_XOPEN_SHM = _const "Posix_ProcEnv_SC_XOPEN_SHM" : C_Int.t; -val SC_XOPEN_STREAMS = _const "Posix_ProcEnv_SC_XOPEN_STREAMS" : C_Int.t; -val SC_XOPEN_UNIX = _const "Posix_ProcEnv_SC_XOPEN_UNIX" : C_Int.t; -val SC_XOPEN_VERSION = _const "Posix_ProcEnv_SC_XOPEN_VERSION" : C_Int.t; -val setenv = _import "Posix_ProcEnv_setenv" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t; -val setgid = _import "Posix_ProcEnv_setgid" : C_GId.t -> (C_Int.t) C_Errno.t; -val setgroups = _import "Posix_ProcEnv_setgroups" : C_Int.t * (C_GId.t) vector -> (C_Int.t) C_Errno.t; -val setpgid = _import "Posix_ProcEnv_setpgid" : C_PId.t * C_PId.t -> (C_Int.t) C_Errno.t; -val setsid = _import "Posix_ProcEnv_setsid" : unit -> (C_PId.t) C_Errno.t; -val setuid = _import "Posix_ProcEnv_setuid" : C_UId.t -> (C_Int.t) C_Errno.t; -val sysconf = _import "Posix_ProcEnv_sysconf" : C_Int.t -> (C_Long.t) C_Errno.t; -val times = _import "Posix_ProcEnv_times" : unit -> (C_Clock.t) C_Errno.t; -structure Times = -struct -val getCSTime = _import "Posix_ProcEnv_Times_getCSTime" : unit -> C_Clock.t; -val getCUTime = _import "Posix_ProcEnv_Times_getCUTime" : unit -> C_Clock.t; -val getSTime = _import "Posix_ProcEnv_Times_getSTime" : unit -> C_Clock.t; -val getUTime = _import "Posix_ProcEnv_Times_getUTime" : unit -> C_Clock.t; -end -val ttyname = _import "Posix_ProcEnv_ttyname" : C_Fd.t -> (C_String.t) C_Errno.t; -val uname = _import "Posix_ProcEnv_uname" : unit -> (C_Int.t) C_Errno.t; -structure Uname = -struct -val getMachine = _import "Posix_ProcEnv_Uname_getMachine" : unit -> C_String.t; -val getNodeName = _import "Posix_ProcEnv_Uname_getNodeName" : unit -> C_String.t; -val getRelease = _import "Posix_ProcEnv_Uname_getRelease" : unit -> C_String.t; -val getSysName = _import "Posix_ProcEnv_Uname_getSysName" : unit -> C_String.t; -val getVersion = _import "Posix_ProcEnv_Uname_getVersion" : unit -> C_String.t; -end -end -structure Process = -struct -val alarm = _import "Posix_Process_alarm" : C_UInt.t -> C_UInt.t; -val exece = _import "Posix_Process_exece" : NullString8.t * NullString8Array.t * NullString8Array.t -> (C_Int.t) C_Errno.t; -val execp = _import "Posix_Process_execp" : NullString8.t * NullString8Array.t -> (C_Int.t) C_Errno.t; -val exit = _import "Posix_Process_exit" : C_Status.t -> unit; -val exitStatus = _import "Posix_Process_exitStatus" : C_Status.t -> C_Int.t; -val fork = _import "Posix_Process_fork" : unit -> (C_PId.t) C_Errno.t; -val ifExited = _import "Posix_Process_ifExited" : C_Status.t -> Bool.t; -val ifSignaled = _import "Posix_Process_ifSignaled" : C_Status.t -> Bool.t; -val ifStopped = _import "Posix_Process_ifStopped" : C_Status.t -> Bool.t; -val kill = _import "Posix_Process_kill" : C_PId.t * C_Signal.t -> (C_Int.t) C_Errno.t; -val nanosleep = _import "Posix_Process_nanosleep" : (C_Time.t) ref * (C_Long.t) ref -> (C_Int.t) C_Errno.t; -val pause = _import "Posix_Process_pause" : unit -> (C_Int.t) C_Errno.t; -val sleep = _import "Posix_Process_sleep" : C_UInt.t -> C_UInt.t; -val stopSig = _import "Posix_Process_stopSig" : C_Status.t -> C_Signal.t; -val system = _import "Posix_Process_system" : NullString8.t -> (C_Status.t) C_Errno.t; -val termSig = _import "Posix_Process_termSig" : C_Status.t -> C_Signal.t; -structure W = -struct -val NOHANG = _const "Posix_Process_W_NOHANG" : C_Int.t; -val UNTRACED = _const "Posix_Process_W_UNTRACED" : C_Int.t; -end -val waitpid = _import "Posix_Process_waitpid" : C_PId.t * (C_Int.t) ref * C_Int.t -> (C_PId.t) C_Errno.t; -end -structure Signal = -struct -val default = _import "Posix_Signal_default" : C_Signal.t -> (C_Int.t) C_Errno.t; -val handlee = _import "Posix_Signal_handlee" : C_Signal.t -> (C_Int.t) C_Errno.t; -val handleGC = _import "Posix_Signal_handleGC" : unit -> unit; -val ignore = _import "Posix_Signal_ignore" : C_Signal.t -> (C_Int.t) C_Errno.t; -val isDefault = _import "Posix_Signal_isDefault" : C_Signal.t * (Bool.t) ref -> (C_Int.t) C_Errno.t; -val isIgnore = _import "Posix_Signal_isIgnore" : C_Signal.t * (Bool.t) ref -> (C_Int.t) C_Errno.t; -val isPending = _import "Posix_Signal_isPending" : C_Signal.t -> Bool.t; -val isPendingGC = _import "Posix_Signal_isPendingGC" : unit -> Bool.t; -val NSIG = _const "Posix_Signal_NSIG" : C_Int.t; -val resetPending = _import "Posix_Signal_resetPending" : unit -> unit; -val SIG_BLOCK = _const "Posix_Signal_SIG_BLOCK" : C_Int.t; -val SIG_SETMASK = _const "Posix_Signal_SIG_SETMASK" : C_Int.t; -val SIG_UNBLOCK = _const "Posix_Signal_SIG_UNBLOCK" : C_Int.t; -val SIGABRT = _const "Posix_Signal_SIGABRT" : C_Signal.t; -val sigaddset = _import "Posix_Signal_sigaddset" : C_Signal.t -> (C_Int.t) C_Errno.t; -val SIGALRM = _const "Posix_Signal_SIGALRM" : C_Signal.t; -val SIGBUS = _const "Posix_Signal_SIGBUS" : C_Signal.t; -val SIGCHLD = _const "Posix_Signal_SIGCHLD" : C_Signal.t; -val SIGCONT = _const "Posix_Signal_SIGCONT" : C_Signal.t; -val sigdelset = _import "Posix_Signal_sigdelset" : C_Signal.t -> (C_Int.t) C_Errno.t; -val sigemptyset = _import "Posix_Signal_sigemptyset" : unit -> (C_Int.t) C_Errno.t; -val sigfillset = _import "Posix_Signal_sigfillset" : unit -> (C_Int.t) C_Errno.t; -val SIGFPE = _const "Posix_Signal_SIGFPE" : C_Signal.t; -val SIGHUP = _const "Posix_Signal_SIGHUP" : C_Signal.t; -val SIGILL = _const "Posix_Signal_SIGILL" : C_Signal.t; -val SIGINT = _const "Posix_Signal_SIGINT" : C_Signal.t; -val sigismember = _import "Posix_Signal_sigismember" : C_Signal.t -> (C_Int.t) C_Errno.t; -val SIGKILL = _const "Posix_Signal_SIGKILL" : C_Signal.t; -val SIGPIPE = _const "Posix_Signal_SIGPIPE" : C_Signal.t; -val SIGPOLL = _const "Posix_Signal_SIGPOLL" : C_Signal.t; -val sigprocmask = _import "Posix_Signal_sigprocmask" : C_Int.t -> (C_Int.t) C_Errno.t; -val SIGPROF = _const "Posix_Signal_SIGPROF" : C_Signal.t; -val SIGQUIT = _const "Posix_Signal_SIGQUIT" : C_Signal.t; -val SIGSEGV = _const "Posix_Signal_SIGSEGV" : C_Signal.t; -val SIGSTOP = _const "Posix_Signal_SIGSTOP" : C_Signal.t; -val sigsuspend = _import "Posix_Signal_sigsuspend" : unit -> unit; -val SIGSYS = _const "Posix_Signal_SIGSYS" : C_Signal.t; -val SIGTERM = _const "Posix_Signal_SIGTERM" : C_Signal.t; -val SIGTRAP = _const "Posix_Signal_SIGTRAP" : C_Signal.t; -val SIGTSTP = _const "Posix_Signal_SIGTSTP" : C_Signal.t; -val SIGTTIN = _const "Posix_Signal_SIGTTIN" : C_Signal.t; -val SIGTTOU = _const "Posix_Signal_SIGTTOU" : C_Signal.t; -val SIGURG = _const "Posix_Signal_SIGURG" : C_Signal.t; -val SIGUSR1 = _const "Posix_Signal_SIGUSR1" : C_Signal.t; -val SIGUSR2 = _const "Posix_Signal_SIGUSR2" : C_Signal.t; -val SIGVTALRM = _const "Posix_Signal_SIGVTALRM" : C_Signal.t; -val SIGXCPU = _const "Posix_Signal_SIGXCPU" : C_Signal.t; -val SIGXFSZ = _const "Posix_Signal_SIGXFSZ" : C_Signal.t; -end -structure SysDB = -struct -val getgrgid = _import "Posix_SysDB_getgrgid" : C_GId.t -> Bool.t; -val getgrnam = _import "Posix_SysDB_getgrnam" : NullString8.t -> Bool.t; -val getpwnam = _import "Posix_SysDB_getpwnam" : NullString8.t -> Bool.t; -val getpwuid = _import "Posix_SysDB_getpwuid" : C_GId.t -> Bool.t; -structure Group = -struct -val getGId = _import "Posix_SysDB_Group_getGId" : unit -> C_GId.t; -val getMem = _import "Posix_SysDB_Group_getMem" : unit -> C_StringArray.t; -val getName = _import "Posix_SysDB_Group_getName" : unit -> C_String.t; -end -structure Passwd = -struct -val getDir = _import "Posix_SysDB_Passwd_getDir" : unit -> C_String.t; -val getGId = _import "Posix_SysDB_Passwd_getGId" : unit -> C_GId.t; -val getName = _import "Posix_SysDB_Passwd_getName" : unit -> C_String.t; -val getShell = _import "Posix_SysDB_Passwd_getShell" : unit -> C_String.t; -val getUId = _import "Posix_SysDB_Passwd_getUId" : unit -> C_UId.t; -end -end -structure TTY = -struct -val B0 = _const "Posix_TTY_B0" : C_Speed.t; -val B110 = _const "Posix_TTY_B110" : C_Speed.t; -val B1200 = _const "Posix_TTY_B1200" : C_Speed.t; -val B134 = _const "Posix_TTY_B134" : C_Speed.t; -val B150 = _const "Posix_TTY_B150" : C_Speed.t; -val B1800 = _const "Posix_TTY_B1800" : C_Speed.t; -val B19200 = _const "Posix_TTY_B19200" : C_Speed.t; -val B200 = _const "Posix_TTY_B200" : C_Speed.t; -val B2400 = _const "Posix_TTY_B2400" : C_Speed.t; -val B300 = _const "Posix_TTY_B300" : C_Speed.t; -val B38400 = _const "Posix_TTY_B38400" : C_Speed.t; -val B4800 = _const "Posix_TTY_B4800" : C_Speed.t; -val B50 = _const "Posix_TTY_B50" : C_Speed.t; -val B600 = _const "Posix_TTY_B600" : C_Speed.t; -val B75 = _const "Posix_TTY_B75" : C_Speed.t; -val B9600 = _const "Posix_TTY_B9600" : C_Speed.t; -structure C = -struct -val CLOCAL = _const "Posix_TTY_C_CLOCAL" : C_TCFlag.t; -val CREAD = _const "Posix_TTY_C_CREAD" : C_TCFlag.t; -val CS5 = _const "Posix_TTY_C_CS5" : C_TCFlag.t; -val CS6 = _const "Posix_TTY_C_CS6" : C_TCFlag.t; -val CS7 = _const "Posix_TTY_C_CS7" : C_TCFlag.t; -val CS8 = _const "Posix_TTY_C_CS8" : C_TCFlag.t; -val CSIZE = _const "Posix_TTY_C_CSIZE" : C_TCFlag.t; -val CSTOPB = _const "Posix_TTY_C_CSTOPB" : C_TCFlag.t; -val HUPCL = _const "Posix_TTY_C_HUPCL" : C_TCFlag.t; -val PARENB = _const "Posix_TTY_C_PARENB" : C_TCFlag.t; -val PARODD = _const "Posix_TTY_C_PARODD" : C_TCFlag.t; -end -structure I = -struct -val BRKINT = _const "Posix_TTY_I_BRKINT" : C_TCFlag.t; -val ICRNL = _const "Posix_TTY_I_ICRNL" : C_TCFlag.t; -val IGNBRK = _const "Posix_TTY_I_IGNBRK" : C_TCFlag.t; -val IGNCR = _const "Posix_TTY_I_IGNCR" : C_TCFlag.t; -val IGNPAR = _const "Posix_TTY_I_IGNPAR" : C_TCFlag.t; -val INLCR = _const "Posix_TTY_I_INLCR" : C_TCFlag.t; -val INPCK = _const "Posix_TTY_I_INPCK" : C_TCFlag.t; -val ISTRIP = _const "Posix_TTY_I_ISTRIP" : C_TCFlag.t; -val IXANY = _const "Posix_TTY_I_IXANY" : C_TCFlag.t; -val IXOFF = _const "Posix_TTY_I_IXOFF" : C_TCFlag.t; -val IXON = _const "Posix_TTY_I_IXON" : C_TCFlag.t; -val PARMRK = _const "Posix_TTY_I_PARMRK" : C_TCFlag.t; -end -structure L = -struct -val ECHO = _const "Posix_TTY_L_ECHO" : C_TCFlag.t; -val ECHOE = _const "Posix_TTY_L_ECHOE" : C_TCFlag.t; -val ECHOK = _const "Posix_TTY_L_ECHOK" : C_TCFlag.t; -val ECHONL = _const "Posix_TTY_L_ECHONL" : C_TCFlag.t; -val ICANON = _const "Posix_TTY_L_ICANON" : C_TCFlag.t; -val IEXTEN = _const "Posix_TTY_L_IEXTEN" : C_TCFlag.t; -val ISIG = _const "Posix_TTY_L_ISIG" : C_TCFlag.t; -val NOFLSH = _const "Posix_TTY_L_NOFLSH" : C_TCFlag.t; -val TOSTOP = _const "Posix_TTY_L_TOSTOP" : C_TCFlag.t; -end -structure O = -struct -val BS0 = _const "Posix_TTY_O_BS0" : C_TCFlag.t; -val BS1 = _const "Posix_TTY_O_BS1" : C_TCFlag.t; -val BSDLY = _const "Posix_TTY_O_BSDLY" : C_TCFlag.t; -val CR0 = _const "Posix_TTY_O_CR0" : C_TCFlag.t; -val CR1 = _const "Posix_TTY_O_CR1" : C_TCFlag.t; -val CR2 = _const "Posix_TTY_O_CR2" : C_TCFlag.t; -val CR3 = _const "Posix_TTY_O_CR3" : C_TCFlag.t; -val CRDLY = _const "Posix_TTY_O_CRDLY" : C_TCFlag.t; -val FF0 = _const "Posix_TTY_O_FF0" : C_TCFlag.t; -val FF1 = _const "Posix_TTY_O_FF1" : C_TCFlag.t; -val FFDLY = _const "Posix_TTY_O_FFDLY" : C_TCFlag.t; -val NL0 = _const "Posix_TTY_O_NL0" : C_TCFlag.t; -val NL1 = _const "Posix_TTY_O_NL1" : C_TCFlag.t; -val NLDLY = _const "Posix_TTY_O_NLDLY" : C_TCFlag.t; -val OCRNL = _const "Posix_TTY_O_OCRNL" : C_TCFlag.t; -val OFILL = _const "Posix_TTY_O_OFILL" : C_TCFlag.t; -val ONLCR = _const "Posix_TTY_O_ONLCR" : C_TCFlag.t; -val ONLRET = _const "Posix_TTY_O_ONLRET" : C_TCFlag.t; -val ONOCR = _const "Posix_TTY_O_ONOCR" : C_TCFlag.t; -val OPOST = _const "Posix_TTY_O_OPOST" : C_TCFlag.t; -val TAB0 = _const "Posix_TTY_O_TAB0" : C_TCFlag.t; -val TAB1 = _const "Posix_TTY_O_TAB1" : C_TCFlag.t; -val TAB2 = _const "Posix_TTY_O_TAB2" : C_TCFlag.t; -val TAB3 = _const "Posix_TTY_O_TAB3" : C_TCFlag.t; -val TABDLY = _const "Posix_TTY_O_TABDLY" : C_TCFlag.t; -val VT0 = _const "Posix_TTY_O_VT0" : C_TCFlag.t; -val VT1 = _const "Posix_TTY_O_VT1" : C_TCFlag.t; -val VTDLY = _const "Posix_TTY_O_VTDLY" : C_TCFlag.t; -end -structure TC = -struct -val drain = _import "Posix_TTY_TC_drain" : C_Fd.t -> (C_Int.t) C_Errno.t; -val flow = _import "Posix_TTY_TC_flow" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t; -val flush = _import "Posix_TTY_TC_flush" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t; -val getattr = _import "Posix_TTY_TC_getattr" : C_Fd.t -> (C_Int.t) C_Errno.t; -val getpgrp = _import "Posix_TTY_TC_getpgrp" : C_Fd.t -> (C_PId.t) C_Errno.t; -val sendbreak = _import "Posix_TTY_TC_sendbreak" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t; -val setattr = _import "Posix_TTY_TC_setattr" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t; -val setpgrp = _import "Posix_TTY_TC_setpgrp" : C_Fd.t * C_PId.t -> (C_Int.t) C_Errno.t; -val TCIFLUSH = _const "Posix_TTY_TC_TCIFLUSH" : C_Int.t; -val TCIOFF = _const "Posix_TTY_TC_TCIOFF" : C_Int.t; -val TCIOFLUSH = _const "Posix_TTY_TC_TCIOFLUSH" : C_Int.t; -val TCION = _const "Posix_TTY_TC_TCION" : C_Int.t; -val TCOFLUSH = _const "Posix_TTY_TC_TCOFLUSH" : C_Int.t; -val TCOOFF = _const "Posix_TTY_TC_TCOOFF" : C_Int.t; -val TCOON = _const "Posix_TTY_TC_TCOON" : C_Int.t; -val TCSADRAIN = _const "Posix_TTY_TC_TCSADRAIN" : C_Int.t; -val TCSAFLUSH = _const "Posix_TTY_TC_TCSAFLUSH" : C_Int.t; -val TCSANOW = _const "Posix_TTY_TC_TCSANOW" : C_Int.t; -end -structure Termios = -struct -val cfGetISpeed = _import "Posix_TTY_Termios_cfGetISpeed" : unit -> C_Speed.t; -val cfGetOSpeed = _import "Posix_TTY_Termios_cfGetOSpeed" : unit -> C_Speed.t; -val cfSetISpeed = _import "Posix_TTY_Termios_cfSetISpeed" : C_Speed.t -> (C_Int.t) C_Errno.t; -val cfSetOSpeed = _import "Posix_TTY_Termios_cfSetOSpeed" : C_Speed.t -> (C_Int.t) C_Errno.t; -val getCC = _import "Posix_TTY_Termios_getCC" : (C_CC.t) array -> unit; -val getCFlag = _import "Posix_TTY_Termios_getCFlag" : unit -> C_TCFlag.t; -val getIFlag = _import "Posix_TTY_Termios_getIFlag" : unit -> C_TCFlag.t; -val getLFlag = _import "Posix_TTY_Termios_getLFlag" : unit -> C_TCFlag.t; -val getOFlag = _import "Posix_TTY_Termios_getOFlag" : unit -> C_TCFlag.t; -val setCC = _import "Posix_TTY_Termios_setCC" : (C_CC.t) array -> unit; -val setCFlag = _import "Posix_TTY_Termios_setCFlag" : C_TCFlag.t -> unit; -val setIFlag = _import "Posix_TTY_Termios_setIFlag" : C_TCFlag.t -> unit; -val setLFlag = _import "Posix_TTY_Termios_setLFlag" : C_TCFlag.t -> unit; -val setOFlag = _import "Posix_TTY_Termios_setOFlag" : C_TCFlag.t -> unit; -end -structure V = -struct -val NCCS = _const "Posix_TTY_V_NCCS" : C_Int.t; -val VEOF = _const "Posix_TTY_V_VEOF" : C_Int.t; -val VEOL = _const "Posix_TTY_V_VEOL" : C_Int.t; -val VERASE = _const "Posix_TTY_V_VERASE" : C_Int.t; -val VINTR = _const "Posix_TTY_V_VINTR" : C_Int.t; -val VKILL = _const "Posix_TTY_V_VKILL" : C_Int.t; -val VMIN = _const "Posix_TTY_V_VMIN" : C_Int.t; -val VQUIT = _const "Posix_TTY_V_VQUIT" : C_Int.t; -val VSTART = _const "Posix_TTY_V_VSTART" : C_Int.t; -val VSTOP = _const "Posix_TTY_V_VSTOP" : C_Int.t; -val VSUSP = _const "Posix_TTY_V_VSUSP" : C_Int.t; -val VTIME = _const "Posix_TTY_V_VTIME" : C_Int.t; -end -end -end -structure Real32 = -struct -type t = Real32.t -val abs = _import "Real32_abs" : Real32.t -> Real32.t; -val add = _import "Real32_add" : Real32.t * Real32.t -> Real32.t; -val class = _import "Real32_class" : Real32.t -> C_Int.t; -val div = _import "Real32_div" : Real32.t * Real32.t -> Real32.t; -val equal = _import "Real32_equal" : Real32.t * Real32.t -> Bool.t; -val fetch = _import "Real32_fetch" : (Real32.t) ref -> Real32.t; -val frexp = _import "Real32_frexp" : Real32.t * (C_Int.t) ref -> Real32.t; -val gdtoa = _import "Real32_gdtoa" : Real32.t * C_Int.t * C_Int.t * (C_Int.t) ref -> C_String.t; -val ldexp = _import "Real32_ldexp" : Real32.t * C_Int.t -> Real32.t; -val le = _import "Real32_le" : Real32.t * Real32.t -> Bool.t; -val lt = _import "Real32_lt" : Real32.t * Real32.t -> Bool.t; -structure Math = -struct -val acos = _import "Real32_Math_acos" : Real32.t -> Real32.t; -val asin = _import "Real32_Math_asin" : Real32.t -> Real32.t; -val atan = _import "Real32_Math_atan" : Real32.t -> Real32.t; -val atan2 = _import "Real32_Math_atan2" : Real32.t * Real32.t -> Real32.t; -val cos = _import "Real32_Math_cos" : Real32.t -> Real32.t; -val cosh = _import "Real32_Math_cosh" : Real32.t -> Real32.t; -val (eGet, eSet) = _symbol "Real32_Math_e": (unit -> (Real32.t)) * ((Real32.t) -> unit); -val exp = _import "Real32_Math_exp" : Real32.t -> Real32.t; -val ln = _import "Real32_Math_ln" : Real32.t -> Real32.t; -val log10 = _import "Real32_Math_log10" : Real32.t -> Real32.t; -val (piGet, piSet) = _symbol "Real32_Math_pi": (unit -> (Real32.t)) * ((Real32.t) -> unit); -val pow = _import "Real32_Math_pow" : Real32.t * Real32.t -> Real32.t; -val sin = _import "Real32_Math_sin" : Real32.t -> Real32.t; -val sinh = _import "Real32_Math_sinh" : Real32.t -> Real32.t; -val sqrt = _import "Real32_Math_sqrt" : Real32.t -> Real32.t; -val tan = _import "Real32_Math_tan" : Real32.t -> Real32.t; -val tanh = _import "Real32_Math_tanh" : Real32.t -> Real32.t; -end -val (maxFiniteGet, maxFiniteSet) = _symbol "Real32_maxFinite": (unit -> (Real32.t)) * ((Real32.t) -> unit); -val (minNormalPosGet, minNormalPosSet) = _symbol "Real32_minNormalPos": (unit -> (Real32.t)) * ((Real32.t) -> unit); -val (minPosGet, minPosSet) = _symbol "Real32_minPos": (unit -> (Real32.t)) * ((Real32.t) -> unit); -val modf = _import "Real32_modf" : Real32.t * (Real32.t) ref -> Real32.t; -val move = _import "Real32_move" : (Real32.t) ref * (Real32.t) ref -> unit; -val mul = _import "Real32_mul" : Real32.t * Real32.t -> Real32.t; -val muladd = _import "Real32_muladd" : Real32.t * Real32.t * Real32.t -> Real32.t; -val mulsub = _import "Real32_mulsub" : Real32.t * Real32.t * Real32.t -> Real32.t; -val neg = _import "Real32_neg" : Real32.t -> Real32.t; -val nextAfter = _import "Real32_nextAfter" : Real32.t * Real32.t -> Real32.t; -val round = _import "Real32_round" : Real32.t -> Real32.t; -val signBit = _import "Real32_signBit" : Real32.t -> C_Int.t; -val store = _import "Real32_store" : (Real32.t) ref * Real32.t -> unit; -val strto = _import "Real32_strto" : NullString8.t -> Real32.t; -val sub = _import "Real32_sub" : Real32.t * Real32.t -> Real32.t; -val toReal32 = _import "Real32_toReal32" : Real32.t -> Real32.t; -val toReal64 = _import "Real32_toReal64" : Real32.t -> Real64.t; -val toWordS16 = _import "Real32_toWordS16" : Real32.t -> Int16.t; -val toWordS32 = _import "Real32_toWordS32" : Real32.t -> Int32.t; -val toWordS64 = _import "Real32_toWordS64" : Real32.t -> Int64.t; -val toWordS8 = _import "Real32_toWordS8" : Real32.t -> Int8.t; -val toWordU16 = _import "Real32_toWordU16" : Real32.t -> Word16.t; -val toWordU32 = _import "Real32_toWordU32" : Real32.t -> Word32.t; -val toWordU64 = _import "Real32_toWordU64" : Real32.t -> Word64.t; -val toWordU8 = _import "Real32_toWordU8" : Real32.t -> Word8.t; -end -structure Real64 = -struct -type t = Real64.t -val abs = _import "Real64_abs" : Real64.t -> Real64.t; -val add = _import "Real64_add" : Real64.t * Real64.t -> Real64.t; -val class = _import "Real64_class" : Real64.t -> C_Int.t; -val div = _import "Real64_div" : Real64.t * Real64.t -> Real64.t; -val equal = _import "Real64_equal" : Real64.t * Real64.t -> Bool.t; -val... [truncated message content] |
|
From: Matthew F. <fl...@ml...> - 2006-06-12 09:24:07
|
The comment refers to aspects of the entire ML program state that need
to be worried about when saving and loading worlds. (Admittedly, it
is not an exhaustive list.)
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-12 16:19:42 UTC (rev 4645)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-12 16:24:06 UTC (rev 4646)
@@ -17,14 +17,15 @@
datatype status = Clone | Original
(* Need to worry about:
+ * - open file descriptors
* - redetermine buffer status when restart
*)
fun save' (file: string): status =
let
val () =
SysCall.simple'
- ({ errVal = true },
- fn () => Prim.save (NullString.nullTerm file))
+ ({errVal = true},
+ fn () => Prim.save (NullString.nullTerm file))
in
if Prim.getAmOriginal gcState
then Original
|
|
From: Matthew F. <fl...@ml...> - 2006-06-12 09:19:44
|
Printf size_t values with %zu format
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h 2006-06-12 16:18:16 UTC (rev 4644)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h 2006-06-12 16:19:42 UTC (rev 4645)
@@ -48,17 +48,17 @@
res = fread (buf, size, count, f);
if (res != count)
- diee ("fread (_, %ld, %ld, _) failed (only read %ld).\n",
- (long)size, (long)count, (long)res);
+ diee ("fread (_, %zu, %zu, _) failed (only read %zu).\n",
+ size, count, res);
}
static inline void fwrite_safe (const void *buf, size_t size, size_t count, FILE *f) {
size_t res;
-
+
res = fwrite (buf, size, count, f);
if (res != count)
- diee ("fwrite (_, %ld, %ld, _) failed (only wrote %ld).\n",
- (long)size, (long)count, (long)res);
+ diee ("fwrite (_, %zu, %zu, _) failed (only wrote %zu).\n",
+ size, count, res);
}
static inline void *malloc_safe (size_t size) {
|
|
From: Matthew F. <fl...@ml...> - 2006-06-12 09:18:17
|
Typo in diskBack.unix.c
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
U mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-06-11 07:54:45 UTC (rev 4643)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-06-12 16:18:16 UTC (rev 4644)
@@ -17,7 +17,7 @@
strcat (template, tag);
m = umask(077);
fd = mkstemp_safe (template);
- f = fdopen(f, "w+");
+ f = fdopen_safe (fd, "w+");
(void)umask(m);
unlink_safe (template);
free (template);
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h 2006-06-11 07:54:45 UTC (rev 4643)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h 2006-06-12 16:18:16 UTC (rev 4644)
@@ -25,24 +25,15 @@
return;
}
-static inline void *malloc_safe (size_t size) {
- void *res;
-
- res = malloc (size);
- if (NULL == res)
- die ("malloc (%zu) failed.\n", size);
+static inline FILE *fdopen_safe (int fd, const char *mode) {
+ FILE *res;
+
+ res = fdopen (fd, mode);
+ if (0 == res)
+ diee ("fopen (%d, %s) failed.\n", fd, mode);
return res;
}
-static inline int mkstemp_safe (char *template) {
- int fd;
-
- fd = mkstemp (template);
- if (-1 == fd)
- diee ("mkstemp (%s) failed.\n", template);
- return fd;
-}
-
static inline FILE *fopen_safe (const char *fileName, const char *mode) {
FILE *res;
@@ -61,6 +52,33 @@
(long)size, (long)count, (long)res);
}
+static inline void fwrite_safe (const void *buf, size_t size, size_t count, FILE *f) {
+ size_t res;
+
+ res = fwrite (buf, size, count, f);
+ if (res != count)
+ diee ("fwrite (_, %ld, %ld, _) failed (only wrote %ld).\n",
+ (long)size, (long)count, (long)res);
+}
+
+static inline void *malloc_safe (size_t size) {
+ void *res;
+
+ res = malloc (size);
+ if (NULL == res)
+ die ("malloc (%zu) failed.\n", size);
+ return res;
+}
+
+static inline int mkstemp_safe (char *template) {
+ int fd;
+
+ fd = mkstemp (template);
+ if (-1 == fd)
+ diee ("mkstemp (%s) failed.\n", template);
+ return fd;
+}
+
static inline void unlink_safe (const char *pathname) {
int res;
@@ -69,12 +87,3 @@
diee ("unlink (%s) failed.\n", pathname);
return;
}
-
-static inline void fwrite_safe (const void *buf, size_t size, size_t count, FILE *f) {
- size_t res;
-
- res = fwrite (buf, size, count, f);
- if (res != count)
- diee ("fwrite (_, %ld, %ld, _) failed (only wrote %ld).\n",
- (long)size, (long)count, (long)res);
-}
|
|
From: Wesley T. <we...@ml...> - 2006-06-11 00:54:47
|
Add missing declaration for non-windows platforms (broken by last commit).
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-06-11 02:37:23 UTC (rev 4642)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-06-11 07:54:45 UTC (rev 4643)
@@ -1,5 +1,6 @@
static FILE *tempFileDes (void) {
int fd;
+ FILE *f;
char *template;
const char *tmpDir;
const char *tag = "/TempFileXXXXXXXXXX";
|
|
From: Wesley T. <we...@ml...> - 2006-06-10 19:37:35
|
This commit gets MinGW to completely rebuild.
The first change switches world & profiling code to use stdio:
1. stdio is ANSI C and thus more portable
2. the raw io used previously did not
a. deal with binary/text mode under windows (=> corrupt world files)
b. restart large reads/writes when they only partially completed
c. align writes on sector boundaries; Linus threatened to break this!
The second change is how the SML code saves the world:
Now the filename is passed to C, and a failure does not abort the program.
Instead, we check return codes and propogate the error code back to an SML
exception, raised with the correct error status.
To effect this change, I had to change the save primitive's prototype.
Also, I had to output nicer C code in the codegen to keep error status.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/prim-mlton.sml
U mlton/branches/on-20050822-x86_64-branch/include/main.h
U mlton/branches/on-20050822-x86_64-branch/mlton/atoms/hash-type.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/codegen/c-codegen/c-codegen.fun
U mlton/branches/on-20050822-x86_64-branch/mlton/ssa/ssa-tree2.fun
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/read_write.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
U mlton/branches/on-20050822-x86_64-branch/runtime/util/read_write.h
U mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml 2006-06-10 20:28:00 UTC (rev 4641)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml 2006-06-11 02:37:23 UTC (rev 4642)
@@ -1,131 +1,131 @@
-(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh
- * Jagannathan, and Stephen Weeks.
- *
- * MLton is released under a BSD-style license.
- * See the file MLton-LICENSE for details.
- *)
-
-
-(* C *)
-structure C_Char = struct open Int8 type t = int end
-functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A)
-structure C_SChar = struct open Int8 type t = int end
-functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A)
-structure C_UChar = struct open Word8 type t = word end
-functor C_UChar_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A)
-structure C_Short = struct open Int16 type t = int end
-functor C_Short_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
-structure C_SShort = struct open Int16 type t = int end
-functor C_SShort_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
-structure C_UShort = struct open Word16 type t = word end
-functor C_UShort_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
-structure C_Int = struct open Int32 type t = int end
-functor C_Int_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_SInt = struct open Int32 type t = int end
-functor C_SInt_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_UInt = struct open Word32 type t = word end
-functor C_UInt_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-structure C_Long = struct open Int32 type t = int end
-functor C_Long_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_SLong = struct open Int32 type t = int end
-functor C_SLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_ULong = struct open Word32 type t = word end
-functor C_ULong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-structure C_LongLong = struct open Int64 type t = int end
-functor C_LongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A)
-structure C_SLongLong = struct open Int64 type t = int end
-functor C_SLongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A)
-structure C_ULongLong = struct open Word64 type t = word end
-functor C_ULongLong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A)
-structure C_Float = struct open Real32 type t = real end
-functor C_Float_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real32 (A)
-structure C_Double = struct open Real64 type t = real end
-functor C_Double_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real64 (A)
-structure C_Size = struct open Word32 type t = word end
-functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-structure C_Pointer = struct open Word32 type t = word end
-functor C_Pointer_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-structure C_String = struct open Word32 type t = word end
-functor C_String_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-structure C_StringArray = struct open Word32 type t = word end
-functor C_StringArray_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-(* Generic integers *)
-structure C_Fd = C_Int
-functor C_Fd_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
-structure C_Signal = C_Int
-functor C_Signal_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
-structure C_Status = C_Int
-functor C_Status_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
-structure C_Sock = C_Int
-functor C_Sock_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
-
-(* C99 *)
-structure C_Ptrdiff = struct open Int32 type t = int end
-functor C_Ptrdiff_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_Intmax = struct open Int64 type t = int end
-functor C_Intmax_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A)
-structure C_UIntmax = struct open Word64 type t = word end
-functor C_UIntmax_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A)
-structure C_Intptr = struct open Int32 type t = int end
-functor C_Intptr_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_UIntptr = struct open Word32 type t = word end
-functor C_UIntptr_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-(* from <dirent.h> *)
-structure C_DirP = struct open Word32 type t = word end
-functor C_DirP_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-(* from <poll.h> *)
-structure C_NFds = struct open Word32 type t = word end
-functor C_NFds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-(* from <resource.h> *)
-structure C_RLim = struct open Word32 type t = word end
-functor C_RLim_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-(* from <sys/types.h> *)
-structure C_Clock = struct open Int32 type t = int end
-functor C_Clock_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_Dev = struct open Word32 type t = word end
-functor C_Dev_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-structure C_GId = struct open Word16 type t = word end
-functor C_GId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
-structure C_Id = struct open Int32 type t = int end
-functor C_Id_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_INo = struct open Int16 type t = int end
-functor C_INo_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
-structure C_Mode = struct open Word16 type t = word end
-functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
-structure C_NLink = struct open Int16 type t = int end
-functor C_NLink_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
-structure C_Off = struct open Int32 type t = int end
-functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_PId = struct open Int32 type t = int end
-functor C_PId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_SSize = struct open Int32 type t = int end
-functor C_SSize_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_SUSeconds = struct open Int32 type t = int end
-functor C_SUSeconds_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_Time = struct open Int32 type t = int end
-functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-structure C_UId = struct open Word16 type t = word end
-functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
-
-(* from <sys/socket.h> *)
-structure C_Socklen = struct open Int32 type t = int end
-functor C_Socklen_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
-
-(* from <termios.h> *)
-structure C_CC = struct open Word8 type t = word end
-functor C_CC_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A)
-structure C_Speed = struct open Word32 type t = word end
-functor C_Speed_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-structure C_TCFlag = struct open Word32 type t = word end
-functor C_TCFlag_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
-(* from "gmp.h" *)
-structure C_MPLimb = struct open Word32 type t = word end
-functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
-
+(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh
+ * Jagannathan, and Stephen Weeks.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+
+(* C *)
+structure C_Char = struct open Int8 type t = int end
+functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A)
+structure C_SChar = struct open Int8 type t = int end
+functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A)
+structure C_UChar = struct open Word8 type t = word end
+functor C_UChar_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A)
+structure C_Short = struct open Int16 type t = int end
+functor C_Short_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
+structure C_SShort = struct open Int16 type t = int end
+functor C_SShort_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
+structure C_UShort = struct open Word16 type t = word end
+functor C_UShort_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
+structure C_Int = struct open Int32 type t = int end
+functor C_Int_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_SInt = struct open Int32 type t = int end
+functor C_SInt_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_UInt = struct open Word32 type t = word end
+functor C_UInt_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+structure C_Long = struct open Int32 type t = int end
+functor C_Long_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_SLong = struct open Int32 type t = int end
+functor C_SLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_ULong = struct open Word32 type t = word end
+functor C_ULong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+structure C_LongLong = struct open Int64 type t = int end
+functor C_LongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A)
+structure C_SLongLong = struct open Int64 type t = int end
+functor C_SLongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A)
+structure C_ULongLong = struct open Word64 type t = word end
+functor C_ULongLong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A)
+structure C_Float = struct open Real32 type t = real end
+functor C_Float_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real32 (A)
+structure C_Double = struct open Real64 type t = real end
+functor C_Double_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real64 (A)
+structure C_Size = struct open Word32 type t = word end
+functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+structure C_Pointer = struct open Word32 type t = word end
+functor C_Pointer_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+structure C_String = struct open Word32 type t = word end
+functor C_String_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+structure C_StringArray = struct open Word32 type t = word end
+functor C_StringArray_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+(* Generic integers *)
+structure C_Fd = C_Int
+functor C_Fd_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
+structure C_Signal = C_Int
+functor C_Signal_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
+structure C_Status = C_Int
+functor C_Status_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
+structure C_Sock = C_Int
+functor C_Sock_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A)
+
+(* C99 *)
+structure C_Ptrdiff = struct open Int32 type t = int end
+functor C_Ptrdiff_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_Intmax = struct open Int64 type t = int end
+functor C_Intmax_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A)
+structure C_UIntmax = struct open Word64 type t = word end
+functor C_UIntmax_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A)
+structure C_Intptr = struct open Int32 type t = int end
+functor C_Intptr_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_UIntptr = struct open Word32 type t = word end
+functor C_UIntptr_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+(* from <dirent.h> *)
+structure C_DirP = struct open Word32 type t = word end
+functor C_DirP_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+(* from <poll.h> *)
+structure C_NFds = struct open Word32 type t = word end
+functor C_NFds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+(* from <resource.h> *)
+structure C_RLim = struct open Word32 type t = word end
+functor C_RLim_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+(* from <sys/types.h> *)
+structure C_Clock = struct open Int32 type t = int end
+functor C_Clock_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_Dev = struct open Word32 type t = word end
+functor C_Dev_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+structure C_GId = struct open Word16 type t = word end
+functor C_GId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
+structure C_Id = struct open Int32 type t = int end
+functor C_Id_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_INo = struct open Int16 type t = int end
+functor C_INo_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
+structure C_Mode = struct open Word16 type t = word end
+functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
+structure C_NLink = struct open Int16 type t = int end
+functor C_NLink_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A)
+structure C_Off = struct open Int32 type t = int end
+functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_PId = struct open Int32 type t = int end
+functor C_PId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_SSize = struct open Int32 type t = int end
+functor C_SSize_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_SUSeconds = struct open Int32 type t = int end
+functor C_SUSeconds_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_Time = struct open Int32 type t = int end
+functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+structure C_UId = struct open Word16 type t = word end
+functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A)
+
+(* from <sys/socket.h> *)
+structure C_Socklen = struct open Int32 type t = int end
+functor C_Socklen_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A)
+
+(* from <termios.h> *)
+structure C_CC = struct open Word8 type t = word end
+functor C_CC_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A)
+structure C_Speed = struct open Word32 type t = word end
+functor C_Speed_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+structure C_TCFlag = struct open Word32 type t = word end
+functor C_TCFlag_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
+(* from "gmp.h" *)
+structure C_MPLimb = struct open Word32 type t = word end
+functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A)
+
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-10 20:28:00 UTC (rev 4641)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2006-06-11 02:37:23 UTC (rev 4642)
@@ -9,39 +9,25 @@
structure MLtonWorld: MLTON_WORLD =
struct
structure Prim = Primitive.MLton.World
+ structure Error = PosixError
+ structure SysCall = Error.SysCall
val gcState = Primitive.MLton.GCState.gcState
datatype status = Clone | Original
(* Need to worry about:
- * - open file descriptors
* - redetermine buffer status when restart
*)
fun save' (file: string): status =
let
- val fd =
- let
- open Posix.FileSys
- val flags =
- O.flags [O.trunc, PrimitiveFFI.Posix.FileSys.O.BINARY]
- val mode =
- let
- open S
- in
- flags [irusr, iwusr, irgrp, iwgrp, iroth, iwoth]
- end
- in
- createf (file, O_WRONLY, flags, mode)
- handle e =>
- raise Fail (concat ["MLton.World.save unable to open ",
- file, " due to ",
- General.exnMessage e])
- end
- val _ = Prim.save fd
+ val () =
+ SysCall.simple'
+ ({ errVal = true },
+ fn () => Prim.save (NullString.nullTerm file))
in
if Prim.getAmOriginal gcState
- then (Posix.IO.close fd; Original)
+ then Original
else (Prim.setAmOriginal (gcState, true)
; Cleaner.clean Cleaner.atLoadWorld
; Clone)
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml 2006-06-10 20:28:00 UTC (rev 4641)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/primitive/basis-ffi.sml 2006-06-11 02:37:23 UTC (rev 4642)
@@ -1,1411 +1,1411 @@
-(* This file is automatically generated. Do not edit. *)
-
-local open Primitive in
-structure PrimitiveFFI =
-struct
-structure CommandLine =
-struct
-val (argcGet, argcSet) = _symbol "CommandLine_argc": (unit -> (C_Int.t)) * ((C_Int.t) -> unit);
-val (argvGet, argvSet) = _symbol "CommandLine_argv": (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
-val (commandNameGet, commandNameSet) = _symbol "CommandLine_commandName": (unit -> (C_String.t)) * ((C_String.t) -> unit);
-end
-structure Cygwin =
-struct
-val toFullWindowsPath = _import "Cygwin_toFullWindowsPath" : NullString8.t -> C_String.t;
-end
-structure Date =
-struct
-val gmTime = _import "Date_gmTime" : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
-val localOffset = _import "Date_localOffset" : unit -> C_Double.t;
-val localTime = _import "Date_localTime" : (C_Time.t) ref -> (C_Int.t) C_Errno.t;
-val mkTime = _import "Date_mkTime" : unit -> (C_Time.t) C_Errno.t;
-val strfTime = _import "Date_strfTime" : (Char8.t) array * C_Size.t * NullString8.t -> C_Size.t;
-structure Tm =
-struct
-val getHour = _import "Date_Tm_getHour" : unit -> C_Int.t;
-val getIsDst = _import "Date_Tm_getIsDst" : unit -> C_Int.t;
-val getMDay = _import "Date_Tm_getMDay" : unit -> C_Int.t;
-val getMin = _import "Date_Tm_getMin" : unit -> C_Int.t;
-val getMon = _import "Date_Tm_getMon" : unit -> C_Int.t;
-val getSec = _import "Date_Tm_getSec" : unit -> C_Int.t;
-val getWDay = _import "Date_Tm_getWDay" : unit -> C_Int.t;
-val getYDay = _import "Date_Tm_getYDay" : unit -> C_Int.t;
-val getYear = _import "Date_Tm_getYear" : unit -> C_Int.t;
-val setHour = _import "Date_Tm_setHour" : C_Int.t -> unit;
-val setIsDst = _import "Date_Tm_setIsDst" : C_Int.t -> unit;
-val setMDay = _import "Date_Tm_setMDay" : C_Int.t -> unit;
-val setMin = _import "Date_Tm_setMin" : C_Int.t -> unit;
-val setMon = _import "Date_Tm_setMon" : C_Int.t -> unit;
-val setSec = _import "Date_Tm_setSec" : C_Int.t -> unit;
-val setWDay = _import "Date_Tm_setWDay" : C_Int.t -> unit;
-val setYDay = _import "Date_Tm_setYDay" : C_Int.t -> unit;
-val setYear = _import "Date_Tm_setYear" : C_Int.t -> unit;
-end
-end
-structure IEEEReal =
-struct
-structure FloatClass =
-struct
-val FP_INFINITE = _const "IEEEReal_FloatClass_FP_INFINITE" : C_Int.t;
-val FP_NAN = _const "IEEEReal_FloatClass_FP_NAN" : C_Int.t;
-val FP_NORMAL = _const "IEEEReal_FloatClass_FP_NORMAL" : C_Int.t;
-val FP_SUBNORMAL = _const "IEEEReal_FloatClass_FP_SUBNORMAL" : C_Int.t;
-val FP_ZERO = _const "IEEEReal_FloatClass_FP_ZERO" : C_Int.t;
-end
-val getRoundingMode = _import "IEEEReal_getRoundingMode" : unit -> C_Int.t;
-structure RoundingMode =
-struct
-val FE_DOWNWARD = _const "IEEEReal_RoundingMode_FE_DOWNWARD" : C_Int.t;
-val FE_NOSUPPORT = _const "IEEEReal_RoundingMode_FE_NOSUPPORT" : C_Int.t;
-val FE_TONEAREST = _const "IEEEReal_RoundingMode_FE_TONEAREST" : C_Int.t;
-val FE_TOWARDZERO = _const "IEEEReal_RoundingMode_FE_TOWARDZERO" : C_Int.t;
-val FE_UPWARD = _const "IEEEReal_RoundingMode_FE_UPWARD" : C_Int.t;
-end
-val setRoundingMode = _import "IEEEReal_setRoundingMode" : C_Int.t -> unit;
-end
-structure MLton =
-struct
-val bug = _import "MLton_bug" : NullString8.t -> unit;
-structure Itimer =
-struct
-val PROF = _const "MLton_Itimer_PROF" : C_Int.t;
-val REAL = _const "MLton_Itimer_REAL" : C_Int.t;
-val set = _import "MLton_Itimer_set" : C_Int.t * C_Time.t * C_SUSeconds.t * C_Time.t * C_SUSeconds.t -> (C_Int.t) C_Errno.t;
-val VIRTUAL = _const "MLton_Itimer_VIRTUAL" : C_Int.t;
-end
-structure Process =
-struct
-val cwait = _import "MLton_Process_cwait" : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
-val spawne = _import "MLton_Process_spawne" : NullString8.t * NullString8Array.t * NullString8Array.t -> (C_Int.t) C_Errno.t;
-val spawnp = _import "MLton_Process_spawnp" : NullString8.t * NullString8Array.t -> (C_Int.t) C_Errno.t;
-end
-structure Rlimit =
-struct
-val AS = _const "MLton_Rlimit_AS" : C_Int.t;
-val CORE = _const "MLton_Rlimit_CORE" : C_Int.t;
-val CPU = _const "MLton_Rlimit_CPU" : C_Int.t;
-val DATA = _const "MLton_Rlimit_DATA" : C_Int.t;
-val FSIZE = _const "MLton_Rlimit_FSIZE" : C_Int.t;
-val get = _import "MLton_Rlimit_get" : C_Int.t -> (C_Int.t) C_Errno.t;
-val getHard = _import "MLton_Rlimit_getHard" : unit -> C_RLim.t;
-val getSoft = _import "MLton_Rlimit_getSoft" : unit -> C_RLim.t;
-val INFINITY = _const "MLton_Rlimit_INFINITY" : C_RLim.t;
-val NOFILE = _const "MLton_Rlimit_NOFILE" : C_Int.t;
-val set = _import "MLton_Rlimit_set" : C_Int.t * C_RLim.t * C_RLim.t -> (C_Int.t) C_Errno.t;
-val STACK = _const "MLton_Rlimit_STACK" : C_Int.t;
-end
-structure Rusage =
-struct
-val children_stime_sec = _import "MLton_Rusage_children_stime_sec" : unit -> C_Time.t;
-val children_stime_usec = _import "MLton_Rusage_children_stime_usec" : unit -> C_SUSeconds.t;
-val children_utime_sec = _import "MLton_Rusage_children_utime_sec" : unit -> C_Time.t;
-val children_utime_usec = _import "MLton_Rusage_children_utime_usec" : unit -> C_SUSeconds.t;
-val gc_stime_sec = _import "MLton_Rusage_gc_stime_sec" : unit -> C_Time.t;
-val gc_stime_usec = _import "MLton_Rusage_gc_stime_usec" : unit -> C_SUSeconds.t;
-val gc_utime_sec = _import "MLton_Rusage_gc_utime_sec" : unit -> C_Time.t;
-val gc_utime_usec = _import "MLton_Rusage_gc_utime_usec" : unit -> C_SUSeconds.t;
-val getrusage = _import "MLton_Rusage_getrusage" : unit -> unit;
-val self_stime_sec = _import "MLton_Rusage_self_stime_sec" : unit -> C_Time.t;
-val self_stime_usec = _import "MLton_Rusage_self_stime_usec" : unit -> C_SUSeconds.t;
-val self_utime_sec = _import "MLton_Rusage_self_utime_sec" : unit -> C_Time.t;
-val self_utime_usec = _import "MLton_Rusage_self_utime_usec" : unit -> C_SUSeconds.t;
-end
-structure Syslog =
-struct
-val closelog = _import "MLton_Syslog_closelog" : unit -> unit;
-structure Facility =
-struct
-val LOG_AUTH = _const "MLton_Syslog_Facility_LOG_AUTH" : C_Int.t;
-val LOG_CRON = _const "MLton_Syslog_Facility_LOG_CRON" : C_Int.t;
-val LOG_DAEMON = _const "MLton_Syslog_Facility_LOG_DAEMON" : C_Int.t;
-val LOG_KERN = _const "MLton_Syslog_Facility_LOG_KERN" : C_Int.t;
-val LOG_LOCAL0 = _const "MLton_Syslog_Facility_LOG_LOCAL0" : C_Int.t;
-val LOG_LOCAL1 = _const "MLton_Syslog_Facility_LOG_LOCAL1" : C_Int.t;
-val LOG_LOCAL2 = _const "MLton_Syslog_Facility_LOG_LOCAL2" : C_Int.t;
-val LOG_LOCAL3 = _const "MLton_Syslog_Facility_LOG_LOCAL3" : C_Int.t;
-val LOG_LOCAL4 = _const "MLton_Syslog_Facility_LOG_LOCAL4" : C_Int.t;
-val LOG_LOCAL5 = _const "MLton_Syslog_Facility_LOG_LOCAL5" : C_Int.t;
-val LOG_LOCAL6 = _const "MLton_Syslog_Facility_LOG_LOCAL6" : C_Int.t;
-val LOG_LOCAL7 = _const "MLton_Syslog_Facility_LOG_LOCAL7" : C_Int.t;
-val LOG_LPR = _const "MLton_Syslog_Facility_LOG_LPR" : C_Int.t;
-val LOG_MAIL = _const "MLton_Syslog_Facility_LOG_MAIL" : C_Int.t;
-val LOG_NEWS = _const "MLton_Syslog_Facility_LOG_NEWS" : C_Int.t;
-val LOG_USER = _const "MLton_Syslog_Facility_LOG_USER" : C_Int.t;
-val LOG_UUCP = _const "MLton_Syslog_Facility_LOG_UUCP" : C_Int.t;
-end
-structure Logopt =
-struct
-val LOG_CONS = _const "MLton_Syslog_Logopt_LOG_CONS" : C_Int.t;
-val LOG_NDELAY = _const "MLton_Syslog_Logopt_LOG_NDELAY" : C_Int.t;
-val LOG_NOWAIT = _const "MLton_Syslog_Logopt_LOG_NOWAIT" : C_Int.t;
-val LOG_ODELAY = _const "MLton_Syslog_Logopt_LOG_ODELAY" : C_Int.t;
-val LOG_PID = _const "MLton_Syslog_Logopt_LOG_PID" : C_Int.t;
-end
-val openlog = _import "MLton_Syslog_openlog" : NullString8.t * C_Int.t * C_Int.t -> unit;
-structure Severity =
-struct
-val LOG_ALERT = _const "MLton_Syslog_Severity_LOG_ALERT" : C_Int.t;
-val LOG_CRIT = _const "MLton_Syslog_Severity_LOG_CRIT" : C_Int.t;
-val LOG_DEBUG = _const "MLton_Syslog_Severity_LOG_DEBUG" : C_Int.t;
-val LOG_EMERG = _const "MLton_Syslog_Severity_LOG_EMERG" : C_Int.t;
-val LOG_ERR = _const "MLton_Syslog_Severity_LOG_ERR" : C_Int.t;
-val LOG_INFO = _const "MLton_Syslog_Severity_LOG_INFO" : C_Int.t;
-val LOG_NOTICE = _const "MLton_Syslog_Severity_LOG_NOTICE" : C_Int.t;
-val LOG_WARNING = _const "MLton_Syslog_Severity_LOG_WARNING" : C_Int.t;
-end
-val syslog = _import "MLton_Syslog_syslog" : C_Int.t * NullString8.t -> unit;
-end
-end
-structure Net =
-struct
-val htonl = _import "Net_htonl" : Word32.t -> Word32.t;
-val htons = _import "Net_htons" : Word16.t -> Word16.t;
-val ntohl = _import "Net_ntohl" : Word32.t -> Word32.t;
-val ntohs = _import "Net_ntohs" : Word16.t -> Word16.t;
-end
-structure NetHostDB =
-struct
-val getByAddress = _import "NetHostDB_getByAddress" : (Word8.t) vector * C_Socklen.t -> Bool.t;
-val getByName = _import "NetHostDB_getByName" : NullString8.t -> Bool.t;
-val getEntryAddrsN = _import "NetHostDB_getEntryAddrsN" : C_Int.t * (Word8.t) array -> unit;
-val getEntryAddrsNum = _import "NetHostDB_getEntryAddrsNum" : unit -> C_Int.t;
-val getEntryAddrType = _import "NetHostDB_getEntryAddrType" : unit -> C_Int.t;
-val getEntryAliasesN = _import "NetHostDB_getEntryAliasesN" : C_Int.t -> C_String.t;
-val getEntryAliasesNum = _import "NetHostDB_getEntryAliasesNum" : unit -> C_Int.t;
-val getEntryLength = _import "NetHostDB_getEntryLength" : unit -> C_Int.t;
-val getEntryName = _import "NetHostDB_getEntryName" : unit -> C_String.t;
-val getHostName = _import "NetHostDB_getHostName" : (Char8.t) array * C_Size.t -> (C_Int.t) C_Errno.t;
-val INADDR_ANY = _const "NetHostDB_INADDR_ANY" : C_Int.t;
-val inAddrSize = _const "NetHostDB_inAddrSize" : C_Size.t;
-end
-structure NetProtDB =
-struct
-val getByName = _import "NetProtDB_getByName" : NullString8.t -> Bool.t;
-val getByNumber = _import "NetProtDB_getByNumber" : C_Int.t -> Bool.t;
-val getEntryAliasesN = _import "NetProtDB_getEntryAliasesN" : C_Int.t -> C_String.t;
-val getEntryAliasesNum = _import "NetProtDB_getEntryAliasesNum" : unit -> C_Int.t;
-val getEntryName = _import "NetProtDB_getEntryName" : unit -> C_String.t;
-val getEntryProto = _import "NetProtDB_getEntryProto" : unit -> C_Int.t;
-end
-structure NetServDB =
-struct
-val getByName = _import "NetServDB_getByName" : NullString8.t * NullString8.t -> Bool.t;
-val getByNameNull = _import "NetServDB_getByNameNull" : NullString8.t -> Bool.t;
-val getByPort = _import "NetServDB_getByPort" : C_Int.t * NullString8.t -> Bool.t;
-val getByPortNull = _import "NetServDB_getByPortNull" : C_Int.t -> Bool.t;
-val getEntryAliasesN = _import "NetServDB_getEntryAliasesN" : C_Int.t -> C_String.t;
-val getEntryAliasesNum = _import "NetServDB_getEntryAliasesNum" : unit -> C_Int.t;
-val getEntryName = _import "NetServDB_getEntryName" : unit -> C_String.t;
-val getEntryPort = _import "NetServDB_getEntryPort" : unit -> C_Int.t;
-val getEntryProto = _import "NetServDB_getEntryProto" : unit -> C_String.t;
-end
-structure OS =
-struct
-structure IO =
-struct
-val poll = _import "OS_IO_poll" : (C_Fd.t) vector * (C_Short.t) vector * C_NFds.t * C_Int.t * (C_Short.t) array -> (C_Int.t) C_Errno.t;
-val POLLIN = _const "OS_IO_POLLIN" : C_Short.t;
-val POLLOUT = _const "OS_IO_POLLOUT" : C_Short.t;
-val POLLPRI = _const "OS_IO_POLLPRI" : C_Short.t;
-end
-end
-structure PackReal32 =
-struct
-val subArr = _import "PackReal32_subArr" : (Word8.t) array * C_Ptrdiff.t -> Real32.t;
-val subArrRev = _import "PackReal32_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Real32.t;
-val subVec = _import "PackReal32_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Real32.t;
-val subVecRev = _import "PackReal32_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Real32.t;
-val update = _import "PackReal32_update" : (Word8.t) array * C_Ptrdiff.t * Real32.t -> unit;
-val updateRev = _import "PackReal32_updateRev" : (Word8.t) array * C_Ptrdiff.t * Real32.t -> unit;
-end
-structure PackReal64 =
-struct
-val subArr = _import "PackReal64_subArr" : (Word8.t) array * C_Ptrdiff.t -> Real64.t;
-val subArrRev = _import "PackReal64_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Real64.t;
-val subVec = _import "PackReal64_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Real64.t;
-val subVecRev = _import "PackReal64_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Real64.t;
-val update = _import "PackReal64_update" : (Word8.t) array * C_Ptrdiff.t * Real64.t -> unit;
-val updateRev = _import "PackReal64_updateRev" : (Word8.t) array * C_Ptrdiff.t * Real64.t -> unit;
-end
-structure PackWord16 =
-struct
-val subArr = _import "PackWord16_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word16.t;
-val subArrRev = _import "PackWord16_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word16.t;
-val subVec = _import "PackWord16_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word16.t;
-val subVecRev = _import "PackWord16_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word16.t;
-val update = _import "PackWord16_update" : (Word8.t) array * C_Ptrdiff.t * Word16.t -> unit;
-val updateRev = _import "PackWord16_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word16.t -> unit;
-end
-structure PackWord32 =
-struct
-val subArr = _import "PackWord32_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word32.t;
-val subArrRev = _import "PackWord32_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word32.t;
-val subVec = _import "PackWord32_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word32.t;
-val subVecRev = _import "PackWord32_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word32.t;
-val update = _import "PackWord32_update" : (Word8.t) array * C_Ptrdiff.t * Word32.t -> unit;
-val updateRev = _import "PackWord32_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word32.t -> unit;
-end
-structure PackWord64 =
-struct
-val subArr = _import "PackWord64_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word64.t;
-val subArrRev = _import "PackWord64_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word64.t;
-val subVec = _import "PackWord64_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word64.t;
-val subVecRev = _import "PackWord64_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word64.t;
-val update = _import "PackWord64_update" : (Word8.t) array * C_Ptrdiff.t * Word64.t -> unit;
-val updateRev = _import "PackWord64_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word64.t -> unit;
-end
-structure PackWord8 =
-struct
-val subArr = _import "PackWord8_subArr" : (Word8.t) array * C_Ptrdiff.t -> Word8.t;
-val subArrRev = _import "PackWord8_subArrRev" : (Word8.t) array * C_Ptrdiff.t -> Word8.t;
-val subVec = _import "PackWord8_subVec" : (Word8.t) vector * C_Ptrdiff.t -> Word8.t;
-val subVecRev = _import "PackWord8_subVecRev" : (Word8.t) vector * C_Ptrdiff.t -> Word8.t;
-val update = _import "PackWord8_update" : (Word8.t) array * C_Ptrdiff.t * Word8.t -> unit;
-val updateRev = _import "PackWord8_updateRev" : (Word8.t) array * C_Ptrdiff.t * Word8.t -> unit;
-end
-structure Posix =
-struct
-structure Error =
-struct
-val clearErrno = _import "Posix_Error_clearErrno" : unit -> unit;
-val E2BIG = _const "Posix_Error_E2BIG" : C_Int.t;
-val EACCES = _const "Posix_Error_EACCES" : C_Int.t;
-val EADDRINUSE = _const "Posix_Error_EADDRINUSE" : C_Int.t;
-val EADDRNOTAVAIL = _const "Posix_Error_EADDRNOTAVAIL" : C_Int.t;
-val EAFNOSUPPORT = _const "Posix_Error_EAFNOSUPPORT" : C_Int.t;
-val EAGAIN = _const "Posix_Error_EAGAIN" : C_Int.t;
-val EALREADY = _const "Posix_Error_EALREADY" : C_Int.t;
-val EBADF = _const "Posix_Error_EBADF" : C_Int.t;
-val EBADMSG = _const "Posix_Error_EBADMSG" : C_Int.t;
-val EBUSY = _const "Posix_Error_EBUSY" : C_Int.t;
-val ECANCELED = _const "Posix_Error_ECANCELED" : C_Int.t;
-val ECHILD = _const "Posix_Error_ECHILD" : C_Int.t;
-val ECONNABORTED = _const "Posix_Error_ECONNABORTED" : C_Int.t;
-val ECONNREFUSED = _const "Posix_Error_ECONNREFUSED" : C_Int.t;
-val ECONNRESET = _const "Posix_Error_ECONNRESET" : C_Int.t;
-val EDEADLK = _const "Posix_Error_EDEADLK" : C_Int.t;
-val EDESTADDRREQ = _const "Posix_Error_EDESTADDRREQ" : C_Int.t;
-val EDOM = _const "Posix_Error_EDOM" : C_Int.t;
-val EDQUOT = _const "Posix_Error_EDQUOT" : C_Int.t;
-val EEXIST = _const "Posix_Error_EEXIST" : C_Int.t;
-val EFAULT = _const "Posix_Error_EFAULT" : C_Int.t;
-val EFBIG = _const "Posix_Error_EFBIG" : C_Int.t;
-val EHOSTUNREACH = _const "Posix_Error_EHOSTUNREACH" : C_Int.t;
-val EIDRM = _const "Posix_Error_EIDRM" : C_Int.t;
-val EILSEQ = _const "Posix_Error_EILSEQ" : C_Int.t;
-val EINPROGRESS = _const "Posix_Error_EINPROGRESS" : C_Int.t;
-val EINTR = _const "Posix_Error_EINTR" : C_Int.t;
-val EINVAL = _const "Posix_Error_EINVAL" : C_Int.t;
-val EIO = _const "Posix_Error_EIO" : C_Int.t;
-val EISCONN = _const "Posix_Error_EISCONN" : C_Int.t;
-val EISDIR = _const "Posix_Error_EISDIR" : C_Int.t;
-val ELOOP = _const "Posix_Error_ELOOP" : C_Int.t;
-val EMFILE = _const "Posix_Error_EMFILE" : C_Int.t;
-val EMLINK = _const "Posix_Error_EMLINK" : C_Int.t;
-val EMSGSIZE = _const "Posix_Error_EMSGSIZE" : C_Int.t;
-val EMULTIHOP = _const "Posix_Error_EMULTIHOP" : C_Int.t;
-val ENAMETOOLONG = _const "Posix_Error_ENAMETOOLONG" : C_Int.t;
-val ENETDOWN = _const "Posix_Error_ENETDOWN" : C_Int.t;
-val ENETRESET = _const "Posix_Error_ENETRESET" : C_Int.t;
-val ENETUNREACH = _const "Posix_Error_ENETUNREACH" : C_Int.t;
-val ENFILE = _const "Posix_Error_ENFILE" : C_Int.t;
-val ENOBUFS = _const "Posix_Error_ENOBUFS" : C_Int.t;
-val ENODATA = _const "Posix_Error_ENODATA" : C_Int.t;
-val ENODEV = _const "Posix_Error_ENODEV" : C_Int.t;
-val ENOENT = _const "Posix_Error_ENOENT" : C_Int.t;
-val ENOEXEC = _const "Posix_Error_ENOEXEC" : C_Int.t;
-val ENOLCK = _const "Posix_Error_ENOLCK" : C_Int.t;
-val ENOLINK = _const "Posix_Error_ENOLINK" : C_Int.t;
-val ENOMEM = _const "Posix_Error_ENOMEM" : C_Int.t;
-val ENOMSG = _const "Posix_Error_ENOMSG" : C_Int.t;
-val ENOPROTOOPT = _const "Posix_Error_ENOPROTOOPT" : C_Int.t;
-val ENOSPC = _const "Posix_Error_ENOSPC" : C_Int.t;
-val ENOSR = _const "Posix_Error_ENOSR" : C_Int.t;
-val ENOSTR = _const "Posix_Error_ENOSTR" : C_Int.t;
-val ENOSYS = _const "Posix_Error_ENOSYS" : C_Int.t;
-val ENOTCONN = _const "Posix_Error_ENOTCONN" : C_Int.t;
-val ENOTDIR = _const "Posix_Error_ENOTDIR" : C_Int.t;
-val ENOTEMPTY = _const "Posix_Error_ENOTEMPTY" : C_Int.t;
-val ENOTSOCK = _const "Posix_Error_ENOTSOCK" : C_Int.t;
-val ENOTSUP = _const "Posix_Error_ENOTSUP" : C_Int.t;
-val ENOTTY = _const "Posix_Error_ENOTTY" : C_Int.t;
-val ENXIO = _const "Posix_Error_ENXIO" : C_Int.t;
-val EOPNOTSUPP = _const "Posix_Error_EOPNOTSUPP" : C_Int.t;
-val EOVERFLOW = _const "Posix_Error_EOVERFLOW" : C_Int.t;
-val EPERM = _const "Posix_Error_EPERM" : C_Int.t;
-val EPIPE = _const "Posix_Error_EPIPE" : C_Int.t;
-val EPROTO = _const "Posix_Error_EPROTO" : C_Int.t;
-val EPROTONOSUPPORT = _const "Posix_Error_EPROTONOSUPPORT" : C_Int.t;
-val EPROTOTYPE = _const "Posix_Error_EPROTOTYPE" : C_Int.t;
-val ERANGE = _const "Posix_Error_ERANGE" : C_Int.t;
-val EROFS = _const "Posix_Error_EROFS" : C_Int.t;
-val ESPIPE = _const "Posix_Error_ESPIPE" : C_Int.t;
-val ESRCH = _const "Posix_Error_ESRCH" : C_Int.t;
-val ESTALE = _const "Posix_Error_ESTALE" : C_Int.t;
-val ETIME = _const "Posix_Error_ETIME" : C_Int.t;
-val ETIMEDOUT = _const "Posix_Error_ETIMEDOUT" : C_Int.t;
-val ETXTBSY = _const "Posix_Error_ETXTBSY" : C_Int.t;
-val EWOULDBLOCK = _const "Posix_Error_EWOULDBLOCK" : C_Int.t;
-val EXDEV = _const "Posix_Error_EXDEV" : C_Int.t;
-val getErrno = _import "Posix_Error_getErrno" : unit -> C_Int.t;
-val strError = _import "Posix_Error_strError" : C_Int.t -> C_String.t;
-end
-structure FileSys =
-struct
-structure A =
-struct
-val F_OK = _const "Posix_FileSys_A_F_OK" : C_Int.t;
-val R_OK = _const "Posix_FileSys_A_R_OK" : C_Int.t;
-val W_OK = _const "Posix_FileSys_A_W_OK" : C_Int.t;
-val X_OK = _const "Posix_FileSys_A_X_OK" : C_Int.t;
-end
-val access = _import "Posix_FileSys_access" : NullString8.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val chdir = _import "Posix_FileSys_chdir" : NullString8.t -> (C_Int.t) C_Errno.t;
-val chmod = _import "Posix_FileSys_chmod" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-val chown = _import "Posix_FileSys_chown" : NullString8.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
-structure Dirstream =
-struct
-val closeDir = _import "Posix_FileSys_Dirstream_closeDir" : C_DirP.t -> (C_Int.t) C_Errno.t;
-val openDir = _import "Posix_FileSys_Dirstream_openDir" : NullString8.t -> (C_DirP.t) C_Errno.t;
-val readDir = _import "Posix_FileSys_Dirstream_readDir" : C_DirP.t -> (C_String.t) C_Errno.t;
-val rewindDir = _import "Posix_FileSys_Dirstream_rewindDir" : C_DirP.t -> unit;
-end
-val fchdir = _import "Posix_FileSys_fchdir" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val fchmod = _import "Posix_FileSys_fchmod" : C_Fd.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-val fchown = _import "Posix_FileSys_fchown" : C_Fd.t * C_UId.t * C_GId.t -> (C_Int.t) C_Errno.t;
-val fpathconf = _import "Posix_FileSys_fpathconf" : C_Fd.t * C_Int.t -> (C_Long.t) C_Errno.t;
-val ftruncate = _import "Posix_FileSys_ftruncate" : C_Fd.t * C_Off.t -> (C_Int.t) C_Errno.t;
-val getcwd = _import "Posix_FileSys_getcwd" : (Char8.t) array * C_Size.t -> (C_String.t) C_Errno.t;
-val link = _import "Posix_FileSys_link" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val mkdir = _import "Posix_FileSys_mkdir" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-val mkfifo = _import "Posix_FileSys_mkfifo" : NullString8.t * C_Mode.t -> (C_Int.t) C_Errno.t;
-structure O =
-struct
-val APPEND = _const "Posix_FileSys_O_APPEND" : C_Int.t;
-val BINARY = _const "Posix_FileSys_O_BINARY" : C_Int.t;
-val CREAT = _const "Posix_FileSys_O_CREAT" : C_Int.t;
-val DSYNC = _const "Posix_FileSys_O_DSYNC" : C_Int.t;
-val EXCL = _const "Posix_FileSys_O_EXCL" : C_Int.t;
-val NOCTTY = _const "Posix_FileSys_O_NOCTTY" : C_Int.t;
-val NONBLOCK = _const "Posix_FileSys_O_NONBLOCK" : C_Int.t;
-val RDONLY = _const "Posix_FileSys_O_RDONLY" : C_Int.t;
-val RDWR = _const "Posix_FileSys_O_RDWR" : C_Int.t;
-val RSYNC = _const "Posix_FileSys_O_RSYNC" : C_Int.t;
-val SYNC = _const "Posix_FileSys_O_SYNC" : C_Int.t;
-val TEXT = _const "Posix_FileSys_O_TEXT" : C_Int.t;
-val TRUNC = _const "Posix_FileSys_O_TRUNC" : C_Int.t;
-val WRONLY = _const "Posix_FileSys_O_WRONLY" : C_Int.t;
-end
-val open2 = _import "Posix_FileSys_open2" : NullString8.t * C_Int.t -> (C_Fd.t) C_Errno.t;
-val open3 = _import "Posix_FileSys_open3" : NullString8.t * C_Int.t * C_Mode.t -> (C_Fd.t) C_Errno.t;
-val pathconf = _import "Posix_FileSys_pathconf" : NullString8.t * C_Int.t -> (C_Long.t) C_Errno.t;
-structure PC =
-struct
-val ALLOC_SIZE_MIN = _const "Posix_FileSys_PC_ALLOC_SIZE_MIN" : C_Int.t;
-val ASYNC_IO = _const "Posix_FileSys_PC_ASYNC_IO" : C_Int.t;
-val CHOWN_RESTRICTED = _const "Posix_FileSys_PC_CHOWN_RESTRICTED" : C_Int.t;
-val FILESIZEBITS = _const "Posix_FileSys_PC_FILESIZEBITS" : C_Int.t;
-val LINK_MAX = _const "Posix_FileSys_PC_LINK_MAX" : C_Int.t;
-val MAX_CANON = _const "Posix_FileSys_PC_MAX_CANON" : C_Int.t;
-val MAX_INPUT = _const "Posix_FileSys_PC_MAX_INPUT" : C_Int.t;
-val NAME_MAX = _const "Posix_FileSys_PC_NAME_MAX" : C_Int.t;
-val NO_TRUNC = _const "Posix_FileSys_PC_NO_TRUNC" : C_Int.t;
-val PATH_MAX = _const "Posix_FileSys_PC_PATH_MAX" : C_Int.t;
-val PIPE_BUF = _const "Posix_FileSys_PC_PIPE_BUF" : C_Int.t;
-val PRIO_IO = _const "Posix_FileSys_PC_PRIO_IO" : C_Int.t;
-val REC_INCR_XFER_SIZE = _const "Posix_FileSys_PC_REC_INCR_XFER_SIZE" : C_Int.t;
-val REC_MAX_XFER_SIZE = _const "Posix_FileSys_PC_REC_MAX_XFER_SIZE" : C_Int.t;
-val REC_MIN_XFER_SIZE = _const "Posix_FileSys_PC_REC_MIN_XFER_SIZE" : C_Int.t;
-val REC_XFER_ALIGN = _const "Posix_FileSys_PC_REC_XFER_ALIGN" : C_Int.t;
-val SYMLINK_MAX = _const "Posix_FileSys_PC_SYMLINK_MAX" : C_Int.t;
-val SYNC_IO = _const "Posix_FileSys_PC_SYNC_IO" : C_Int.t;
-val TWO_SYMLINKS = _const "Posix_FileSys_PC_TWO_SYMLINKS" : C_Int.t;
-val VDISABLE = _const "Posix_FileSys_PC_VDISABLE" : C_Int.t;
-end
-val readlink = _import "Posix_FileSys_readlink" : NullString8.t * (Char8.t) array * C_Size.t -> (C_SSize.t) C_Errno.t;
-val rename = _import "Posix_FileSys_rename" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val rmdir = _import "Posix_FileSys_rmdir" : NullString8.t -> (C_Int.t) C_Errno.t;
-structure S =
-struct
-val IFBLK = _const "Posix_FileSys_S_IFBLK" : C_Mode.t;
-val IFCHR = _const "Posix_FileSys_S_IFCHR" : C_Mode.t;
-val IFDIR = _const "Posix_FileSys_S_IFDIR" : C_Mode.t;
-val IFIFO = _const "Posix_FileSys_S_IFIFO" : C_Mode.t;
-val IFLNK = _const "Posix_FileSys_S_IFLNK" : C_Mode.t;
-val IFMT = _const "Posix_FileSys_S_IFMT" : C_Mode.t;
-val IFREG = _const "Posix_FileSys_S_IFREG" : C_Mode.t;
-val IFSOCK = _const "Posix_FileSys_S_IFSOCK" : C_Mode.t;
-val IRGRP = _const "Posix_FileSys_S_IRGRP" : C_Mode.t;
-val IROTH = _const "Posix_FileSys_S_IROTH" : C_Mode.t;
-val IRUSR = _const "Posix_FileSys_S_IRUSR" : C_Mode.t;
-val IRWXG = _const "Posix_FileSys_S_IRWXG" : C_Mode.t;
-val IRWXO = _const "Posix_FileSys_S_IRWXO" : C_Mode.t;
-val IRWXU = _const "Posix_FileSys_S_IRWXU" : C_Mode.t;
-val ISGID = _const "Posix_FileSys_S_ISGID" : C_Mode.t;
-val ISUID = _const "Posix_FileSys_S_ISUID" : C_Mode.t;
-val ISVTX = _const "Posix_FileSys_S_ISVTX" : C_Mode.t;
-val IWGRP = _const "Posix_FileSys_S_IWGRP" : C_Mode.t;
-val IWOTH = _const "Posix_FileSys_S_IWOTH" : C_Mode.t;
-val IWUSR = _const "Posix_FileSys_S_IWUSR" : C_Mode.t;
-val IXGRP = _const "Posix_FileSys_S_IXGRP" : C_Mode.t;
-val IXOTH = _const "Posix_FileSys_S_IXOTH" : C_Mode.t;
-val IXUSR = _const "Posix_FileSys_S_IXUSR" : C_Mode.t;
-end
-structure ST =
-struct
-val isBlk = _import "Posix_FileSys_ST_isBlk" : C_Mode.t -> Bool.t;
-val isChr = _import "Posix_FileSys_ST_isChr" : C_Mode.t -> Bool.t;
-val isDir = _import "Posix_FileSys_ST_isDir" : C_Mode.t -> Bool.t;
-val isFIFO = _import "Posix_FileSys_ST_isFIFO" : C_Mode.t -> Bool.t;
-val isLink = _import "Posix_FileSys_ST_isLink" : C_Mode.t -> Bool.t;
-val isReg = _import "Posix_FileSys_ST_isReg" : C_Mode.t -> Bool.t;
-val isSock = _import "Posix_FileSys_ST_isSock" : C_Mode.t -> Bool.t;
-end
-structure Stat =
-struct
-val fstat = _import "Posix_FileSys_Stat_fstat" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val getATime = _import "Posix_FileSys_Stat_getATime" : unit -> C_Time.t;
-val getCTime = _import "Posix_FileSys_Stat_getCTime" : unit -> C_Time.t;
-val getDev = _import "Posix_FileSys_Stat_getDev" : unit -> C_Dev.t;
-val getGId = _import "Posix_FileSys_Stat_getGId" : unit -> C_GId.t;
-val getINo = _import "Posix_FileSys_Stat_getINo" : unit -> C_INo.t;
-val getMode = _import "Posix_FileSys_Stat_getMode" : unit -> C_Mode.t;
-val getMTime = _import "Posix_FileSys_Stat_getMTime" : unit -> C_Time.t;
-val getNLink = _import "Posix_FileSys_Stat_getNLink" : unit -> C_NLink.t;
-val getRDev = _import "Posix_FileSys_Stat_getRDev" : unit -> C_Dev.t;
-val getSize = _import "Posix_FileSys_Stat_getSize" : unit -> C_Off.t;
-val getUId = _import "Posix_FileSys_Stat_getUId" : unit -> C_UId.t;
-val lstat = _import "Posix_FileSys_Stat_lstat" : NullString8.t -> (C_Int.t) C_Errno.t;
-val stat = _import "Posix_FileSys_Stat_stat" : NullString8.t -> (C_Int.t) C_Errno.t;
-end
-val symlink = _import "Posix_FileSys_symlink" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val truncate = _import "Posix_FileSys_truncate" : NullString8.t * C_Off.t -> (C_Int.t) C_Errno.t;
-val umask = _import "Posix_FileSys_umask" : C_Mode.t -> C_Mode.t;
-val unlink = _import "Posix_FileSys_unlink" : NullString8.t -> (C_Int.t) C_Errno.t;
-structure Utimbuf =
-struct
-val setAcTime = _import "Posix_FileSys_Utimbuf_setAcTime" : C_Time.t -> unit;
-val setModTime = _import "Posix_FileSys_Utimbuf_setModTime" : C_Time.t -> unit;
-val utime = _import "Posix_FileSys_Utimbuf_utime" : NullString8.t -> (C_Int.t) C_Errno.t;
-end
-end
-structure IO =
-struct
-val close = _import "Posix_IO_close" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val dup = _import "Posix_IO_dup" : C_Fd.t -> (C_Fd.t) C_Errno.t;
-val dup2 = _import "Posix_IO_dup2" : C_Fd.t * C_Fd.t -> (C_Fd.t) C_Errno.t;
-val F_DUPFD = _const "Posix_IO_F_DUPFD" : C_Int.t;
-val F_GETFD = _const "Posix_IO_F_GETFD" : C_Int.t;
-val F_GETFL = _const "Posix_IO_F_GETFL" : C_Int.t;
-val F_GETOWN = _const "Posix_IO_F_GETOWN" : C_Int.t;
-val F_SETFD = _const "Posix_IO_F_SETFD" : C_Int.t;
-val F_SETFL = _const "Posix_IO_F_SETFL" : C_Int.t;
-val F_SETOWN = _const "Posix_IO_F_SETOWN" : C_Int.t;
-val fcntl2 = _import "Posix_IO_fcntl2" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val fcntl3 = _import "Posix_IO_fcntl3" : C_Fd.t * C_Int.t * C_Int.t -> (C_Int.t) C_Errno.t;
-structure FD =
-struct
-val CLOEXEC = _const "Posix_IO_FD_CLOEXEC" : C_Int.t;
-end
-structure FLock =
-struct
-val F_GETLK = _const "Posix_IO_FLock_F_GETLK" : C_Int.t;
-val F_RDLCK = _const "Posix_IO_FLock_F_RDLCK" : C_Short.t;
-val F_SETLK = _const "Posix_IO_FLock_F_SETLK" : C_Int.t;
-val F_SETLKW = _const "Posix_IO_FLock_F_SETLKW" : C_Int.t;
-val F_UNLCK = _const "Posix_IO_FLock_F_UNLCK" : C_Short.t;
-val F_WRLCK = _const "Posix_IO_FLock_F_WRLCK" : C_Short.t;
-val fcntl = _import "Posix_IO_FLock_fcntl" : C_Fd.t * C_Int.t -> (C_Int.t) C_Errno.t;
-val getLen = _import "Posix_IO_FLock_getLen" : unit -> C_Off.t;
-val getPId = _import "Posix_IO_FLock_getPId" : unit -> C_PId.t;
-val getStart = _import "Posix_IO_FLock_getStart" : unit -> C_Off.t;
-val getType = _import "Posix_IO_FLock_getType" : unit -> C_Short.t;
-val getWhence = _import "Posix_IO_FLock_getWhence" : unit -> C_Short.t;
-val SEEK_CUR = _const "Posix_IO_FLock_SEEK_CUR" : C_Short.t;
-val SEEK_END = _const "Posix_IO_FLock_SEEK_END" : C_Short.t;
-val SEEK_SET = _const "Posix_IO_FLock_SEEK_SET" : C_Short.t;
-val setLen = _import "Posix_IO_FLock_setLen" : C_Off.t -> unit;
-val setPId = _import "Posix_IO_FLock_setPId" : C_PId.t -> unit;
-val setStart = _import "Posix_IO_FLock_setStart" : C_Off.t -> unit;
-val setType = _import "Posix_IO_FLock_setType" : C_Short.t -> unit;
-val setWhence = _import "Posix_IO_FLock_setWhence" : C_Short.t -> unit;
-end
-val fsync = _import "Posix_IO_fsync" : C_Fd.t -> (C_Int.t) C_Errno.t;
-val lseek = _import "Posix_IO_lseek" : C_Fd.t * C_Off.t * C_Int.t -> (C_Off.t) C_Errno.t;
-val O_ACCMODE = _const "Posix_IO_O_ACCMODE" : C_Int.t;
-val pipe = _import "Posix_IO_pipe" : (C_Fd.t) array -> (C_Int.t) C_Errno.t;
-val readChar8 = _import "Posix_IO_readChar8" : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val readWord8 = _import "Posix_IO_readWord8" : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val SEEK_CUR = _const "Posix_IO_SEEK_CUR" : C_Int.t;
-val SEEK_END = _const "Posix_IO_SEEK_END" : C_Int.t;
-val SEEK_SET = _const "Posix_IO_SEEK_SET" : C_Int.t;
-val setbin = _import "Posix_IO_setbin" : C_Fd.t -> unit;
-val settext = _import "Posix_IO_settext" : C_Fd.t -> unit;
-val writeChar8Arr = _import "Posix_IO_writeChar8Arr" : C_Fd.t * (Char8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val writeChar8Vec = _import "Posix_IO_writeChar8Vec" : C_Fd.t * (Char8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val writeWord8Arr = _import "Posix_IO_writeWord8Arr" : C_Fd.t * (Word8.t) array * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-val writeWord8Vec = _import "Posix_IO_writeWord8Vec" : C_Fd.t * (Word8.t) vector * C_Int.t * C_Size.t -> (C_SSize.t) C_Errno.t;
-end
-structure ProcEnv =
-struct
-val ctermid = _import "Posix_ProcEnv_ctermid" : unit -> C_String.t;
-val (environGet, environSet) = _symbol "Posix_ProcEnv_environ": (unit -> (C_StringArray.t)) * ((C_StringArray.t) -> unit);
-val getegid = _import "Posix_ProcEnv_getegid" : unit -> C_GId.t;
-val getenv = _import "Posix_ProcEnv_getenv" : NullString8.t -> C_String.t;
-val geteuid = _import "Posix_ProcEnv_geteuid" : unit -> C_UId.t;
-val getgid = _import "Posix_ProcEnv_getgid" : unit -> C_GId.t;
-val getgroups = _import "Posix_ProcEnv_getgroups" : C_Int.t * (C_GId.t) array -> (C_Int.t) C_Errno.t;
-val getgroupsN = _import "Posix_ProcEnv_getgroupsN" : unit -> C_Int.t;
-val getlogin = _import "Posix_ProcEnv_getlogin" : unit -> (C_String.t) C_Errno.t;
-val getpgrp = _import "Posix_ProcEnv_getpgrp" : unit -> C_PId.t;
-val getpid = _import "Posix_ProcEnv_getpid" : unit -> C_PId.t;
-val getppid = _import "Posix_ProcEnv_getppid" : unit -> C_PId.t;
-val getuid = _import "Posix_ProcEnv_getuid" : unit -> C_UId.t;
-val isatty = _import "Posix_ProcEnv_isatty" : C_Fd.t -> Bool.t;
-val SC_2_C_BIND = _const "Posix_ProcEnv_SC_2_C_BIND" : C_Int.t;
-val SC_2_C_DEV = _const "Posix_ProcEnv_SC_2_C_DEV" : C_Int.t;
-val SC_2_CHAR_TERM = _const "Posix_ProcEnv_SC_2_CHAR_TERM" : C_Int.t;
-val SC_2_FORT_DEV = _const "Posix_ProcEnv_SC_2_FORT_DEV" : C_Int.t;
-val SC_2_FORT_RUN = _const "Posix_ProcEnv_SC_2_FORT_RUN" : C_Int.t;
-val SC_2_LOCALEDEF = _const "Posix_ProcEnv_SC_2_LOCALEDEF" : C_Int.t;
-val SC_2_PBS = _const "Posix_ProcEnv_SC_2_PBS" : C_Int.t;
-val SC_2_PBS_ACCOUNTING = _const "Posix_ProcEnv_SC_2_PBS_ACCOUNTING" : C_Int.t;
-val SC_2_PBS_CHECKPOINT = _const "Posix_ProcEnv_SC_2_PBS_CHECKPOINT" : C_Int.t;
-val SC_2_PBS_LOCATE = _const "Posix_ProcEnv_SC_2_PBS_LOCATE" : C_Int.t;
-val SC_2_PBS_MESSAGE = _const "Posix_ProcEnv_SC_2_PBS_MESSAGE" : C_Int.t;
-val SC_2_PBS_TRACK = _const "Posix_ProcEnv_SC_2_PBS_TRACK" : C_Int.t;
-val SC_2_SW_DEV = _const "Posix_ProcEnv_SC_2_SW_DEV" : C_Int.t;
-val SC_2_UPE = _const "Posix_ProcEnv_SC_2_UPE" : C_Int.t;
-val SC_2_VERSION = _const "Posix_ProcEnv_SC_2_VERSION" : C_Int.t;
-val SC_ADVISORY_INFO = _const "Posix_ProcEnv_SC_ADVISORY_INFO" : C_Int.t;
-val SC_AIO_LISTIO_MAX = _const "Posix_ProcEnv_SC_AIO_LISTIO_MAX" : C_Int.t;
-val SC_AIO_MAX = _const "Posix_ProcEnv_SC_AIO_MAX" : C_Int.t;
-val SC_AIO_PRIO_DELTA_MAX = _const "Posix_ProcEnv_SC_AIO_PRIO_DELTA_MAX" : C_Int.t;
-val SC_ARG_MAX = _const "Posix_ProcEnv_SC_ARG_MAX" : C_Int.t;
-val SC_ASYNCHRONOUS_IO = _const "Posix_ProcEnv_SC_ASYNCHRONOUS_IO" : C_Int.t;
-val SC_ATEXIT_MAX = _const "Posix_ProcEnv_SC_ATEXIT_MAX" : C_Int.t;
-val SC_BARRIERS = _const "Posix_ProcEnv_SC_BARRIERS" : C_Int.t;
-val SC_BC_BASE_MAX = _const "Posix_ProcEnv_SC_BC_BASE_MAX" : C_Int.t;
-val SC_BC_DIM_MAX = _const "Posix_ProcEnv_SC_BC_DIM_MAX" : C_Int.t;
-val SC_BC_SCALE_MAX = _const "Posix_ProcEnv_SC_BC_SCALE_MAX" : C_Int.t;
-val SC_BC_STRING_MAX = _const "Posix_ProcEnv_SC_BC_STRING_MAX" : C_Int.t;
-val SC_CHILD_MAX = _const "Posix_ProcEnv_SC_CHILD_MAX" : C_Int.t;
-val SC_CLK_TCK = _const "Posix_ProcEnv_SC_CLK_TCK" : C_Int.t;
-val SC_CLOCK_SELECTION = _const "Posix_ProcEnv_SC_CLOCK_SELECTION" : C_Int.t;
-val SC_COLL_WEIGHTS_MAX = _const "Posix_ProcEnv_SC_COLL_WEIGHTS_MAX" : C_Int.t;
-val SC_CPUTIME = _const "Posix_ProcEnv_SC_CPUTIME" : C_Int.t;
-val SC_DELAYTIMER_MAX = _const "Posix_ProcEnv_SC_DELAYTIMER_MAX" : C_Int.t;
-val SC_EXPR_NEST_MAX = _const "Posix_ProcEnv_SC_EXPR_NEST_MAX" : C_Int.t;
-val SC_FSYNC = _const "Posix_ProcEnv_SC_FSYNC" : C_Int.t;
-val SC_GETGR_R_SIZE_MAX = _const "Posix_ProcEnv_SC_GETGR_R_SIZE_MAX" : C_Int.t;
-val SC_GETPW_R_SIZE_MAX = _const "Posix_ProcEnv_SC_GETPW_R_SIZE_MAX" : C_Int.t;
-val SC_HOST_NAME_MAX = _const "Posix_ProcEnv_SC_HOST_NAME_MAX" : C_Int.t;
-val SC_IOV_MAX = _const "Posix_ProcEnv_SC_IOV_MAX" : C_Int.t;
-val SC_IPV6 = _const "Posix_ProcEnv_SC_IPV6" : C_Int.t;
-val SC_JOB_CONTROL = _const "Posix_ProcEnv_SC_JOB_CONTROL" : C_Int.t;
-val SC_LINE_MAX = _const "Posix_ProcEnv_SC_LINE_MAX" : C_Int.t;
-val SC_LOGIN_NAME_MAX = _const "Posix_ProcEnv_SC_LOGIN_NAME_MAX" : C_Int.t;
-val SC_MAPPED_FILES = _const "Posix_ProcEnv_SC_MAPPED_FILES" : C_Int.t;
-val SC_MEMLOCK = _const "Posix_ProcEnv_SC_MEMLOCK" : C_Int.t;
-val SC_MEMLOCK_RANGE = _const "Posix_ProcEnv_SC_MEMLOCK_RANGE" : C_Int.t;
-val SC_MEMORY_PROTECTION = _const "Posix_ProcEnv_SC_MEMORY_PROTECTION" : C_Int.t;
-val SC_MESSAGE_PASSING = _const "Posix_ProcEnv_SC_MESSAGE_PASSING" : C_Int.t;
-val SC_MONOTONIC_CLOCK = _const "Posix_ProcEnv_SC_MONOTONIC_CLOCK" : C_Int.t;
-val SC_MQ_OPEN_MAX = _const "Posix_ProcEnv_SC_MQ_OPEN_MAX" : C_Int.t;
-val SC_MQ_PRIO_MAX = _const "Posix_ProcEnv_SC_MQ_PRIO_MAX" : C_Int.t;
-val SC_NGROUPS_MAX = _const "Posix_ProcEnv_SC_NGROUPS_MAX" : C_Int.t;
-val SC_OPEN_MAX = _const "Posix_ProcEnv_SC_OPEN_MAX" : C_Int.t;
-val SC_PAGE_SIZE = _const "Posix_ProcEnv_SC_PAGE_SIZE" : C_Int.t;
-val SC_PAGESIZE = _const "Posix_ProcEnv_SC_PAGESIZE" : C_Int.t;
-val SC_PRIORITIZED_IO = _const "Posix_ProcEnv_SC_PRIORITIZED_IO" : C_Int.t;
-val SC_PRIORITY_SCHEDULING = _const "Posix_ProcEnv_SC_PRIORITY_SCHEDULING" : C_Int.t;
-val SC_RAW_SOCKETS = _const "Posix_ProcEnv_SC_RAW_SOCKETS" : C_Int.t;
-val SC_RE_DUP_MAX = _const "Posix_ProcEnv_SC_RE_DUP_MAX" : C_Int.t;
-val SC_READER_WRITER_LOCKS = _const "Posix_ProcEnv_SC_READER_WRITER_LOCKS" : C_Int.t;
-val SC_REALTIME_SIGNALS = _const "Posix_ProcEnv_SC_REALTIME_SIGNALS" : C_Int.t;
-val SC_REGEXP = _const "Posix_ProcEnv_SC_REGEXP" : C_Int.t;
-val SC_RTSIG_MAX = _const "Posix_ProcEnv_SC_RTSIG_MAX" : C_Int.t;
-val SC_SAVED_IDS = _const "Posix_ProcEnv_SC_SAVED_IDS" : C_Int.t;
-val SC_SEM_NSEMS_MAX = _const "Posix_ProcEnv_SC_SEM_NSEMS_MAX" : C_Int.t;
-val SC_SEM_VALUE_MAX = _const "Posix_ProcEnv_SC_SEM_VALUE_MAX" : C_Int.t;
-val SC_SEMAPHORES = _const "Posix_ProcEnv_SC_SEMAPHORES" : C_Int.t;
-val SC_SHARED_MEMORY_OBJECTS = _const "Posix_ProcEnv_SC_SHARED_MEMORY_OBJECTS" : C_Int.t;
-val SC_SHELL = _const "Posix_ProcEnv_SC_SHELL" : C_Int.t;
-val SC_SIGQUEUE_MAX = _const "Posix_ProcEnv_SC_SIGQUEUE_MAX" : C_Int.t;
-val SC_SPAWN = _const "Posix_ProcEnv_SC_SPAWN" : C_Int.t;
-val SC_SPIN_LOCKS = _const "Posix_ProcEnv_SC_SPIN_LOCKS" : C_Int.t;
-val SC_SPORADIC_SERVER = _const "Posix_ProcEnv_SC_SPORADIC_SERVER" : C_Int.t;
-val SC_SS_REPL_MAX = _const "Posix_ProcEnv_SC_SS_REPL_MAX" : C_Int.t;
-val SC_STREAM_MAX = _const "Posix_ProcEnv_SC_STREAM_MAX" : C_Int.t;
-val SC_SYMLOOP_MAX = _const "Posix_ProcEnv_SC_SYMLOOP_MAX" : C_Int.t;
-val SC_SYNCHRONIZED_IO = _const "Posix_ProcEnv_SC_SYNCHRONIZED_IO" : C_Int.t;
-val SC_THREAD_ATTR_STACKADDR = _const "Posix_ProcEnv_SC_THREAD_ATTR_STACKADDR" : C_Int.t;
-val SC_THREAD_ATTR_STACKSIZE = _const "Posix_ProcEnv_SC_THREAD_ATTR_STACKSIZE" : C_Int.t;
-val SC_THREAD_CPUTIME = _const "Posix_ProcEnv_SC_THREAD_CPUTIME" : C_Int.t;
-val SC_THREAD_DESTRUCTOR_ITERATIONS = _const "Posix_ProcEnv_SC_THREAD_DESTRUCTOR_ITERATIONS" : C_Int.t;
-val SC_THREAD_KEYS_MAX = _const "Posix_ProcEnv_SC_THREAD_KEYS_MAX" : C_Int.t;
-val SC_THREAD_PRIO_INHERIT = _const "Posix_ProcEnv_SC_THREAD_PRIO_INHERIT" : C_Int.t;
-val SC_THREAD_PRIO_PROTECT = _const "Posix_ProcEnv_SC_THREAD_PRIO_PROTECT" : C_Int.t;
-val SC_THREAD_PRIORITY_SCHEDULING = _const "Posix_ProcEnv_SC_THREAD_PRIORITY_SCHEDULING" : C_Int.t;
-val SC_THREAD_PROCESS_SHARED = _const "Posix_ProcEnv_SC_THREAD_PROCESS_SHARED" : C_Int.t;
-val SC_THREAD_SAFE_FUNCTIONS = _const "Posix_ProcEnv_SC_THREAD_SAFE_FUNCTIONS" : C_Int.t;
-val SC_THREAD_SPORADIC_SERVER = _const "Posix_ProcEnv_SC_THREAD_SPORADIC_SERVER" : C_Int.t;
-val SC_THREAD_STACK_MIN = _const "Posix_ProcEnv_SC_THREAD_STACK_MIN" : C_Int.t;
-val SC_THREAD_THREADS_MAX = _const "Posix_ProcEnv_SC_THREAD_THREADS_MAX" : C_Int.t;
-val SC_THREADS = _const "Posix_ProcEnv_SC_THREADS" : C_Int.t;
-val SC_TIMEOUTS = _const "Posix_ProcEnv_SC_TIMEOUTS" : C_Int.t;
-val SC_TIMER_MAX = _const "Posix_ProcEnv_SC_TIMER_MAX" : C_Int.t;
-val SC_TIMERS = _const "Posix_ProcEnv_SC_TIMERS" : C_Int.t;
-val SC_TRACE = _const "Posix_ProcEnv_SC_TRACE" : C_Int.t;
-val SC_TRACE_EVENT_FILTER = _const "Posix_ProcEnv_SC_TRACE_EVENT_FILTER" : C_Int.t;
-val SC_TRACE_EVENT_NAME_MAX = _const "Posix_ProcEnv_SC_TRACE_EVENT_NAME_MAX" : C_Int.t;
-val SC_TRACE_INHERIT = _const "Posix_ProcEnv_SC_TRACE_INHERIT" : C_Int.t;
-val SC_TRACE_LOG = _const "Posix_ProcEnv_SC_TRACE_LOG" : C_Int.t;
-val SC_TRACE_NAME_MAX = _const "Posix_ProcEnv_SC_TRACE_NAME_MAX" : C_Int.t;
-val SC_TRACE_SYS_MAX = _const "Posix_ProcEnv_SC_TRACE_SYS_MAX" : C_Int.t;
-val SC_TRACE_USER_EVENT_MAX = _const "Posix_ProcEnv_SC_TRACE_USER_EVENT_MAX" : C_Int.t;
-val SC_TTY_NAME_MAX = _const "Posix_ProcEnv_SC_TTY_NAME_MAX" : C_Int.t;
-val SC_TYPED_MEMORY_OBJECTS = _const "Posix_ProcEnv_SC_TYPED_MEMORY_OBJECTS" : C_Int.t;
-val SC_TZNAME_MAX = _const "Posix_ProcEnv_SC_TZNAME_MAX" : C_Int.t;
-val SC_V6_ILP32_OFF32 = _const "Posix_ProcEnv_SC_V6_ILP32_OFF32" : C_Int.t;
-val SC_V6_ILP32_OFFBIG = _const "Posix_ProcEnv_SC_V6_ILP32_OFFBIG" : C_Int.t;
-val SC_V6_LP64_OFF64 = _const "Posix_ProcEnv_SC_V6_LP64_OFF64" : C_Int.t;
-val SC_V6_LPBIG_OFFBIG = _const "Posix_ProcEnv_SC_V6_LPBIG_OFFBIG" : C_Int.t;
-val SC_VERSION = _const "Posix_ProcEnv_SC_VERSION" : C_Int.t;
-val SC_XBS5_ILP32_OFF32 = _const "Posix_ProcEnv_SC_XBS5_ILP32_OFF32" : C_Int.t;
-val SC_XBS5_ILP32_OFFBIG = _const "Posix_ProcEnv_SC_XBS5_ILP32_OFFBIG" : C_Int.t;
-val SC_XBS5_LP64_OFF64 = _const "Posix_ProcEnv_SC_XBS5_LP64_OFF64" : C_Int.t;
-val SC_XBS5_LPBIG_OFFBIG = _const "Posix_ProcEnv_SC_XBS5_LPBIG_OFFBIG" : C_Int.t;
-val SC_XOPEN_CRYPT = _const "Posix_ProcEnv_SC_XOPEN_CRYPT" : C_Int.t;
-val SC_XOPEN_ENH_I18N = _const "Posix_ProcEnv_SC_XOPEN_ENH_I18N" : C_Int.t;
-val SC_XOPEN_LEGACY = _const "Posix_ProcEnv_SC_XOPEN_LEGACY" : C_Int.t;
-val SC_XOPEN_REALTIME = _const "Posix_ProcEnv_SC_XOPEN_REALTIME" : C_Int.t;
-val SC_XOPEN_REALTIME_THREADS = _const "Posix_ProcEnv_SC_XOPEN_REALTIME_THREADS" : C_Int.t;
-val SC_XOPEN_SHM = _const "Posix_ProcEnv_SC_XOPEN_SHM" : C_Int.t;
-val SC_XOPEN_STREAMS = _const "Posix_ProcEnv_SC_XOPEN_STREAMS" : C_Int.t;
-val SC_XOPEN_UNIX = _const "Posix_ProcEnv_SC_XOPEN_UNIX" : C_Int.t;
-val SC_XOPEN_VERSION = _const "Posix_ProcEnv_SC_XOPEN_VERSION" : C_Int.t;
-val setenv = _import "Posix_ProcEnv_setenv" : NullString8.t * NullString8.t -> (C_Int.t) C_Errno.t;
-val setgid = _import "Posix_ProcEnv_setgid" : C_GId.t -> (C_Int.t) C_Errno.t;
-val setgroups = _impor...
[truncated message content] |
|
From: Wesley T. <we...@ml...> - 2006-06-10 13:28:03
|
Correct a (very) unportable assumption that read/write can service large requests. I'm amazed that linux was able to do this. It broke on MinGW
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h 2006-06-09 03:09:03 UTC (rev 4640)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/util/safe.h 2006-06-10 20:28:00 UTC (rev 4641)
@@ -54,11 +54,11 @@
static inline void read_safe (int fd, void *buf, size_t size) {
ssize_t res;
+ size_t offset;
- if (0 == size) return;
- res = read (fd, buf, size);
- if (res == -1 or (size_t)res != size)
- diee ("read (_, _, _) failed.\n");
+ for (offset = 0; offset < size; offset += res)
+ if (0 >= (res = read (fd, (unsigned char*)buf+offset, size-offset)))
+ diee ("read (_, _, _) failed.\n");
}
static inline void unlink_safe (const char *pathname) {
@@ -72,9 +72,9 @@
static inline void write_safe (int fd, const void *buf, size_t size) {
ssize_t res;
+ size_t offset;
- if (0 == size) return;
- res = write (fd, buf, size);
- if (res == -1 or (size_t)res != size)
- diee ("write (_, _, _) failed.\n");
+ for (offset = 0; offset < size; offset += res)
+ if (0 >= (res = write (fd, (const unsigned char*)buf+offset, size-offset)))
+ diee ("write (_, _, _) failed.\n");
}
|
|
From: Matthew F. <fl...@ml...> - 2006-06-08 20:09:08
|
fix comment
----------------------------------------------------------------------
U mlton/trunk/mlton/codegen/x86-codegen/x86-codegen.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-codegen.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-codegen.fun 2006-06-09 02:51:28 UTC (rev 4639)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-codegen.fun 2006-06-09 03:09:03 UTC (rev 4640)
@@ -80,9 +80,8 @@
= let
val reserveEsp =
(* There is no sigaltstack on cygwin, we need to reserve %esp to
- * hold the C stack pointer. We need to do this even in programs
- * that don't handle signals, since signals get used under the hood
- * in Cygwin.
+ * hold the C stack pointer. We only need to do this in programs
+ * that handle signals.
*)
handlesSignals andalso let open Control in !targetOS = Cygwin end
|
|
From: Matthew F. <fl...@ml...> - 2006-06-08 19:51:29
|
Sync ignores ---------------------------------------------------------------------- _U mlton/branches/on-20050822-x86_64-branch/mllex/ _U mlton/branches/on-20050822-x86_64-branch/mlnlffigen/ _U mlton/branches/on-20050822-x86_64-branch/mlprof/ _U mlton/branches/on-20050822-x86_64-branch/mlton/ _U mlton/branches/on-20050822-x86_64-branch/mlyacc/ ---------------------------------------------------------------------- Property changes on: mlton/branches/on-20050822-x86_64-branch/mllex ___________________________________________________________________ Name: svn:ignore - *.call-graph.dot *.ssa html lexgen.aux lexgen.dvi lexgen.log lexgen.toc mllex mllex.pdf mllex.ps mllex.sml + *.call-graph.dot *.ssa html lexgen.aux lexgen.dvi lexgen.log lexgen.toc mllex mllex.exe mllex.pdf mllex.ps mllex.sml Property changes on: mlton/branches/on-20050822-x86_64-branch/mlnlffigen ___________________________________________________________________ Name: svn:ignore - *.call-graph.dot *.ssa mlnlffigen + *.call-graph.dot *.ssa mlnlffigen mlnlffigen.exe Property changes on: mlton/branches/on-20050822-x86_64-branch/mlprof ___________________________________________________________________ Name: svn:ignore - *.call-graph.dot *.ssa mlprof mlprof.sml + *.call-graph.dot *.ssa mlprof mlprof.exe mlprof.sml Property changes on: mlton/branches/on-20050822-x86_64-branch/mlton ___________________________________________________________________ Name: svn:ignore - mlton-compile mlton.sml upgrade-basis.sml + mlton-compile mlton-compile.exe mlton.sml upgrade-basis.sml Property changes on: mlton/branches/on-20050822-x86_64-branch/mlyacc ___________________________________________________________________ Name: svn:ignore - *.call-graph.dot *.ssa mlyacc.ps mlyacc.sml mlyacc + *.call-graph.dot *.ssa mlyacc mlyacc.exe mlyacc.ps mlyacc.sml |