From 8aa008feecf66fb147b65f564af0dc679facb58a Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 13 Jun 2006 22:10:19 +0000 Subject: Workaround for silly compiler bug. [Bug 1503729] --- ChangeLog | 5 +++++ unix/tclLoadDl.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 571c505..0fe56c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-13 Donal K. Fellows + + * unix/tclLoadDl.c (TclpDlopen): Workaround for a compiler bug in Sun + Forte 6. [Bug 1503729] + 2006-06-06 Don Porter * doc/GetStdChan.3: Added recommendation that each call to 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; } -- cgit v0.12