diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2006-06-13 22:54:01 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2006-06-13 22:54:01 (GMT) |
commit | 0c32ed9ff184245f1517edf43a56d458a73b871f (patch) | |
tree | 08a493721e1c7133b1cafe010eb7064269860556 | |
parent | 5e641ebc8094bafba9b515eea6e4df375039c0de (diff) | |
download | tcl-0c32ed9ff184245f1517edf43a56d458a73b871f.zip tcl-0c32ed9ff184245f1517edf43a56d458a73b871f.tar.gz tcl-0c32ed9ff184245f1517edf43a56d458a73b871f.tar.bz2 |
Workaround for silly compiler bug. [Bug 1503729]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | unix/tclLoadDl.c | 12 |
2 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2006-06-13 Donal K. Fellows <donal.k.fellows@man.ac.uk> + + * unix/tclLoadDl.c (TclpDlopen): Workaround for a compiler bug in Sun + Forte 6. [Bug 1503729] + 2006-06-06 Don Porter <dgp@users.sourceforge.net> * doc/GetStdChan.3: Added recommendation that each call to 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; } |