shithub: mc

Download patch

ref: dae8be83400216caec8ecda7da7a32f7e48e9a7c
parent: 8849da69a4e556e915c372be825f8cc3b4f775ab
author: Ori Bernstein <[email protected]>
date: Wed Aug 20 16:14:36 EDT 2014

Use pid type in sys-osx.myr

    This means that we're not only a bit more type safe, we
    have enough type compatibility that std.spork() compiles.

--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -5,6 +5,7 @@
 	type scno 	= int64	/* syscall */
 	type fdopt	= int64	/* fd options */
 	type fd		= int32	/* fd */
+	type pid	= int64	/* pid */
 	type mprot	= int64	/* memory protection */
 	type mopt	= int64	/* memory mapping options */
 	type socktype	= int64	/* socket type */
@@ -553,11 +554,11 @@
 
 	/* process control */
 	const exit	: (status:int -> void)
-	const getpid	: ( -> int64)
-	const kill	: (pid:int64, sig:int64 -> int64)
-	const fork	: (-> int64)
-	const wait4	: (pid:int64, loc:int32#, opt : int64, usage:rusage#	-> int64)
-	const waitpid	: (pid:int64, loc:int32#, opt : int64	-> int64)
+	const getpid	: ( -> pid)
+	const kill	: (pid : pid, sig:int64 -> int64)
+	const fork	: (-> pid)
+	const wait4	: (pid : pid, loc:int32#, opt : int64, usage:rusage#	-> int64)
+	const waitpid	: (pid : pid, loc:int32#, opt : int64	-> int64)
 	const execv	: (cmd : byte[:], args : byte[:][:] -> int64)
 	const execve	: (cmd : byte[:], args : byte[:][:], env : byte[:][:] -> int64)