aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2020-09-07 16:08:43 -0500
committerCalvin Rose <calsrose@gmail.com>2020-09-07 16:08:43 -0500
commitb53890ddae851ba899432afba112f706e9ec586a (patch)
treeb657735f3dac1081af5108991b94b63a980f7627
parentPrepare 1.12.0 Release. (diff)
Make some changes for WASM build.
-rw-r--r--src/core/os.c24
-rw-r--r--src/core/pp.c2
-rw-r--r--src/core/util.c2
3 files changed, 15 insertions, 13 deletions
diff --git a/src/core/os.c b/src/core/os.c
index f26115a5..76dacc05 100644
--- a/src/core/os.c
+++ b/src/core/os.c
@@ -1567,6 +1567,18 @@ static const JanetReg os_cfuns[] = {
JDOC("(os/shell str)\n\n"
"Pass a command string str directly to the system shell.")
},
+ {
+ "os/proc-wait", os_proc_wait,
+ JDOC("(os/proc-wait proc)\n\n"
+ "Block until the subprocess completes. Returns the subprocess return code.")
+ },
+ {
+ "os/proc-kill", os_proc_kill,
+ JDOC("(os/proc-kill proc &opt wait)\n\n"
+ "Kill a subprocess by sending SIGKILL to it on posix systems, or by closing the process "
+ "handle on windows. If wait is truthy, will wait for the process to finsih and "
+ "returns the exit code. Otherwise, returns proc.")
+ },
#endif
{
"os/setenv", os_setenv,
@@ -1652,18 +1664,6 @@ static const JanetReg os_cfuns[] = {
JDOC("(os/perm-int bytes)\n\n"
"Parse a 9 character permission string and return an integer that can be used by chmod.")
},
- {
- "os/proc-wait", os_proc_wait,
- JDOC("(os/proc-wait proc)\n\n"
- "Block until the subprocess completes. Returns the subprocess return code.")
- },
- {
- "os/proc-kill", os_proc_kill,
- JDOC("(os/proc-kill proc &opt wait)\n\n"
- "Kill a subprocess by sending SIGKILL to it on posix systems, or by closing the process "
- "handle on windows. If wait is truthy, will wait for the process to finsih and "
- "returns the exit code. Otherwise, returns proc.")
- },
#endif
{NULL, NULL, NULL}
};
diff --git a/src/core/pp.c b/src/core/pp.c
index 470d405a..1fcc1e18 100644
--- a/src/core/pp.c
+++ b/src/core/pp.c
@@ -454,7 +454,7 @@ static const char *janet_pretty_colors[] = {
"\x1B[36m",
"\x1B[36m",
"\x1B[36m",
- "\x1B[36m"
+ "\x1B[36m",
"\x1B[35m",
"\x1B[36m",
"\x1B[36m",
diff --git a/src/core/util.c b/src/core/util.c
index 38c6cee0..b47aa0e5 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -680,6 +680,8 @@ int janet_cryptorand(uint8_t *out, size_t n) {
arc4random_buf(out, n);
return 0;
#else
+ (void) n;
+ (void) out;
return -1;
#endif
}