Tk Source Code

Check-in [87938e1f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix --disable-shared build on Windows. Eliminate warning in tkWinTest.c
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256: 87938e1f60fb7d1b9bc2bcb07e03eda2ae46da2c36b941ca5a72c613c146b380
User & Date: jan.nijtmans 2024-04-30 09:57:37
Context
2024-04-30
21:26
Merge 8.6 check-in: c2952818 user: jan.nijtmans tags: core-8-branch
11:17
Fix TkCygwinMainEx() function: Didn't work on Cygwin X11 yet, because it used the wrong Tk library name. Also symplify this function (int -> void return) Fix warning in tkWinTest.c check-in: 3fde0cbf user: jan.nijtmans tags: trunk, main
09:57
Fix --disable-shared build on Windows. Eliminate warning in tkWinTest.c check-in: 87938e1f user: jan.nijtmans tags: core-8-branch
09:52
Simplify TkCygwinMainEx (int -> void return). Fix --disable-shared build on Windows (broken by previous commit) check-in: 86e1195e user: jan.nijtmans tags: core-8-6-branch
08:44
Eliminate the use of Tcl_GetPathType() check-in: 15e322ca user: jan.nijtmans tags: core-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkWindow.c.

3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
 *----------------------------------------------------------------------
 */

int
Tk_Init(
    Tcl_Interp *interp)		/* Interpreter to initialize. */
{
#if defined(_WIN32)
    if (tkcygwindll) {
	int (*tkinit)(Tcl_Interp *);

	tkinit = (int(*)(Tcl_Interp *))(void *)GetProcAddress(tkcygwindll,"Tk_Init");
	if (tkinit) {
	    return tkinit(interp);
	}







|







3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
 *----------------------------------------------------------------------
 */

int
Tk_Init(
    Tcl_Interp *interp)		/* Interpreter to initialize. */
{
#if defined(_WIN32) && !defined(STATIC_BUILD)
    if (tkcygwindll) {
	int (*tkinit)(Tcl_Interp *);

	tkinit = (int(*)(Tcl_Interp *))(void *)GetProcAddress(tkcygwindll,"Tk_Init");
	if (tkinit) {
	    return tkinit(interp);
	}
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
     * - No CPU time limit, no memory allocation limits, no color limits.
     *   CPU time limits can be imposed by an unsafe parent interpreter.
     *
     * The actual code called is the same as Tk_Init but Tcl_IsSafe() is
     * checked at several places to differentiate the two initialisations.
     */

#if defined(_WIN32)
    if (tkcygwindll) {
	int (*tksafeinit)(Tcl_Interp *);

	tksafeinit = (int (*)(Tcl_Interp *))
		(void *)GetProcAddress(tkcygwindll, "Tk_SafeInit");
	if (tksafeinit) {
	    return tksafeinit(interp);







|







3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
     * - No CPU time limit, no memory allocation limits, no color limits.
     *   CPU time limits can be imposed by an unsafe parent interpreter.
     *
     * The actual code called is the same as Tk_Init but Tcl_IsSafe() is
     * checked at several places to differentiate the two initialisations.
     */

#if defined(_WIN32) && !defined(STATIC_BUILD)
    if (tkcygwindll) {
	int (*tksafeinit)(Tcl_Interp *);

	tksafeinit = (int (*)(Tcl_Interp *))
		(void *)GetProcAddress(tkcygwindll, "Tk_SafeInit");
	if (tksafeinit) {
	    return tksafeinit(interp);

Changes to win/tkWinTest.c.

13
14
15
16
17
18
19


20
21
22
23
24
25
26
 */

#undef USE_TCL_STUBS
#define USE_TCL_STUBS
#undef USE_TK_STUBS
#define USE_TK_STUBS
#include "tkWinInt.h"



HWND tkWinCurrentDialog;

/*
 * Forward declarations of functions defined later in this file:
 */








>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 */

#undef USE_TCL_STUBS
#define USE_TCL_STUBS
#undef USE_TK_STUBS
#define USE_TK_STUBS
#include "tkWinInt.h"
#undef TCLBOOLWARNING
#define TCLBOOLWARNING(boolPtr) /* needed here because we compile with -Wc++-compat */

HWND tkWinCurrentDialog;

/*
 * Forward declarations of functions defined later in this file:
 */