Tcl Source Code

Check-in [9856078e30]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:A little more resilience.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-1224888
Files: files | file ages | folders
SHA1: 9856078e3077fb01e3b7580a4a1d28d67bcc64ea
User & Date: dkf 2011-10-13 12:16:54
Context
2011-10-13
12:34
Getting better; now possibly with autoconf magic! Comments too. check-in: fbc6fd24c0 user: dkf tags: bug-1224888
12:16
A little more resilience. check-in: 9856078e30 user: dkf tags: bug-1224888
12:10
Lash-up to try to deal with [Bug 1224888]. check-in: 47248c347c user: dkf tags: bug-1224888
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to unix/tclUnixFile.c.

78
79
80
81
82
83
84


85

86
87
88
89
90
91
92
	if (readlink(buf2,buf1,PATH_MAX) > 0 && buf1[0] == '/') {
	    name = buf1;
	    goto gotName;
	}
    }
#endif
#ifndef NO_DLFCN_H


    sym = dlsym(RTLD_DEFAULT, "_main");

    if (sym != NULL && dladdr(sym, &dlinfoBuffer)
	    && dlinfoBuffer.dli_fname[0] == '/') {
	name = dlinfoBuffer.dli_fname;
	goto gotName;
    }
#endif








>
>
|
>







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	if (readlink(buf2,buf1,PATH_MAX) > 0 && buf1[0] == '/') {
	    name = buf1;
	    goto gotName;
	}
    }
#endif
#ifndef NO_DLFCN_H
    sym = dlsym(RTLD_DEFAULT, "main");
    if (sym == NULL) {
	sym = dlsym(RTLD_DEFAULT, "_main");
    }
    if (sym != NULL && dladdr(sym, &dlinfoBuffer)
	    && dlinfoBuffer.dli_fname[0] == '/') {
	name = dlinfoBuffer.dli_fname;
	goto gotName;
    }
#endif