[MLton-commit] r6767
Matthew Fluet
fluet at mlton.org
Tue Aug 19 15:16:25 PDT 2008
Restore use of nested indirect types in FFI for Basis Library implementation.
----------------------------------------------------------------------
U mlton/trunk/basis-library/mlton/process.sml
U mlton/trunk/basis-library/posix/process.sml
U mlton/trunk/basis-library/primitive/basis-ffi.sml
U mlton/trunk/basis-library/util/CUtil.sig
U mlton/trunk/basis-library/util/CUtil.sml
U mlton/trunk/runtime/basis/MLton/Process/spawne.c
U mlton/trunk/runtime/basis/MLton/Process/spawnp.c
U mlton/trunk/runtime/basis/Posix/Process/exece.c
U mlton/trunk/runtime/basis/Posix/Process/execp.c
U mlton/trunk/runtime/basis-ffi.h
U mlton/trunk/runtime/gen/basis-ffi.def
U mlton/trunk/runtime/gen/basis-ffi.h
U mlton/trunk/runtime/gen/basis-ffi.sml
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/mlton/process.sml
===================================================================
--- mlton/trunk/basis-library/mlton/process.sml 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/basis-library/mlton/process.sml 2008-08-19 22:16:22 UTC (rev 6767)
@@ -352,14 +352,12 @@
let
val args = List.map cmdEscape args
val path = NullString.nullTerm path
- val args = CUtil.StringVector.fromList args
- val env = CUtil.StringVector.fromList env
+ val args = CUtil.C_StringArray.fromList args
+ val env = CUtil.C_StringArray.fromList env
in
(PId.fromRep o SysCall.simpleResult')
({errVal = C_PId.castFromFixedInt ~1}, fn () =>
- Prim.spawne (path,
- #1 args, #2 args, #3 args,
- #1 env, #2 env, #3 env))
+ Prim.spawne (path, args, env))
end
else
case Posix.Process.fork () of
@@ -378,12 +376,11 @@
let
val file = NullString.nullTerm file
val args = List.map cmdEscape args
- val args = CUtil.StringVector.fromList args
+ val args = CUtil.C_StringArray.fromList args
in
(PId.fromRep o SysCall.simpleResult')
({errVal = C_PId.castFromFixedInt ~1}, fn () =>
- Prim.spawnp (file,
- #1 args, #2 args, #3 args))
+ Prim.spawnp (file, args))
end
else
case Posix.Process.fork () of
Modified: mlton/trunk/basis-library/posix/process.sml
===================================================================
--- mlton/trunk/basis-library/posix/process.sml 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/basis-library/posix/process.sml 2008-08-19 22:16:22 UTC (rev 6767)
@@ -37,7 +37,7 @@
else fn () => Error.raiseSys Error.nosys
val conv = NullString.nullTerm
- val convs = CUtil.StringVector.fromList
+ val convs = CUtil.C_StringArray.fromList
fun exece (path, args, env): 'a =
let
@@ -46,9 +46,7 @@
val env = convs env
in
(SysCall.simple
- (fn () => Prim.exece (path,
- #1 args, #2 args, #3 args,
- #1 env, #2 env, #3 env))
+ (fn () => Prim.exece (path, args, env))
; raise Fail "Posix.Process.exece")
end
@@ -61,8 +59,7 @@
val args = convs args
in
(SysCall.simple
- (fn () => Prim.execp (file,
- #1 args, #2 args, #3 args))
+ (fn () => Prim.execp (file, args))
; raise Fail "Posix.Process.execp")
end
Modified: mlton/trunk/basis-library/primitive/basis-ffi.sml
===================================================================
--- mlton/trunk/basis-library/primitive/basis-ffi.sml 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/basis-library/primitive/basis-ffi.sml 2008-08-19 22:16:22 UTC (rev 6767)
@@ -80,8 +80,8 @@
structure Process =
struct
val cwait = _import "MLton_Process_cwait" internal : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
-val spawne = _import "MLton_Process_spawne" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
-val spawnp = _import "MLton_Process_spawnp" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
+val spawne = _import "MLton_Process_spawne" internal : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_PId.t) C_Errno.t;
+val spawnp = _import "MLton_Process_spawnp" internal : NullString8.t * (NullString8.t) array -> (C_PId.t) C_Errno.t;
end
structure Rlimit =
struct
@@ -669,8 +669,8 @@
structure Process =
struct
val alarm = _import "Posix_Process_alarm" internal : C_UInt.t -> C_UInt.t;
-val exece = _import "Posix_Process_exece" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
-val execp = _import "Posix_Process_execp" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
+val exece = _import "Posix_Process_exece" internal : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_Int.t) C_Errno.t;
+val execp = _import "Posix_Process_execp" internal : NullString8.t * (NullString8.t) array -> (C_Int.t) C_Errno.t;
val exit = _import "Posix_Process_exit" internal : C_Status.t -> unit;
val exitStatus = _import "Posix_Process_exitStatus" internal : C_Status.t -> C_Int.t;
val fork = _import "Posix_Process_fork" internal : unit -> (C_PId.t) C_Errno.t;
Modified: mlton/trunk/basis-library/util/CUtil.sig
===================================================================
--- mlton/trunk/basis-library/util/CUtil.sig 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/basis-library/util/CUtil.sig 2008-08-19 22:16:22 UTC (rev 6767)
@@ -42,11 +42,4 @@
val toArrayOfLength: t * int -> string array
val toList: t -> string list
end
-
- (* NULL terminated char** *)
- structure StringVector :
- sig
- type t = string * C_Pointer.t array * C_Size.t vector
- val fromList: string list -> t
- end
end
Modified: mlton/trunk/basis-library/util/CUtil.sml
===================================================================
--- mlton/trunk/basis-library/util/CUtil.sml 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/basis-library/util/CUtil.sml 2008-08-19 22:16:22 UTC (rev 6767)
@@ -107,40 +107,4 @@
a
end
end
-
- structure StringVector =
- struct
- type t = string * C_Pointer.t array * C_Size.t vector
- val padVec =
- Vector.fromList
- ["\000\000\000",
- "\000\000",
- "\000",
- "\000\000\000\000"]
- fun fromList (l : string list) : t =
- let
- val n = List.length l
- (* The C side updates the array with addresses
- * using the vector of offsets.
- *)
- val aPtr = Array.array (1 +? n, C_Pointer.null)
- val (vOff,(_,_,acc)) =
- Vector.unfoldi
- (n, (l, 0w0, []), fn (_, (l, off, acc)) =>
- let
- val s' = List.hd l
- val l' = List.tl l
- val n' = String.size s'
-
- val pad' = Vector.sub (padVec, Int.mod (n', 4))
- val sz' = n' + Vector.length pad'
- val off' = C_Size.+ (off, C_Size.fromInt sz')
- in
- (off, (l', off', pad'::s'::acc))
- end)
- val str = Vector.concat (List.rev acc)
- in
- (str, aPtr, vOff)
- end
- end
end
Modified: mlton/trunk/runtime/basis/MLton/Process/spawne.c
===================================================================
--- mlton/trunk/runtime/basis/MLton/Process/spawne.c 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/basis/MLton/Process/spawne.c 2008-08-19 22:16:22 UTC (rev 6767)
@@ -3,35 +3,32 @@
#if HAS_SPAWN
C_Errno_t(C_PId_t) MLton_Process_spawne (NullString8_t pNStr,
- String8_t aStr,
- Array(C_Pointer_t) aPtr,
- Vector(C_Size_t) aOff,
- String8_t eStr,
- Array(C_Pointer_t) ePtr,
- Vector(C_Size_t) eOff) {
+ Array(NullString8_t) aStr,
+ Array(NullString8_t) eStr) {
const char *path;
char **args;
char **env;
int aLen;
int eLen;
+ char *aSaved;
+ char *eSaved;
C_PId_t res;
path = (const char *) pNStr;
- args = (char **) aPtr;
- aLen = GC_getArrayLength((pointer)aPtr);
- for (int i = 0; i < aLen - 1; i++) {
- args[i] = (char *)aStr + ((size_t*)aOff)[i];
- }
+ args = (char **) aStr;
+ aLen = GC_getArrayLength((pointer)aStr);
+ aSaved = args[aLen - 1];
args[aLen - 1] = NULL;
- env = (char **) ePtr;
- eLen = GC_getArrayLength((pointer)ePtr);
- for (int i = 0; i < eLen - 1; i++) {
- env[i] = (char *)eStr + ((size_t*)eOff)[i];
- }
+ env = (char **) eStr;
+ eLen = GC_getArrayLength((pointer)eStr);
+ eSaved = env[eLen - 1];
env[eLen - 1] = NULL;
res = spawnve (SPAWN_MODE, path,
(const char * const *)args,
(const char * const *)env);
+ /* spawnve failed */
+ args[aLen - 1] = aSaved;
+ env[eLen - 1] = eSaved;
return (C_Errno_t(C_PId_t))res;
}
@@ -39,12 +36,8 @@
__attribute__ ((noreturn))
C_Errno_t(C_PId_t) MLton_Process_spawne (__attribute__ ((unused))NullString8_t pNStr,
- __attribute__ ((unused))String8_t aStr,
- __attribute__ ((unused))Array(C_Pointer_t) aPtr,
- __attribute__ ((unused))Vector(C_Size_t) aOff,
- __attribute__ ((unused))String8_t eStr,
- __attribute__ ((unused))Array(C_Pointer_t) ePtr,
- __attribute__ ((unused)) Vector(C_Size_t) eOff) {
+ __attribute__ ((unused))Array(NullString8_t) aStr,
+ __attribute__ ((unused))Array(NullString8_t) ePtr) {
die ("MLton_Process_spawne not implemented");
}
Modified: mlton/trunk/runtime/basis/MLton/Process/spawnp.c
===================================================================
--- mlton/trunk/runtime/basis/MLton/Process/spawnp.c 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/basis/MLton/Process/spawnp.c 2008-08-19 22:16:22 UTC (rev 6767)
@@ -3,23 +3,22 @@
#if HAS_SPAWN
C_Errno_t(C_PId_t) MLton_Process_spawnp (NullString8_t pNStr,
- String8_t aStr,
- Array(C_Pointer_t) aPtr,
- Vector(C_Size_t) aOff) {
+ Array(NullString8_t) aStr) {
const char *path;
char **args;
int aLen;
+ char *aSaved;
C_PId_t res;
path = (const char *) pNStr;
- args = (char **) aPtr;
- aLen = GC_getArrayLength((pointer)aPtr);
- for (int i = 0; i < aLen - 1; i++) {
- args[i] = (char *)aStr + ((size_t*)aOff)[i];
- }
+ args = (char **) aStr;
+ aLen = GC_getArrayLength((pointer)aStr);
+ aSaved = args[aLen - 1];
args[aLen - 1] = NULL;
res = spawnvp (SPAWN_MODE, path,
(const char * const *)args);
+ /* spawnvp failed */
+ args[aLen - 1] = aSaved;
return (C_Errno_t(C_PId_t))res;
}
@@ -27,9 +26,7 @@
__attribute__ ((noreturn))
C_Errno_t(C_PId_t) MLton_Process_spawnp (__attribute__ ((unused)) NullString8_t pNStr,
- __attribute__ ((unused)) String8_t aStr,
- __attribute__ ((unused)) Array(C_Pointer_t) aPtr,
- __attribute__ ((unused)) Vector(C_Size_t) aOff) {
+ __attribute__ ((unused)) Array(NullString8_t) aStr) {
die ("MLton_Process_spawnp not implemented");
}
Modified: mlton/trunk/runtime/basis/Posix/Process/exece.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/Process/exece.c 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/basis/Posix/Process/exece.c 2008-08-19 22:16:22 UTC (rev 6767)
@@ -1,35 +1,31 @@
#include "platform.h"
C_Errno_t(C_Int_t) Posix_Process_exece (NullString8_t pNStr,
- String8_t aStr,
- Array(C_Pointer_t) aPtr,
- Vector(C_Size_t) aOff,
- String8_t eStr,
- Array(C_Pointer_t) ePtr,
- Vector(C_Size_t) eOff) {
+ Array(NullString8_t) aStr,
+ Array(NullString8_t) eStr) {
const char *path;
char **args;
char **env;
uintmax_t aLen;
uintmax_t eLen;
+ char *aSaved;
+ char *eSaved;
int res;
path = (const char *) pNStr;
- args = (char **) aPtr;
- aLen = GC_getArrayLength((pointer)aPtr);
- for (unsigned int i = 0; i < aLen - 1; i++) {
- args[i] = (char *)aStr + ((size_t*)aOff)[i];
- }
+ args = (char **) aStr;
+ aLen = GC_getArrayLength((pointer)aStr);
+ aSaved = args[aLen - 1];
args[aLen - 1] = NULL;
- env = (char **) ePtr;
- eLen = GC_getArrayLength((pointer)ePtr);
- for (unsigned int i = 0; i < eLen - 1; i++) {
- env[i] = (char *)eStr + ((size_t*)eOff)[i];
- }
+ env = (char **) eStr;
+ eLen = GC_getArrayLength((pointer)eStr);
+ eSaved = env[eLen - 1];
env[eLen - 1] = NULL;
res = EXECVE (path,
(char * const *)args,
(char * const *)env);
/* exece failed */
+ args[aLen - 1] = aSaved;
+ env[eLen - 1] = eSaved;
return (C_Errno_t(C_Int_t))res;
}
Modified: mlton/trunk/runtime/basis/Posix/Process/execp.c
===================================================================
--- mlton/trunk/runtime/basis/Posix/Process/execp.c 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/basis/Posix/Process/execp.c 2008-08-19 22:16:22 UTC (rev 6767)
@@ -1,23 +1,21 @@
#include "platform.h"
C_Errno_t(C_Int_t) Posix_Process_execp (NullString8_t fNStr,
- String8_t aStr,
- Array(C_Pointer_t) aPtr,
- Vector(C_Size_t) aOff) {
+ Array(NullString8_t) aStr) {
const char *file;
char **args;
uintmax_t aLen;
+ char *aSaved;
int res;
file = (const char *) fNStr;
- args = (char **) aPtr;
- aLen = GC_getArrayLength((pointer)aPtr);
- for (unsigned int i = 0; i < aLen - 1; i++) {
- args[i] = (char *)aStr + ((size_t*)aOff)[i];
- }
+ args = (char **) aStr;
+ aLen = GC_getArrayLength((pointer)aStr);
+ aSaved = args[aLen - 1];
args[aLen - 1] = NULL;
res = EXECVP (file,
(char * const *)args);
/* execp failed */
+ args[aLen - 1] = aSaved;
return (C_Errno_t(C_Int_t))res;
}
Modified: mlton/trunk/runtime/basis-ffi.h
===================================================================
--- mlton/trunk/runtime/basis-ffi.h 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/basis-ffi.h 2008-08-19 22:16:22 UTC (rev 6767)
@@ -51,8 +51,8 @@
INTERNAL C_Errno_t(C_Int_t) MLton_Itimer_set(C_Int_t,C_Time_t,C_SUSeconds_t,C_Time_t,C_SUSeconds_t);
INTERNAL extern const C_Int_t MLton_Itimer_VIRTUAL;
INTERNAL C_Errno_t(C_PId_t) MLton_Process_cwait(C_PId_t,Ref(C_Status_t));
-INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawne(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t),String8_t,Array(C_Pointer_t),Vector(C_Size_t));
-INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawnp(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t));
+INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawne(NullString8_t,Array(NullString8_t),Array(NullString8_t));
+INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawnp(NullString8_t,Array(NullString8_t));
INTERNAL extern const C_Int_t MLton_Rlimit_AS;
INTERNAL extern const C_Int_t MLton_Rlimit_CORE;
INTERNAL extern const C_Int_t MLton_Rlimit_CPU;
@@ -550,8 +550,8 @@
INTERNAL C_String_t Posix_ProcEnv_Uname_getSysName(void);
INTERNAL C_String_t Posix_ProcEnv_Uname_getVersion(void);
INTERNAL C_UInt_t Posix_Process_alarm(C_UInt_t);
-INTERNAL C_Errno_t(C_Int_t) Posix_Process_exece(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t),String8_t,Array(C_Pointer_t),Vector(C_Size_t));
-INTERNAL C_Errno_t(C_Int_t) Posix_Process_execp(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t));
+INTERNAL C_Errno_t(C_Int_t) Posix_Process_exece(NullString8_t,Array(NullString8_t),Array(NullString8_t));
+INTERNAL C_Errno_t(C_Int_t) Posix_Process_execp(NullString8_t,Array(NullString8_t));
INTERNAL __attribute__((noreturn)) void Posix_Process_exit(C_Status_t);
INTERNAL C_Int_t Posix_Process_exitStatus(C_Status_t);
INTERNAL C_Errno_t(C_PId_t) Posix_Process_fork(void);
Modified: mlton/trunk/runtime/gen/basis-ffi.def
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.def 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/gen/basis-ffi.def 2008-08-19 22:16:22 UTC (rev 6767)
@@ -43,8 +43,8 @@
MLton.Itimer.VIRTUAL = _const : C_Int.t
MLton.Itimer.set = _import INTERNAL : C_Int.t * C_Time.t * C_SUSeconds.t * C_Time.t * C_SUSeconds.t -> C_Int.t C_Errno.t
MLton.Process.cwait = _import INTERNAL : C_PId.t * C_Status.t ref -> C_PId.t C_Errno.t
-MLton.Process.spawne = _import INTERNAL : NullString8.t * String8.t * C_Pointer.t array * C_Size.t vector * String8.t * C_Pointer.t array * C_Size.t vector -> C_PId.t C_Errno.t
-MLton.Process.spawnp = _import INTERNAL : NullString8.t * String8.t * C_Pointer.t array * C_Size.t vector -> C_PId.t C_Errno.t
+MLton.Process.spawne = _import INTERNAL : NullString8.t * NullString8.t array * NullString8.t array -> C_PId.t C_Errno.t
+MLton.Process.spawnp = _import INTERNAL : NullString8.t * NullString8.t array -> C_PId.t C_Errno.t
MLton.Rlimit.AS = _const : C_Int.t
MLton.Rlimit.CORE = _const : C_Int.t
MLton.Rlimit.CPU = _const : C_Int.t
@@ -548,8 +548,8 @@
Posix.Process.W.NOHANG = _const : C_Int.t
Posix.Process.W.UNTRACED = _const : C_Int.t
Posix.Process.alarm = _import INTERNAL : C_UInt.t -> C_UInt.t
-Posix.Process.exece = _import INTERNAL : NullString8.t * String8.t * C_Pointer.t array * C_Size.t vector * String8.t * C_Pointer.t array * C_Size.t vector -> C_Int.t C_Errno.t
-Posix.Process.execp = _import INTERNAL : NullString8.t * String8.t * C_Pointer.t array * C_Size.t vector -> C_Int.t C_Errno.t
+Posix.Process.exece = _import INTERNAL : NullString8.t * NullString8.t array * NullString8.t array -> C_Int.t C_Errno.t
+Posix.Process.execp = _import INTERNAL : NullString8.t * NullString8.t array -> C_Int.t C_Errno.t
Posix.Process.exit = _import INTERNAL __attribute__((noreturn)) : C_Status.t -> unit
Posix.Process.exitStatus = _import INTERNAL : C_Status.t -> C_Int.t
Posix.Process.fork = _import INTERNAL : unit -> C_PId.t C_Errno.t
Modified: mlton/trunk/runtime/gen/basis-ffi.h
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.h 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/gen/basis-ffi.h 2008-08-19 22:16:22 UTC (rev 6767)
@@ -51,8 +51,8 @@
INTERNAL C_Errno_t(C_Int_t) MLton_Itimer_set(C_Int_t,C_Time_t,C_SUSeconds_t,C_Time_t,C_SUSeconds_t);
INTERNAL extern const C_Int_t MLton_Itimer_VIRTUAL;
INTERNAL C_Errno_t(C_PId_t) MLton_Process_cwait(C_PId_t,Ref(C_Status_t));
-INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawne(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t),String8_t,Array(C_Pointer_t),Vector(C_Size_t));
-INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawnp(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t));
+INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawne(NullString8_t,Array(NullString8_t),Array(NullString8_t));
+INTERNAL C_Errno_t(C_PId_t) MLton_Process_spawnp(NullString8_t,Array(NullString8_t));
INTERNAL extern const C_Int_t MLton_Rlimit_AS;
INTERNAL extern const C_Int_t MLton_Rlimit_CORE;
INTERNAL extern const C_Int_t MLton_Rlimit_CPU;
@@ -550,8 +550,8 @@
INTERNAL C_String_t Posix_ProcEnv_Uname_getSysName(void);
INTERNAL C_String_t Posix_ProcEnv_Uname_getVersion(void);
INTERNAL C_UInt_t Posix_Process_alarm(C_UInt_t);
-INTERNAL C_Errno_t(C_Int_t) Posix_Process_exece(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t),String8_t,Array(C_Pointer_t),Vector(C_Size_t));
-INTERNAL C_Errno_t(C_Int_t) Posix_Process_execp(NullString8_t,String8_t,Array(C_Pointer_t),Vector(C_Size_t));
+INTERNAL C_Errno_t(C_Int_t) Posix_Process_exece(NullString8_t,Array(NullString8_t),Array(NullString8_t));
+INTERNAL C_Errno_t(C_Int_t) Posix_Process_execp(NullString8_t,Array(NullString8_t));
INTERNAL __attribute__((noreturn)) void Posix_Process_exit(C_Status_t);
INTERNAL C_Int_t Posix_Process_exitStatus(C_Status_t);
INTERNAL C_Errno_t(C_PId_t) Posix_Process_fork(void);
Modified: mlton/trunk/runtime/gen/basis-ffi.sml
===================================================================
--- mlton/trunk/runtime/gen/basis-ffi.sml 2008-08-19 22:16:14 UTC (rev 6766)
+++ mlton/trunk/runtime/gen/basis-ffi.sml 2008-08-19 22:16:22 UTC (rev 6767)
@@ -80,8 +80,8 @@
structure Process =
struct
val cwait = _import "MLton_Process_cwait" internal : C_PId.t * (C_Status.t) ref -> (C_PId.t) C_Errno.t;
-val spawne = _import "MLton_Process_spawne" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
-val spawnp = _import "MLton_Process_spawnp" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_PId.t) C_Errno.t;
+val spawne = _import "MLton_Process_spawne" internal : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_PId.t) C_Errno.t;
+val spawnp = _import "MLton_Process_spawnp" internal : NullString8.t * (NullString8.t) array -> (C_PId.t) C_Errno.t;
end
structure Rlimit =
struct
@@ -669,8 +669,8 @@
structure Process =
struct
val alarm = _import "Posix_Process_alarm" internal : C_UInt.t -> C_UInt.t;
-val exece = _import "Posix_Process_exece" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
-val execp = _import "Posix_Process_execp" internal : NullString8.t * String8.t * (C_Pointer.t) array * (C_Size.t) vector -> (C_Int.t) C_Errno.t;
+val exece = _import "Posix_Process_exece" internal : NullString8.t * (NullString8.t) array * (NullString8.t) array -> (C_Int.t) C_Errno.t;
+val execp = _import "Posix_Process_execp" internal : NullString8.t * (NullString8.t) array -> (C_Int.t) C_Errno.t;
val exit = _import "Posix_Process_exit" internal : C_Status.t -> unit;
val exitStatus = _import "Posix_Process_exitStatus" internal : C_Status.t -> C_Int.t;
val fork = _import "Posix_Process_fork" internal : unit -> (C_PId.t) C_Errno.t;
More information about the MLton-commit
mailing list