I just stumbled on this list. I used Modules for a long time at LBL, but
now I want to use it at my new job.
Version 2.2beta doesn't work properly with Tcl8*. The problem is that the
Makefile doesn't have warnings turned on, so somehow it manages to compile
even though a particular routine isn't defined in Tcl8 (GlobCmd). I have
patched 2.2beta so that it will compile with Tcl8 (at least version
8.0p2).
I'm not sure that anyone cares about 2.2 anymore, but it seems that not
everyone is ready for version 3 yet. (I haven't tried it yet!)
Is there a home page for Modules? ftp.modules.org doesn't seem to exist
anymore, if it ever did!
-Mark Lakata
to patch, first untar the original 2.2beta distribution. Copy this email
to init.patch, and then run
patch < init.patch
from the Modules-v2.2BETA directory. Then remake.
CUT HERE, REMOVE ALL TEXT ABOVE THIS LINE INCLUDING THIS LINE
*** Modules-v2.2BETA/init.c Thu Jun 30 16:17:19 1994
--- Modules-v2.2BETA-mine/init.c Fri Feb 25 18:15:56 2000
***************
*** 147,166 ****
if(getenv("_MODULESBEGINENV_") == NULL) {
char* argv[3];
FILE* file;
!
argv[1] = "~/.modulesbeginenv";
argv[2] = NULL;
if(Tcl_GlobCmd(0, *interp, 2, argv) == TCL_OK) {
! if((file = fopen((*interp)->result, "w+")) != NULL) {
! int i=0;
! while(environ[i]) {
! fprintf(file, "%s\n", environ[i++]);
! }
! moduleSetenv(*interp, "_MODULESBEGINENV_", (*interp)->result, 1);
! fclose(file);
! }
! }
}
return 0;
--- 147,176 ----
if(getenv("_MODULESBEGINENV_") == NULL) {
char* argv[3];
FILE* file;
! #if TCL_MAJOR_VERSION == 8
! Tcl_DString path;
! #endif
!
argv[1] = "~/.modulesbeginenv";
argv[2] = NULL;
+ #if TCL_MAJOR_VERSION == 8
+ if(Tcl_TranslateFileName(*interp, argv[1],&path)) {
+ #else
if(Tcl_GlobCmd(0, *interp, 2, argv) == TCL_OK) {
! #endif
! if((file = fopen((*interp)->result, "w+")) != NULL) {
! int i=0;
! while(environ[i]) {
! fprintf(file, "%s\n", environ[i++]);
! }
! moduleSetenv(*interp, "_MODULESBEGINENV_", (*interp)->result, 1);
! fclose(file);
! }
! }
! #if TCL_MAJOR_VERSION == 8
! Tcl_DStringFree(&path);
! #endif
}
return 0;
|