aboutsummaryrefslogtreecommitdiff
path: root/jim-posix.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2022-08-20 15:59:14 +1000
committerSteve Bennett <steveb@workware.net.au>2022-08-20 16:30:54 +1000
commit74ccdcd06a13d7939130668dfb7f7c3377d05430 (patch)
tree8b0a5c66977bdfcfe9784239ccd71b3a36e136c9 /jim-posix.c
parentc1e7d85ba7ee043e3c6ea2779fdeeb675a013c1d (diff)
downloadjimtcl-74ccdcd06a13d7939130668dfb7f7c3377d05430.zip
jimtcl-74ccdcd06a13d7939130668dfb7f7c3377d05430.tar.gz
jimtcl-74ccdcd06a13d7939130668dfb7f7c3377d05430.tar.bz2
bootstrap jimsh: assume fork() is available on posix platforms
There are very few posix platforms where fork isn't available. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-posix.c')
-rw-r--r--jim-posix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/jim-posix.c b/jim-posix.c
index e9d5bc3..5a6fb98 100644
--- a/jim-posix.c
+++ b/jim-posix.c
@@ -71,6 +71,7 @@ static int Jim_PosixForkCommand(Jim_Interp *interp, int argc, Jim_Obj *const *ar
}
#endif
+#if !defined(JIM_BOOTSTRAP)
static int Jim_PosixGetidsCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
Jim_Obj *objv[8];
@@ -134,6 +135,7 @@ static int Jim_PosixUptimeCommand(Jim_Interp *interp, int argc, Jim_Obj *const *
#endif
return JIM_OK;
}
+#endif /* JIM_BOOTSTRAP */
int Jim_posixInit(Jim_Interp *interp)
{
@@ -141,8 +143,10 @@ int Jim_posixInit(Jim_Interp *interp)
#ifdef HAVE_FORK
Jim_CreateCommand(interp, "os.fork", Jim_PosixForkCommand, NULL, NULL);
#endif
+#if !defined(JIM_BOOTSTRAP)
Jim_CreateCommand(interp, "os.getids", Jim_PosixGetidsCommand, NULL, NULL);
Jim_CreateCommand(interp, "os.gethostname", Jim_PosixGethostnameCommand, NULL, NULL);
Jim_CreateCommand(interp, "os.uptime", Jim_PosixUptimeCommand, NULL, NULL);
+#endif /* JIM_BOOTSTRAP */
return JIM_OK;
}