Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -5,12 +5,15 @@ mv example.c.new example.c example.o: example.c xvfs-core.h Makefile cc -fPIC -Wall -I. -o example.o -c example.c -example.so: example.o Makefile - cc -fPIC -shared -o example.so example.o +xvfs-core.o: xvfs-core.c xvfs-core.h Makefile + cc -fPIC -Wall -I. -o xvfs-core.o -c xvfs-core.c + +example.so: example.o xvfs-core.o Makefile + cc -fPIC -shared -o example.so example.o xvfs-core.o test: example.so echo 'load ./example.so Xvfs_example; puts OK' | tclsh | grep '^OK$$' clean: Index: xvfs-core.c ================================================================== --- xvfs-core.c +++ xvfs-core.c @@ -0,0 +1,7 @@ +#include +#include + +int Xvfs_Register(Tcl_Interp *interp, const char *fsName, int protocolVersion, xvfs_proc_getChildren_t getChildrenProc, xvfs_proc_getData_t getData) { + Tcl_SetResult(interp, "Not implemented", NULL); + return(TCL_ERROR); +} Index: xvfs-core.h ================================================================== --- xvfs-core.h +++ xvfs-core.h @@ -6,8 +6,8 @@ #define XVFS_PROTOCOL_VERSION 1 typedef const char **(*xvfs_proc_getChildren_t)(const char *path, Tcl_WideInt limit); typedef const unsigned char *(*xvfs_proc_getData_t)(const char *path, Tcl_WideInt start, Tcl_WideInt length); -int Xvfs_Register(const char *fsName, int protocolVersion, xvfs_proc_getChildren_t getChildrenProc, xvfs_proc_getData_t getData); +int Xvfs_Register(Tcl_Interp *interp, const char *fsName, int protocolVersion, xvfs_proc_getChildren_t getChildrenProc, xvfs_proc_getData_t getData); #endif Index: xvfs.c.rvt ================================================================== --- xvfs.c.rvt +++ xvfs.c.rvt @@ -27,14 +27,14 @@ static const unsigned char *xvfs__getData(const char *path, Tcl_WideInt start, Tcl_WideInt length) { return(NULL); } -int Xvfs__Init() { +int Xvfs__Init(Tcl_Interp *interp) { int register_ret; - register_ret = Xvfs_Register("", XVFS_PROTOCOL_VERSION, xvfs__getChildren, xvfs__getData); + register_ret = Xvfs_Register(interp, "", XVFS_PROTOCOL_VERSION, xvfs__getChildren, xvfs__getData); if (register_ret != TCL_OK) { return(register_ret); } return(TCL_OK);