summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDl.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2006-06-13 22:54:00 (GMT)
committerdkf <dkf@noemail.net>2006-06-13 22:54:00 (GMT)
commit93426f291c215a592a4fa06ce6e9d6dcce1d4227 (patch)
tree08a493721e1c7133b1cafe010eb7064269860556 /unix/tclLoadDl.c
parentfee6a6f0f2e8ee0a3660b7bc3933609bd3580501 (diff)
downloadtcl-93426f291c215a592a4fa06ce6e9d6dcce1d4227.zip
tcl-93426f291c215a592a4fa06ce6e9d6dcce1d4227.tar.gz
tcl-93426f291c215a592a4fa06ce6e9d6dcce1d4227.tar.bz2
Workaround for silly compiler bug. [Bug 1503729]
FossilOrigin-Name: 145ea285f8f6dca71ef44c54cf9b02866bd901fb
Diffstat (limited to 'unix/tclLoadDl.c')
-rw-r--r--unix/tclLoadDl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 1a51dd8..daaf6c9 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLoadDl.c,v 1.13 2002/10/10 12:25:53 vincentdarley Exp $
+ * RCS: @(#) $Id: tclLoadDl.c,v 1.13.2.1 2006/06/13 22:54:01 dkf Exp $
*/
#include "tclInt.h"
@@ -90,9 +90,15 @@ TclpDlopen(interp, pathPtr, loadHandle, unloadProcPtr)
}
if (handle == NULL) {
+ /*
+ * Write the string to a variable first to work around a compiler bug
+ * in the Sun Forte 6 compiler. [Bug 1503729]
+ */
+
+ CONST char *errorStr = dlerror();
+
Tcl_AppendResult(interp, "couldn't load file \"",
- Tcl_GetString(pathPtr),
- "\": ", dlerror(), (char *) NULL);
+ Tcl_GetString(pathPtr), "\": ", errorStr, (char *) NULL);
return TCL_ERROR;
}