diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-25 10:01:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-25 10:01:36 (GMT) |
commit | 4ddfabceb1dd92219b221373226f24345bd86759 (patch) | |
tree | dccec125103eba842f379dfcfa174b8349ce64b9 /unix | |
parent | 1b7e7f9d63511b6a708a4b20a4f4f66b242eca97 (diff) | |
download | tk-4ddfabceb1dd92219b221373226f24345bd86759.zip tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.gz tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.bz2 |
TIP #628 for Tk: Shared 8.7/9.0 build environment
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 10 | ||||
-rw-r--r-- | unix/configure.ac | 10 | ||||
-rw-r--r-- | unix/tkUnixCursor.c | 6 | ||||
-rw-r--r-- | unix/tkUnixFont.c | 16 | ||||
-rw-r--r-- | unix/tkUnixKey.c | 2 | ||||
-rw-r--r-- | unix/tkUnixRFont.c | 16 | ||||
-rw-r--r-- | unix/tkUnixWm.c | 4 |
7 files changed, 36 insertions, 28 deletions
diff --git a/unix/configure b/unix/configure index 6b96ef4..0edc7ac 100755 --- a/unix/configure +++ b/unix/configure @@ -8900,14 +8900,18 @@ fi #-------------------------------------------------------------------- # Replace ${VERSION} with contents of ${TK_VERSION} -eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" -eval "TK_STUB_LIB_DIR=${libdir}" - +if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + TK_STUB_LIB_FILE="libtkstub.a" + TK_STUB_LIB_FLAG="-ltkstub" +else + eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}" else TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`" fi +fi +eval "TK_STUB_LIB_DIR=${libdir}" TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}" diff --git a/unix/configure.ac b/unix/configure.ac index cce5c29..19f91af 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -711,14 +711,18 @@ AC_SUBST(INSTALL_MSGS) #-------------------------------------------------------------------- # Replace ${VERSION} with contents of ${TK_VERSION} -eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" -eval "TK_STUB_LIB_DIR=${libdir}" - +if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + TK_STUB_LIB_FILE="libtkstub.a" + TK_STUB_LIB_FLAG="-ltkstub" +else + eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}" else TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`" fi +fi +eval "TK_STUB_LIB_DIR=${libdir}" TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}" diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c index 46da1d1..a3c1d0b 100644 --- a/unix/tkUnixCursor.c +++ b/unix/tkUnixCursor.c @@ -180,7 +180,7 @@ static const struct TkCursorName { #endif static Cursor CreateCursorFromTableOrFile(Tcl_Interp *interp, - Tk_Window tkwin, TkSizeT argc, const char **argv, + Tk_Window tkwin, Tcl_Size argc, const char **argv, const struct TkCursorName *tkCursorPtr); /* @@ -210,7 +210,7 @@ TkGetCursorByName( { TkUnixCursor *cursorPtr = NULL; Cursor cursor = None; - TkSizeT argc; + Tcl_Size argc; const char **argv = NULL; Display *display = Tk_Display(tkwin); int inTkTable = 0; @@ -381,7 +381,7 @@ static Cursor CreateCursorFromTableOrFile( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which cursor will be used. */ - TkSizeT argc, + Tcl_Size argc, const char **argv, /* Cursor spec parsed into elements. */ const struct TkCursorName *tkCursorPtr) /* Non-NULL when cursor is defined in Tk diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index d706887..da10e31 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -1007,7 +1007,7 @@ Tk_MeasureChars( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char *source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ - int numBytes, /* Maximum number of bytes to consider from + Tcl_Size numBytes, /* Maximum number of bytes to consider from * source string. */ int maxLength, /* If >= 0, maxLength specifies the longest * permissible line length in pixels; don't @@ -1219,10 +1219,10 @@ TkpMeasureCharsInContext( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char *source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ - TCL_UNUSED(int), /* Maximum number of bytes to consider from + TCL_UNUSED(Tcl_Size), /* Maximum number of bytes to consider from * source string in all. */ - int rangeStart, /* Index of first byte to measure. */ - int rangeLength, /* Length of range to measure in bytes. */ + Tcl_Size rangeStart, /* Index of first byte to measure. */ + Tcl_Size rangeLength, /* Length of range to measure in bytes. */ int maxLength, /* If >= 0, maxLength specifies the longest * permissible line length; don't consider any * character that would cross this x-position. @@ -1276,7 +1276,7 @@ Tk_DrawChars( * is passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ + Tcl_Size numBytes, /* Number of bytes in string. */ int x, int y) /* Coordinates at which to place origin of * string when drawing. */ { @@ -1443,9 +1443,9 @@ TkpDrawAngledCharsInContext( * passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ - int rangeStart, /* Index of first byte to draw. */ - int rangeLength, /* Length of range to draw in bytes. */ + Tcl_Size numBytes, /* Number of bytes in string. */ + Tcl_Size rangeStart, /* Index of first byte to draw. */ + Tcl_Size rangeLength, /* Length of range to draw in bytes. */ double x, double y, /* Coordinates at which to place origin of the * whole (not just the range) string when * drawing. */ diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index 16adcf3..109fa4f 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -100,7 +100,7 @@ TkpGetString( XEvent *eventPtr, /* X keyboard event. */ Tcl_DString *dsPtr) /* Initialized, empty string to hold result. */ { - TkSizeT len; + Tcl_Size len; Tcl_DString buf; TkKeyEvent *kePtr = (TkKeyEvent *) eventPtr; diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index c1cd2b5..136506d 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -706,7 +706,7 @@ Tk_MeasureChars( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char *source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ - int numBytes, /* Maximum number of bytes to consider from + Tcl_Size numBytes, /* Maximum number of bytes to consider from * source string. */ int maxLength, /* If >= 0, maxLength specifies the longest * permissible line length in pixels; don't @@ -822,9 +822,9 @@ int TkpMeasureCharsInContext( Tk_Font tkfont, const char *source, - int numBytes, - int rangeStart, - int rangeLength, + Tcl_Size numBytes, + Tcl_Size rangeStart, + Tcl_Size rangeLength, int maxLength, int flags, int *lengthPtr) @@ -934,7 +934,7 @@ Tk_DrawChars( * is passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ + Tcl_Size numBytes, /* Number of bytes in string. */ int x, int y) /* Coordinates at which to place origin of * string when drawing. */ { @@ -1406,9 +1406,9 @@ TkpDrawAngledCharsInContext( * passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ - int rangeStart, /* Index of first byte to draw. */ - int rangeLength, /* Length of range to draw in bytes. */ + Tcl_Size numBytes, /* Number of bytes in string. */ + Tcl_Size rangeStart, /* Index of first byte to draw. */ + Tcl_Size rangeLength, /* Length of range to draw in bytes. */ double x, double y, /* Coordinates at which to place origin of the * whole (not just the range) string when * drawing. */ diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index a49fdc3..d6f48a8 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -3056,7 +3056,7 @@ WmProtocolCmd( ProtocolHandler *protPtr, *prevPtr; Atom protocol; const char *cmd; - TkSizeT cmdLength; + Tcl_Size cmdLength; if ((objc < 3) || (objc > 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?name? ?command?"); @@ -5508,7 +5508,7 @@ SetNetWmType( for (n = 0; n < objc; ++n) { Tcl_DString ds, dsName; - TkSizeT len; + Tcl_Size len; char *name = Tcl_GetStringFromObj(objv[n], &len); Tcl_UtfToUpper(name); |