Diff

Differences From Artifact [0cfdc14cf7]:

To Artifact [9bfdc99cac]:


87
88
89
90
91
92
93

94
95
96
97
98
99
100
101
102
103

104
105
106
107
108
109
110
#  define TCLKIT_MOUNTPOINT "/.KITDLL_TCL"
#  define TCLKIT_VFSSOURCE "$::tclKitFilename"
#else
#  define TCLKIT_MOUNTPOINT "[info nameofexecutable]"
#  define TCLKIT_VFSSOURCE "[info nameofexecutable]"
#endif /* TCLKIT_DLL */


#ifdef HAVE_ACCEPTABLE_DLADDR
#  ifdef KITSH_NEED_WINMAIN
#    ifdef _WIN32_WCE
int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
#    else
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
#    endif /* _WIN32_WCE */
#  endif /* KITSH_NEED_WINMAIN */
int main(int argc, char **argv);
#endif /* HAVE_ACCEPTABLE_DLADDR */


#ifdef TCLKIT_REQUIRE_TCLEXECUTABLENAME
char *tclExecutableName;
#endif

/*
 *  Attempt to load a "boot.tcl" entry from the embedded MetaKit file.







>
|
|
|

|

|
|

|
>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#  define TCLKIT_MOUNTPOINT "/.KITDLL_TCL"
#  define TCLKIT_VFSSOURCE "$::tclKitFilename"
#else
#  define TCLKIT_MOUNTPOINT "[info nameofexecutable]"
#  define TCLKIT_VFSSOURCE "[info nameofexecutable]"
#endif /* TCLKIT_DLL */

#ifndef TCLKIT_DLL
#  ifdef HAVE_ACCEPTABLE_DLADDR
#    ifdef KITSH_NEED_WINMAIN
#      ifdef _WIN32_WCE
int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
#      else
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
#      endif /* _WIN32_WCE */
#    endif /* KITSH_NEED_WINMAIN */
int main(int argc, char **argv);
#  endif /* HAVE_ACCEPTABLE_DLADDR */
#endif /* !TCLKIT_DLL */

#ifdef TCLKIT_REQUIRE_TCLEXECUTABLENAME
char *tclExecutableName;
#endif

/*
 *  Attempt to load a "boot.tcl" entry from the embedded MetaKit file.
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327

328
329
330
331
332
333
334
		dladdr_ret = dladdr(&SetExecName, &syminfo);
		if (dladdr_ret != 0) {
			SetExecName(interp, syminfo.dli_fname);

			return;
		}
	}
#  endif /* !TCLKIT_DLL */

#  ifdef KITSH_NEED_WINMAIN
	if (Tcl_GetNameOfExecutable() == NULL) {
#    ifdef _WIN32_WCE
		dladdr_ret = dladdr(&WinMain, &syminfo);
#    else
		dladdr_ret = dladdr(&wWinMain, &syminfo);
#    endif /* _WIN32_WCE */

		if (dladdr_ret != 0) {
			SetExecName(interp, syminfo.dli_fname);

			return;
		}
	}
#  endif /* KITSH_NEED_WINMAIN */

	if (Tcl_GetNameOfExecutable() == NULL) {
		dladdr_ret = dladdr(&main, &syminfo);
		if (dladdr_ret != 0) {
			SetExecName(interp, syminfo.dli_fname);

			return;
		}
	}

#endif /* HAVE_ACCEPTABLE_DLADDR */

	if (Tcl_GetNameOfExecutable() == NULL) {
		lobjv[0] = Tcl_GetVar2Ex(interp, "argv0", NULL, TCL_GLOBAL_ONLY);
		execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv);

		SetExecName(interp, Tcl_GetStringFromObj(execNameObj, &len));







<
<
|

|

|

|







|









>







297
298
299
300
301
302
303


304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
		dladdr_ret = dladdr(&SetExecName, &syminfo);
		if (dladdr_ret != 0) {
			SetExecName(interp, syminfo.dli_fname);

			return;
		}
	}


#    ifdef KITSH_NEED_WINMAIN
	if (Tcl_GetNameOfExecutable() == NULL) {
#      ifdef _WIN32_WCE
		dladdr_ret = dladdr(&WinMain, &syminfo);
#      else
		dladdr_ret = dladdr(&wWinMain, &syminfo);
#      endif /* _WIN32_WCE */

		if (dladdr_ret != 0) {
			SetExecName(interp, syminfo.dli_fname);

			return;
		}
	}
#    endif /* KITSH_NEED_WINMAIN */

	if (Tcl_GetNameOfExecutable() == NULL) {
		dladdr_ret = dladdr(&main, &syminfo);
		if (dladdr_ret != 0) {
			SetExecName(interp, syminfo.dli_fname);

			return;
		}
	}
#  endif /* !TCLKIT_DLL */
#endif /* HAVE_ACCEPTABLE_DLADDR */

	if (Tcl_GetNameOfExecutable() == NULL) {
		lobjv[0] = Tcl_GetVar2Ex(interp, "argv0", NULL, TCL_GLOBAL_ONLY);
		execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv);

		SetExecName(interp, Tcl_GetStringFromObj(execNameObj, &len));