From 307d14f16b85ccfd297dd1009635376a88d9a74a Mon Sep 17 00:00:00 2001 From: stanton Date: Sat, 6 Mar 1999 23:07:51 +0000 Subject: Added stub patches --- generic/tk.h | 34 ++++++++++++++++++-- generic/tkMain.c | 33 ++++++++++++++++++-- generic/tkStubLib.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ generic/tkWindow.c | 18 +++++++++-- mac/tkMacCursor.c | 5 +-- unix/Makefile.in | 75 +++++++++++++++++++++++++++++++++++++------- unix/configure.in | 57 +++++++++++++++++++++++++++------ unix/tkConfig.sh.in | 21 ++++++++++++- unix/tkUnixPort.h | 20 +++++------- win/tkWinPort.h | 12 ++++++- 10 files changed, 321 insertions(+), 44 deletions(-) create mode 100644 generic/tkStubLib.c diff --git a/generic/tk.h b/generic/tk.h index 26dea99..204c46e9 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.19.4.1 1999/03/06 00:08:01 redman Exp $ + * RCS: @(#) $Id: tk.h,v 1.19.4.2 1999/03/06 23:07:51 stanton Exp $ */ #ifndef _TK @@ -82,9 +82,15 @@ # include #endif +#undef TCL_STORAGE_CLASS #ifdef BUILD_tk -# undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT +#else +# ifdef USE_TK_STUBS +# define TCL_STORAGE_CLASS +# else +# define TCL_STORAGE_CLASS DLLIMPORT +# endif #endif /* @@ -1046,6 +1052,30 @@ typedef int (Tk_SelectionProc) _ANSI_ARGS_((ClientData clientData, int offset, char *buffer, int maxBytes)); +/* + * Public functions that are not accessible via the stubs table. + */ + +EXTERN void Tk_Main _ANSI_ARGS_((int argc, char **argv, + Tcl_AppInitProc *appInitProc)); +EXTERN void Tk_MainEx _ANSI_ARGS_((int argc, char **argv, + Tcl_AppInitProc *appInitProc, Tcl_Interp *interp)); + +/* + * Stubs initialization function. This function should be invoked before + * any other Tk functions in a stubs-aware extension. Tk_InitStubs is + * implemented in the stub library, not the main Tk library. In directly + * linked code, this function turns into a call to Tcl_PkgRequire(). + */ + +EXTERN char * Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, + char *version, int exact)); + +#ifndef USE_TK_STUBS +#define Tk_InitStubs(interp, version, exact) \ + Tcl_PkgRequire(interp, "Tk", version, exact) +#endif + #include "tkDecls.h" #endif /* RESOURCE_INCLUDED */ diff --git a/generic/tkMain.c b/generic/tkMain.c index 0583408..ffd9d8b 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMain.c,v 1.2 1998/09/14 18:23:14 stanton Exp $ + * RCS: @(#) $Id: tkMain.c,v 1.2.4.1 1999/03/06 23:07:51 stanton Exp $ */ #include @@ -67,7 +67,7 @@ static void StdinProc _ANSI_ARGS_((ClientData clientData, /* *---------------------------------------------------------------------- * - * Tk_Main -- + * Tk_Main, Tk_MainEx -- * * Main program for Wish and most other Tk-based applications. * @@ -92,14 +92,41 @@ Tk_Main(argc, argv, appInitProc) * initialization but before starting * to execute commands. */ { + TkMain(argc, argv, appInitProc, Tcl_CreateInterp()); +} + +void +Tk_MainEx(argc, argv, appInitProc, interp) + int argc; /* Number of arguments. */ + char **argv; /* Array of argument strings. */ + Tcl_AppInitProc *appInitProc; /* Application-specific initialization + * procedure to call after most + * initialization but before starting + * to execute commands. */ + Tcl_Interp *interp; /* Application interpreter. */ +{ char *args, *fileName; char buf[20]; int code; size_t length; Tcl_Channel inChannel, outChannel; + /* + * Make sure that Tcl is present. If using stubs this will initialize the + * stub table pointers. + */ + + if (Tcl_Required (interp, NULL, 0) == NULL) { + abort(); + } + Tcl_FindExecutable(argv[0]); - interp = Tcl_CreateInterp(); + + +#if (defined(__WIN32__) || defined(MAC_TCL)) + TkConsoleCreate(); +#endif + #ifdef TCL_MEM_DEBUG Tcl_InitMemory(interp); #endif diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c new file mode 100644 index 0000000..24342be --- /dev/null +++ b/generic/tkStubLib.c @@ -0,0 +1,90 @@ +/* + * tkStubLib.c -- + * + * Stub object that will be statically linked into extensions that wish + * to access Tk. + * + * Copyright (c) 1998 Paul Duffin. + * Copyright (c) 1998-1999 by Scriptics Corporation. + * + * 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.1.2.1 1999/03/06 23:07:51 stanton Exp $ + */ + +/* + * We need to ensure that we use the stub macros so that this file contains + * no references to any of the stub functions. This will make it possible + * to build an extension that references Tk_InitStubs but doesn't end up + * including the rest of the stub functions. + */ + +#ifndef USE_TK_STUBS +#define USE_TK_STUBS +#endif +#undef USE_TK_STUB_PROCS + +#ifndef USE_TCL_STUBS +#define USE_TCL_STUBS +#endif + +/* + * Ensure that Tk_InitStubs is built as an exported symbol. The other stub + * functions should be built as non-exported symbols. + */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT + +TkStubs *tkStubsPtr; +TkPlatStubs *tkPlatStubsPtr; +TkIntStubs *tkIntStubsPtr; +TkIntPlatStubs *tkIntPlatStubsPtr; + + +/* + *---------------------------------------------------------------------- + * + * Tk_InitStubs -- + * + * Checks that the correct version of Tk is loaded and that it + * supports stubs. It then initialises the stub table pointers. + * + * Results: + * The actual version of Tk that satisfies the request, or + * NULL to indicate that an error occurred. + * + * Side effects: + * Sets the stub table pointers. + * + *---------------------------------------------------------------------- + */ + +char * +Tk_InitStubs(interp, version, exact) + Tcl_Interp *interp; + char *version; + int exact; +{ + char *actualVersion; + + actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, exact, + (ClientData *) &tkStubsPtr); + if (!actualVersion) { + return NULL; + } + + if (!tkStubsPtr) { + Tcl_SetResult(interp, + "This implementation of Tk does not support stubs", + TCL_STATIC); + return NULL; + } + + tkPlatStubsPtr = tkStubsPtr->hooks->tkPlatStubs; + tkIntStubsPtr = tkStubsPtr->hooks->tkIntStubs; + tkIntPlatStubsPtr = tkStubsPtr->hooks->tkIntPlatStubs; + + return actualVersion; +} diff --git a/generic/tkWindow.c b/generic/tkWindow.c index aeb948b..455b528 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.4.4.1 1999/03/06 02:23:17 redman Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.4.4.2 1999/03/06 23:07:52 stanton Exp $ */ #include "tkPort.h" @@ -2613,6 +2613,15 @@ Initialize(interp) char buffer[30]; /* + * Ensure that we are getting the matching version of Tcl. This is + * really only an issue when Tk is loaded dynamically. + */ + + if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) { + return TCL_ERROR; + } + + /* * Start by initializing all the static variables to default acceptable * values so that no information is leaked from a previous run of this * code. @@ -2821,7 +2830,12 @@ Initialize(interp) code = TCL_ERROR; goto done; } - code = Tcl_PkgProvide(interp, "Tk", TK_VERSION); + + /* + * Provide Tk and its stub table. + */ + + code = Tcl_PkgProvide(interp, "Tk", TK_VERSION, (ClientData) tkStubsPtr); if (code != TCL_OK) { goto done; } diff --git a/mac/tkMacCursor.c b/mac/tkMacCursor.c index 4b8a454..42381cf 100644 --- a/mac/tkMacCursor.c +++ b/mac/tkMacCursor.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacCursor.c,v 1.3 1998/09/14 18:23:34 stanton Exp $ + * RCS: @(#) $Id: tkMacCursor.c,v 1.3.4.1 1999/03/06 23:07:52 stanton Exp $ */ #include "tkPort.h" @@ -385,7 +385,8 @@ TkpSetCursor( *---------------------------------------------------------------------- */ -void Tk_MacTkOwnsCursor( +void +Tk_MacTkOwnsCursor( int tkOwnsIt) { gTkOwnsCursor = tkOwnsIt; diff --git a/unix/Makefile.in b/unix/Makefile.in index 691f8d3..7517005 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.11.4.1 1999/03/06 02:23:18 redman Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.11.4.2 1999/03/06 23:07:52 stanton Exp $ # Current Tk version; used in various names. @@ -137,7 +137,8 @@ TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@ TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@ #TK_STUB_LIB_FLAG = -ltkstub - +TCL_STUB_FLAGS = @TCL_STUB_FLAGS@ +#TCL_STUB_FLAGS = -DUSE_TCL_STUBS # Libraries to use when linking. This definition is determined by the # configure script. @@ -178,6 +179,9 @@ TK_LIB_FILE = @TK_LIB_FILE@ TK_LIB_FLAG = @TK_LIB_FLAG@ #TK_LIB_FLAG = -ltk +TK_EXP_FILE = @TK_EXP_FILE@ +TK_BUILD_EXP_FILE = @TK_BUILD_EXP_FILE@ + # The symbol below provides support for dynamic loading and shared # libraries. See configure.in for a description of what it means. # The values of the symbolis normally set by the configure script. @@ -217,20 +221,21 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TK_SHLIB_CFLAGS} \ -I${UNIX_DIR} -I${GENERIC_DIR} \ -I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \ ${AC_FLAGS} ${PROTO_FLAGS} \ -${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} +${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \ +${TCL_STUB_FLAGS} STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I${UNIX_DIR} -I${GENERIC_DIR} \ -I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \ ${AC_FLAGS} ${PROTO_FLAGS} \ -${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS}\ +${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} ${TCL_STUB_FLAGS} \ -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\" DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \ -I${BMAP_DIR} \ -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \ ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \ -${KEYSYM_FLAGS} -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\" $(STUB_FLAGS) +${KEYSYM_FLAGS} $(TCL_STUB_FLAGS) -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\" WISH_OBJS = tkAppInit.o @@ -265,6 +270,10 @@ OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \ tkSelect.o tkUtil.o tkVisual.o tkWindow.o \ $(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS) +TK_DECLS = \ + $(GENERIC_DIR)/tk.decls \ + $(GENERIC_DIR)/tkInt.decls + SRCS = \ $(GENERIC_DIR)/tk3d.c $(GENERIC_DIR)/tkArgv.c \ $(GENERIC_DIR)/tkAtom.c $(GENERIC_DIR)/tkBind.c \ @@ -393,7 +402,7 @@ install: install-binaries install-libraries install-demos install-man # some ranlibs write to current directory, and this might not always be # possible (e.g. if installing as root). -install-binaries: $(TK_LIB_FILE) wish +install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \ do \ if [ ! -d $$i ] ; then \ @@ -407,10 +416,20 @@ install-binaries: $(TK_LIB_FILE) wish @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE) @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE)) @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE) + @if test "$(TK_BUILD_EXP_FILE)" != ""; then \ + echo "Installing $(TK_EXP_FILE)"; \ + $(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \ + $(LIB_INSTALL_DIR)/$(TK_EXP_FILE); \ + fi @echo "Installing wish" @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION) @echo "Installing tkConfig.sh" @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh + @if test "$(TK_STUB_LIB_FILE)" != "" ; then \ + echo "Installing $(TK_STUB_LIB_FILE)"; \ + $(INSTALL_DATA) $(STUB_LIB_FILE) \ + $(LIB_INSTALL_DIR)/$(TK_STUB_LIB_FILE); \ + fi install-libraries: @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \ @@ -795,27 +814,59 @@ tkUnixXId.o: $(UNIX_DIR)/tkUnixXId.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixXId.c tkStubInit.o: $(GENERIC_DIR)/tkStubInit.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubInit.c + $(CC) -c $(C__SWITCHES) $(GENERIC_DIR)/tkStubInit.c + + +# Stub library binaries, these must be compiled for use in a shared library +# even though they will be placed in a static archive tkStubs.o: $(GENERIC_DIR)/tkStubs.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubs.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkStubs.c tkIntStubs.o: $(GENERIC_DIR)/tkIntStubs.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkIntStubs.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkIntStubs.c tkPlatStubs.o: $(GENERIC_DIR)/tkPlatStubs.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlatStubs.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkPlatStubs.c tkIntPlatStubs.o: $(GENERIC_DIR)/tkIntPlatStubs.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkIntPlatStubs.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkIntPlatStubs.c tkIntXlibStubs.o: $(GENERIC_DIR)/tkIntXlibStubs.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkIntXlibStubs.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkIntXlibStubs.c + +tkStubLib.o: $(GENERIC_DIR)/tkStubLib.c + $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkStubLib.c .c.o: $(CC) -c $(CC_SWITCHES) $< # +# Target to regenerate header files and stub files from the *.decls tables. +# + +genstubs: + tclsh $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ + $(GENERIC_DIR)/tk.decls $(GENERIC_DIR)/tkInt.decls + +# +# Target to check that all exported functions have an entry in the stubs +# tables. +# + +checkstubs: + -@for i in `nm -p $(TK_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \ + | sort -n`; do \ + match=0; \ + for j in $(TK_DECLS); do \ + if [ `grep -c $$i $$j` -gt 0 ]; then \ + match=1; \ + fi; \ + done; \ + if [ $$match -eq 0 ]; then echo $$i; fi \ + done + +# # Target to check for proper usage of UCHAR macro. # diff --git a/unix/configure.in b/unix/configure.in index b9cf4c4..2a0ff72 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. AC_INIT(../generic/tk.h) -# RCS: @(#) $Id: configure.in,v 1.26.4.1 1999/03/06 02:23:18 redman Exp $ +# RCS: @(#) $Id: configure.in,v 1.26.4.2 1999/03/06 23:07:53 stanton Exp $ TK_VERSION=8.0 TK_MAJOR_VERSION=8 @@ -409,13 +409,13 @@ if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then TK_SHARED_BUILD=1 TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}" TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX} - MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}" + MAKE_LIB='\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}' RANLIB=":" else TK_SHARED_BUILD=0 TK_SHLIB_CFLAGS="" TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX} - MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}" + MAKE_LIB='ar cr \${TK_LIB_FILE} \${OBJS}' fi DBGX='${TK_DBGX}' @@ -426,13 +426,52 @@ eval "TK_LIB_FILE=${TK_LIB_FILE}" # AIX remembers this path and will attempt to use it at run-time to look # up the Tcl library. -if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" +if test $TK_SHARED_BUILD = 0 -o $TCL_NEEDS_EXP_FILE = 0; then + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" + else + TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" + fi + TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" + TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" +else + TK_BUILD_EXP_FILE="lib.exp" + eval "TK_EXP_FILE=libtk${TCL_EXPORT_FILE_SUFFIX}" + + TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" + TK_LIB_SPEC="-bI:${exec_prefix}/lib/${TK_EXP_FILE}" +fi + +#-------------------------------------------------------------------- +# The statements below define various symbols relating to Tk +# using tcl stub support. +#-------------------------------------------------------------------- + +AC_MSG_CHECKING(how to link to Tcl) + +AC_ARG_ENABLE(tcl-stub, + [ --enable-tcl-stub use the Tcl stub interface], + [tk_ok=$enableval], [tk_ok=no]) + +if test "$tk_ok" = "yes" ; then + + AC_MSG_RESULT(using Tcl stub interface) + + TCL_STUB_FLAGS="-DUSE_TCL_STUBS" + + # Don't link Tk directly to Tcl. + + if test "$SHLIB_LD_LIBS" = '${LIBS}'; then + SHLIB_LD_LIBS='${STUB_LIBS}' + else + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_BUILD_STUB_LIB_SPEC}" + fi else - TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" + AC_MSG_RESULT(dynamic linking) + + TCL_BUILD_STUB_LIB_SPEC="" + TCL_STUB_FLAGS="" fi -TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" -TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}" #-------------------------------------------------------------------- # The statements below define various symbols relating to Tcl @@ -468,7 +507,7 @@ AC_SUBST(TK_STUB_LIB_SPEC) AC_SUBST(TK_BUILD_STUB_LIB_PATH) AC_SUBST(TK_STUB_LIB_PATH) AC_SUBST(MAKE_STUB_LIB) - +AC_SUBST(TCL_STUB_FLAGS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_DEFAULT) diff --git a/unix/tkConfig.sh.in b/unix/tkConfig.sh.in index bb5da6d..bf96c19 100644 --- a/unix/tkConfig.sh.in +++ b/unix/tkConfig.sh.in @@ -11,7 +11,7 @@ # # The information in this file is specific to a single platform. # -# RCS: @(#) $Id: tkConfig.sh.in,v 1.6 1998/09/14 18:23:55 stanton Exp $ +# RCS: @(#) $Id: tkConfig.sh.in,v 1.6.4.1 1999/03/06 23:07:53 stanton Exp $ # Tk's version number. TK_VERSION='@TK_VERSION@' @@ -72,3 +72,22 @@ TK_SRC_DIR='@TK_SRC_DIR@' TK_CC_SEARCH_FLAGS='@TK_CC_SEARCH_FLAGS@' TK_LD_SEARCH_FLAGS='@TK_LD_SEARCH_FLAGS@' +# The name of the Tk stub library (.a): +TK_STUB_LIB_FILE='@TK_STUB_LIB_FILE@' + +# -l flag to pass to the linker to pick up the Tk stub library +TK_STUB_LIB_FLAG='@TK_STUB_LIB_FLAG@' + +# String to pass to linker to pick up the Tk stub library from its +# build directory. +TK_BUILD_STUB_LIB_SPEC='@TK_BUILD_STUB_LIB_SPEC@' + +# String to pass to linker to pick up the Tk stub library from its +# installed directory. +TK_STUB_LIB_SPEC='@TK_STUB_LIB_SPEC@' + +# Path to the Tk stub library in the build directory. +TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@' + +# Path to the Tk stub library in the install directory. +TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@' diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h index 5b0800a..30dbcbe 100644 --- a/unix/tkUnixPort.h +++ b/unix/tkUnixPort.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixPort.h,v 1.3 1998/09/30 19:01:22 rjohnson Exp $ + * RCS: @(#) $Id: tkUnixPort.h,v 1.3.4.1 1999/03/06 23:07:53 stanton Exp $ */ #ifndef _UNIXPORT @@ -176,13 +176,6 @@ extern int errno; #endif /* - * Declarations for various library procedures that may not be declared - * in any other header file. - */ - -extern void panic _ANSI_ARGS_(TCL_VARARGS(char *, string)); - -/* * These functions do nothing under Unix, so we just eliminate calls to them. */ @@ -221,10 +214,13 @@ extern void panic _ANSI_ARGS_(TCL_VARARGS(char *, string)); #define ALWAYS_SHOW_SELECTION /* - * The following declaration is used to get access to a private Tcl interface - * that is needed for portability reasons. + * tclInt.h is included to get declarations of the following functions. + * void panic _ANSI_ARGS_(TCL_VARARGS(char *,format)); + * void TclpGetTime _ANSI_ARGS_((Tcl_Time *time)); */ - -EXTERN void TclpGetTime _ANSI_ARGS_((Tcl_Time *time)); + +#ifndef _TCLINT +# include +#endif #endif /* _UNIXPORT */ diff --git a/win/tkWinPort.h b/win/tkWinPort.h index 295681c..0a2dca6 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinPort.h,v 1.3.4.1 1999/03/06 00:07:09 redman Exp $ + * RCS: @(#) $Id: tkWinPort.h,v 1.3.4.2 1999/03/06 23:07:53 stanton Exp $ */ #ifndef _WINPORT @@ -112,4 +112,14 @@ struct timezone { extern int gettimeofday(struct timeval *, struct timezone *); +/* + * tclInt.h is included to get declarations of the following functions. + * void panic _ANSI_ARGS_(TCL_VARARGS(char *,format)); + * void TclpGetTime _ANSI_ARGS_((Tcl_Time *time)); + */ + +#ifndef _TCLINT +# include +#endif + #endif /* _WINPORT */ -- cgit v0.12