From d80afd9403e34db5407b5d005f40f1b69aae8267 Mon Sep 17 00:00:00 2001 From: das Date: Wed, 2 Apr 2008 21:31:58 +0000 Subject: * generic/tkStubLib.c: make symbols in libtkstub.a MODULE_SCOPE to avoid exporting them from libraries that link with -ltkstub; constify tk*StubsPtr and stub table hook pointers. [Bug 1819422] * generic/tkStubLib.c: undef USE_TCL_STUBS before defining it * generic/ttk/ttkStubLib.c: unconditionally; remove needless #ifdef --- ChangeLog | 27 ++++++++++++++++++++++++++- generic/tkStubLib.c | 24 ++++++++++++++++-------- generic/ttk/ttkStubLib.c | 6 ++---- 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e513ce0..e3edfc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,32 @@ +2008-04-02 Daniel Steffen + + * generic/tk.decls: remove 'export' declarations of symbols now + only in libtkstub and no longer in libtk. + + * generic/tkStubLib.c: make symbols in libtkstub.a MODULE_SCOPE to + avoid exporting them from libraries that link + with -ltkstub; constify tk*StubsPtr and stub + table hook pointers. [Bug 1819422] + + * generic/tkStubLib.c: undef USE_TCL_STUBS before defining it + * generic/ttk/ttkStubLib.c: unconditionally; remove needless #ifdef + + * generic/tkDecls.h: make genstubs + * generic/tkIntDecls.h: + * generic/tkIntPlatDecls.h: + * generic/tkIntXlibDecls.h: + * generic/tkPlatDecls.h: + * generic/tkStubInit.c: + + * unix/configure.in (Darwin): remove now unnecessary unexporting + of libtclstub symbols from libtk. + + * unix/configure: autoconf-2.59 + 2008-04-01 Don Porter * generic/tkStubLib.c (Tk_InitStubs): Added missing error message and - * generic/tkWindow.c (Tk_PkgInitStubsCheck): removed needless $ifdef + * generic/tkWindow.c (Tk_PkgInitStubsCheck): removed needless #ifdef complexity. * generic/tkWindow.c: Revised package initialization so that diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c index 45fc9ef..ddfd986 100644 --- a/generic/tkStubLib.c +++ b/generic/tkStubLib.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: tkStubLib.c,v 1.23 2008/04/02 04:06:38 dgp Exp $ + * RCS: @(#) $Id: tkStubLib.c,v 1.24 2008/04/02 21:31:58 das Exp $ */ /* @@ -20,7 +20,9 @@ * including the rest of the stub functions. */ +#undef USE_TCL_STUBS #define USE_TCL_STUBS + #define USE_TK_STUBS #include "tkInt.h" @@ -41,11 +43,17 @@ #include "tkPlatDecls.h" #include "tkIntXlibDecls.h" -TkStubs *tkStubsPtr = NULL; -TkPlatStubs *tkPlatStubsPtr = NULL; -TkIntStubs *tkIntStubsPtr = NULL; -TkIntPlatStubs *tkIntPlatStubsPtr = NULL; -TkIntXlibStubs *tkIntXlibStubsPtr = NULL; +MODULE_SCOPE const TkStubs *tkStubsPtr; +MODULE_SCOPE const TkPlatStubs *tkPlatStubsPtr; +MODULE_SCOPE const TkIntStubs *tkIntStubsPtr; +MODULE_SCOPE const TkIntPlatStubs *tkIntPlatStubsPtr; +MODULE_SCOPE const TkIntXlibStubs *tkIntXlibStubsPtr; + +const TkStubs *tkStubsPtr = NULL; +const TkPlatStubs *tkPlatStubsPtr = NULL; +const TkIntStubs *tkIntStubsPtr = NULL; +const TkIntPlatStubs *tkIntPlatStubsPtr = NULL; +const TkIntXlibStubs *tkIntXlibStubsPtr = NULL; /* * Use our own isdigit to avoid linking to libc on windows @@ -74,14 +82,14 @@ static int isDigit(const int c) *---------------------------------------------------------------------- */ -CONST char * +MODULE_SCOPE CONST char * Tk_InitStubs( Tcl_Interp *interp, CONST char *version, int exact) { CONST char *actualVersion; - TkStubs **stubsPtrPtr = &tkStubsPtr; /* squelch warning */ + const TkStubs **stubsPtrPtr = &tkStubsPtr; /* squelch warning */ actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0, (ClientData *) stubsPtrPtr); diff --git a/generic/ttk/ttkStubLib.c b/generic/ttk/ttkStubLib.c index 15d4d28..5087a18 100644 --- a/generic/ttk/ttkStubLib.c +++ b/generic/ttk/ttkStubLib.c @@ -1,5 +1,5 @@ /* - * $Id: ttkStubLib.c,v 1.5 2008/03/27 12:04:02 das Exp $ + * $Id: ttkStubLib.c,v 1.6 2008/04/02 21:31:58 das Exp $ * SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ @@ -8,10 +8,8 @@ * contains no references to any of the tcl stub functions. */ -#ifndef USE_TCL_STUBS +#undef USE_TCL_STUBS #define USE_TCL_STUBS -#endif -#undef USE_TCL_STUB_PROCS #include "tk.h" -- cgit v0.12