diff options
author | dkf <dkf@noemail.net> | 2006-06-13 22:10:19 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2006-06-13 22:10:19 (GMT) |
commit | d4ad35eeae0dea059b0eb6baa827fe3de5d2acf2 (patch) | |
tree | aad3e8d23373ad1caf9967cd45978bf4baca8957 /unix | |
parent | b1c0a3117173ae19ff58b0fbdb90028d5a3e94f2 (diff) | |
download | tcl-d4ad35eeae0dea059b0eb6baa827fe3de5d2acf2.zip tcl-d4ad35eeae0dea059b0eb6baa827fe3de5d2acf2.tar.gz tcl-d4ad35eeae0dea059b0eb6baa827fe3de5d2acf2.tar.bz2 |
Workaround for silly compiler bug. [Bug 1503729]
FossilOrigin-Name: a9466506482e27961d728c426d32cf999d761122
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclLoadDl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index fa1371f..d92dc04 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -9,7 +9,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.15 2005/11/11 23:46:34 dkf Exp $ + * RCS: @(#) $Id: tclLoadDl.c,v 1.16 2006/06/13 22:10:19 dkf Exp $ */ #include "tclInt.h" @@ -92,8 +92,15 @@ TclpDlopen( } 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(), NULL); + Tcl_GetString(pathPtr), "\": ", errorStr, NULL); return TCL_ERROR; } |