Diff

Differences From Artifact [56adb92a48]:

To Artifact [04b049978f]:


   174    174       if (Tk_CreateConsoleWindow(interp) == TCL_ERROR)
   175    175           goto error;
   176    176   #endif
   177    177   #endif
   178    178   
   179    179         /* messy because TclSetStartupScriptPath is called slightly too late */
   180    180       if (Tcl_Eval(interp, initScript) == TCL_OK) {
   181         -        Tcl_Obj* path = TclGetStartupScriptPath();
          181  +        Tcl_Obj* path;
          182  +#ifdef HAVE_TCLSETSTARTUPSCRIPTPATH
          183  +        path = TclGetStartupScriptPath();
          184  +	TclSetStartupScriptPath(Tcl_GetObjResult(interp));
          185  +#else
          186  +#  ifdef HAVE_TCL_SETSTARTUPSCRIPT
          187  +        path = Tcl_GetStartupScriptPath(NULL);
   182    188   	TclSetStartupScriptPath(Tcl_GetObjResult(interp));
          189  +#  endif
          190  +#endif
   183    191   	if (path == NULL)
   184    192   	  Tcl_Eval(interp, "incr argc -1; set argv [lrange $argv 1 end]");
   185    193       }
   186    194   
   187    195       Tcl_SetVar(interp, "errorInfo", "", TCL_GLOBAL_ONLY);
   188    196       Tcl_ResetResult(interp);
   189    197       return TCL_OK;