aboutsummaryrefslogtreecommitdiff
path: root/jim-posix.c
diff options
context:
space:
mode:
authorantirez <antirez>2005-03-31 12:20:21 +0000
committerantirez <antirez>2005-03-31 12:20:21 +0000
commit6b53d12f84d9a2f2efa810038ce4a7c2146de928 (patch)
tree48d07e7d070b9c8f598ac932b98950ca3a65f088 /jim-posix.c
parent15dc45ec7c7c6f9e31300b6c025f46d8adec16d8 (diff)
downloadjimtcl-6b53d12f84d9a2f2efa810038ce4a7c2146de928.zip
jimtcl-6b53d12f84d9a2f2efa810038ce4a7c2146de928.tar.gz
jimtcl-6b53d12f84d9a2f2efa810038ce4a7c2146de928.tar.bz2
Implemented the C API "background" for the packages system of Jim.
Diffstat (limited to 'jim-posix.c')
-rw-r--r--jim-posix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/jim-posix.c b/jim-posix.c
index feba435..0af0729 100644
--- a/jim-posix.c
+++ b/jim-posix.c
@@ -1,7 +1,7 @@
/* Jim - POSIX extension
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
*
- * $Id: jim-posix.c,v 1.11 2005/03/05 12:22:35 antirez Exp $
+ * $Id: jim-posix.c,v 1.12 2005/03/31 12:20:21 antirez Exp $
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -123,7 +123,9 @@ static int Jim_PosixSethostnameCommand(Jim_Interp *interp, int argc,
int Jim_OnLoad(Jim_Interp *interp)
{
- Jim_InitExtension(interp, "1.0");
+ Jim_InitExtension(interp);
+ if (Jim_PackageProvide(interp, "posix", "1.0", JIM_ERRMSG) != JIM_OK)
+ return JIM_ERR;
Jim_CreateCommand(interp, "os.fork", Jim_PosixForkCommand, NULL, NULL);
Jim_CreateCommand(interp, "os.sleep", Jim_PosixSleepCommand, NULL, NULL);
Jim_CreateCommand(interp, "os.getids", Jim_PosixGetidsCommand, NULL, NULL);