From d0fb46d3fe03ace2bdb65f246a83b57388a6d20b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 19 Sep 2012 08:24:26 +0000 Subject: Compile win32 binaries with -DTCL_NO_DEPRECATED, and fix gcc compiler warning --- ChangeLog | 5 +++++ win/Makefile.in | 22 +++++++++++++++------- win/tkWinWm.c | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 916f52f..455931b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-19 Jan Nijtmans + + * win/Makefile.in: Compile win32 binaries with -DTCL_NO_DEPRECATED + * win/tkiWinWm.c: Fix gcc compiler warning. + 2012-09-17 Don Porter *** 8.6b2 TAGGED FOR RELEASE *** diff --git a/win/Makefile.in b/win/Makefile.in index 08bb2c3..d9aafcc 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -203,6 +203,12 @@ COPY = cp BUILD_TCLSH = @BUILD_TCLSH@ +# Tk does not used deprecated Tcl constructs so it should +# compile fine with -DTCL_NO_DEPRECATED. To remove its own +# set of deprecated code uncomment the second line. +NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED +#NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED + # TCL_EXE is the name of a tclsh executable that is available *BEFORE* # running make for the first time. Certain build targets (make genstubs) # need it to be available on the PATH. This executable should *NOT* be @@ -213,7 +219,8 @@ TCL_EXE = @TCLSH_PROG@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ --I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" ${AC_FLAGS} -DUSE_TCL_STUBS +-I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" \ +${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DUSE_TCL_STUBS CC_OBJNAME = @CC_OBJNAME@ CC_EXENAME = @CC_EXENAME@ @@ -387,10 +394,11 @@ TTK_OBJS = \ ttkStubInit.$(OBJEXT) STUB_OBJS = \ - tkStubLib.$(OBJEXT) ttkStubLib.$(OBJEXT) + tkStubLib.$(OBJEXT) \ + ttkStubLib.$(OBJEXT) -TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/doc/*.[13n] -TK_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n] +TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)/doc/*.[13n]" +TK_DOCS = "$(ROOT_DIR_NATIVE)/doc/*.[13n]" CORE_DOCS = $(TCL_DOCS) $(TK_DOCS) DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget @@ -416,12 +424,12 @@ doc: $(ROOT_DIR)/doc/man.macros winhelp: $(TCL_SRC_DIR)/tools/man2help.tcl $(MAN2TCL) $(TCL_EXE) "$(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl" tcl "$(VER)" $(CORE_DOCS) - $(COPY) "$(TCL_BIN_DIR)"/tcl.hpj ./ + $(COPY) "$(TCL_BIN_DIR)/tcl.hpj" ./ hcw /c /e tcl.hpj - $(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)"/tools/ + $(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)/tools/" $(MAN2TCL): $(TCL_SRC_DIR)/tools/man2tcl.c - $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)"/tools/man2tcl.c + $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)/tools/man2tcl.c" # Specifying TESTFLAGS on the command line is the standard way to pass # args to tcltest, ie: diff --git a/win/tkWinWm.c b/win/tkWinWm.c index e353813..dc5d4d9 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -1681,7 +1681,7 @@ ReadIconOrCursorFromFile( (int) lpIDE[i].dwBytesInRes); if (dwBytesRead != lpIDE[i].dwBytesInRes) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "error reading file: ", Tcl_PosixError(interp))); + "error reading file: %s", Tcl_PosixError(interp))); goto readError; } -- cgit v0.12