summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 08:24:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 08:24:26 (GMT)
commitd0fb46d3fe03ace2bdb65f246a83b57388a6d20b (patch)
tree23357715703ff6530c3a096459127eb54d72ac3c
parent66c995f37fca5f1b4b6891c504e9313e0766e41a (diff)
downloadtk-d0fb46d3fe03ace2bdb65f246a83b57388a6d20b.zip
tk-d0fb46d3fe03ace2bdb65f246a83b57388a6d20b.tar.gz
tk-d0fb46d3fe03ace2bdb65f246a83b57388a6d20b.tar.bz2
Compile win32 binaries with -DTCL_NO_DEPRECATED, and fix gcc compiler warning
-rw-r--r--ChangeLog5
-rw-r--r--win/Makefile.in22
-rw-r--r--win/tkWinWm.c2
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 <nijtmans@users.sf.net>
+
+ * win/Makefile.in: Compile win32 binaries with -DTCL_NO_DEPRECATED
+ * win/tkiWinWm.c: Fix gcc compiler warning.
+
2012-09-17 Don Porter <dgp@users.sourceforge.net>
*** 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;
}