diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-08-20 15:59:14 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-08-20 16:30:54 +1000 |
commit | 74ccdcd06a13d7939130668dfb7f7c3377d05430 (patch) | |
tree | 8b0a5c66977bdfcfe9784239ccd71b3a36e136c9 | |
parent | c1e7d85ba7ee043e3c6ea2779fdeeb675a013c1d (diff) | |
download | jimtcl-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>
-rw-r--r-- | jim-posix.c | 4 | ||||
-rwxr-xr-x | make-bootstrap-jim | 6 |
2 files changed, 7 insertions, 3 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; } diff --git a/make-bootstrap-jim b/make-bootstrap-jim index 7484b11..cf8138d 100755 --- a/make-bootstrap-jim +++ b/make-bootstrap-jim @@ -40,11 +40,11 @@ EOF echo "}" } -cexts="aio readdir regexp file exec clock array" +cexts="aio readdir regexp file exec clock array posix" tclexts="bootstrap initjimsh glob stdlib tclcompat" # Note ordering -allexts="bootstrap aio readdir regexp file glob exec clock array stdlib tclcompat" +allexts="bootstrap aio readdir regexp file glob exec posix clock array stdlib tclcompat" echo "/* This is single source file, bootstrap version of Jim Tcl. See http://jim.tcl.tk/ */" @@ -92,7 +92,7 @@ cat <<EOF #else #define _GNU_SOURCE #endif -#define HAVE_VFORK +#define HAVE_FORK #define HAVE_WAITPID #define HAVE_ISATTY #define HAVE_MKSTEMP |