Diff

Differences From Artifact [0cfdc14cf7]:

To Artifact [9bfdc99cac]:


    87     87   #  define TCLKIT_MOUNTPOINT "/.KITDLL_TCL"
    88     88   #  define TCLKIT_VFSSOURCE "$::tclKitFilename"
    89     89   #else
    90     90   #  define TCLKIT_MOUNTPOINT "[info nameofexecutable]"
    91     91   #  define TCLKIT_VFSSOURCE "[info nameofexecutable]"
    92     92   #endif /* TCLKIT_DLL */
    93     93   
    94         -#ifdef HAVE_ACCEPTABLE_DLADDR
    95         -#  ifdef KITSH_NEED_WINMAIN
    96         -#    ifdef _WIN32_WCE
           94  +#ifndef TCLKIT_DLL
           95  +#  ifdef HAVE_ACCEPTABLE_DLADDR
           96  +#    ifdef KITSH_NEED_WINMAIN
           97  +#      ifdef _WIN32_WCE
    97     98   int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
    98         -#    else
           99  +#      else
    99    100   int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
   100         -#    endif /* _WIN32_WCE */
   101         -#  endif /* KITSH_NEED_WINMAIN */
          101  +#      endif /* _WIN32_WCE */
          102  +#    endif /* KITSH_NEED_WINMAIN */
   102    103   int main(int argc, char **argv);
   103         -#endif /* HAVE_ACCEPTABLE_DLADDR */
          104  +#  endif /* HAVE_ACCEPTABLE_DLADDR */
          105  +#endif /* !TCLKIT_DLL */
   104    106   
   105    107   #ifdef TCLKIT_REQUIRE_TCLEXECUTABLENAME
   106    108   char *tclExecutableName;
   107    109   #endif
   108    110   
   109    111   /*
   110    112    *  Attempt to load a "boot.tcl" entry from the embedded MetaKit file.
................................................................................
   295    297   		dladdr_ret = dladdr(&SetExecName, &syminfo);
   296    298   		if (dladdr_ret != 0) {
   297    299   			SetExecName(interp, syminfo.dli_fname);
   298    300   
   299    301   			return;
   300    302   		}
   301    303   	}
   302         -#  endif /* !TCLKIT_DLL */
   303         -
   304         -#  ifdef KITSH_NEED_WINMAIN
          304  +#    ifdef KITSH_NEED_WINMAIN
   305    305   	if (Tcl_GetNameOfExecutable() == NULL) {
   306         -#    ifdef _WIN32_WCE
          306  +#      ifdef _WIN32_WCE
   307    307   		dladdr_ret = dladdr(&WinMain, &syminfo);
   308         -#    else
          308  +#      else
   309    309   		dladdr_ret = dladdr(&wWinMain, &syminfo);
   310         -#    endif /* _WIN32_WCE */
          310  +#      endif /* _WIN32_WCE */
   311    311   
   312    312   		if (dladdr_ret != 0) {
   313    313   			SetExecName(interp, syminfo.dli_fname);
   314    314   
   315    315   			return;
   316    316   		}
   317    317   	}
   318         -#  endif /* KITSH_NEED_WINMAIN */
          318  +#    endif /* KITSH_NEED_WINMAIN */
   319    319   
   320    320   	if (Tcl_GetNameOfExecutable() == NULL) {
   321    321   		dladdr_ret = dladdr(&main, &syminfo);
   322    322   		if (dladdr_ret != 0) {
   323    323   			SetExecName(interp, syminfo.dli_fname);
   324    324   
   325    325   			return;
   326    326   		}
   327    327   	}
          328  +#  endif /* !TCLKIT_DLL */
   328    329   #endif /* HAVE_ACCEPTABLE_DLADDR */
   329    330   
   330    331   	if (Tcl_GetNameOfExecutable() == NULL) {
   331    332   		lobjv[0] = Tcl_GetVar2Ex(interp, "argv0", NULL, TCL_GLOBAL_ONLY);
   332    333   		execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv);
   333    334   
   334    335   		SetExecName(interp, Tcl_GetStringFromObj(execNameObj, &len));