summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-02 08:18:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-02 08:18:30 (GMT)
commitf12a8565b7dec286dead34e157892fed3202f352 (patch)
treec47dbd0ed313adb5371167f0e18f2b7a5086d05b
parent95c723cdcfe9a574608d9d85288588b9ea982bc9 (diff)
parent1754d107eec0f5a8ac1d589923bb650f8995e63e (diff)
downloadtk-f12a8565b7dec286dead34e157892fed3202f352.zip
tk-f12a8565b7dec286dead34e157892fed3202f352.tar.gz
tk-f12a8565b7dec286dead34e157892fed3202f352.tar.bz2
merge trunk
-rw-r--r--ChangeLog57
-rw-r--r--changes50
-rw-r--r--doc/canvas.n2
-rw-r--r--generic/tkClipboard.c7
-rw-r--r--generic/ttk/ttkEntry.c6
-rw-r--r--unix/install-sh6
-rw-r--r--unix/tkUnixKey.c22
-rw-r--r--unix/tkUnixSend.c7
-rwxr-xr-xwin/configure12
-rw-r--r--win/makefile.vc90
-rw-r--r--win/nmakehlp.c153
-rw-r--r--win/rules.vc10
-rw-r--r--win/tcl.m412
13 files changed, 244 insertions, 190 deletions
diff --git a/ChangeLog b/ChangeLog
index 969ebc2..0a98897 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2012-07-31 Donal K. Fellows <dkf@users.sf.net>
+
+ * unix/tkUnixKey.c (TkpSetKeycodeAndState, TkpInitKeymapInfo)
+ (TkpGetKeySym): [Bug 3551802]: Convert from XKeycodeToKeysym to
+ XkbKeycodeToKeysym to fix deprecation warning.
+
+2012-07-31 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/nmakehlp.c: Backport from Tcl 8.6, but add -Q option from
+ sampleextension.
+
+2012-07-17 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/makefile.vc: [Bug 3544932]: Visual studio compiler check fails
+
2012-07-05 Jan Nijtmans <nijtmans@users.sf.net>
* win/tkWinDialog.c (GetFileNameW): [Bug 3540127]: Better solution,
@@ -79,7 +94,8 @@
* generic/tkMain.c: Implement TkCygwinMainEx for loading
* generic/tkWindow.c: Cygwin's Tk_MainEx from the Tk dll.
* generic/tkInt.decls: Change XChangeWindowAttributes signature and
- * generic/tkIntXlibDeclsDecls.h: many others to match Xorg, needed for Cygwin.
+ * generic/tkIntXlibDeclsDecls.h: many others to match Xorg, needed for
+ Cygwin.
2012-06-06 Jan Nijtmans <nijtmans@users.sf.net>
@@ -88,12 +104,12 @@
2012-05-31 Jan Nijtmans <nijtmans@users.sf.net>
- * generic/tkWindow.c: Simpify determination whether we are running on cygwin.
- * generic/tkStubInit.c: Export Tk_GetHINSTANCE, TkSetPixmapColormap and
- * generic/tkInt.decls: TkpPrintWindowId on the Cygwin dll, sync stub table
- with Tk 8.6 win32 version.
+ * generic/tkWindow.c: Simplify determination whether we are running
+ * generic/tkStubInit.c: on cygwin. Export Tk_GetHINSTANCE,
+ * generic/tkInt.decls: TkSetPixmapColormap and TkpPrintWindowId on the
+ Cygwin dll, sync stub table with Tk 8.6 win32 version.
* generic/tk*Decls.h: re-generated
- * win/Makefile.in: Fix "make genstubs" when cross-compiling on UNIX
+ * win/Makefile.in: "make genstubs" when cross-compiling on UNIX
* win/stubs.c: Implement XFlush and various others for win32 as stubs,
* win/tkWinPort.h: so win32 extensions using those can run under CYGWIN as well.
@@ -107,13 +123,13 @@
2012-05-28 Francois Vogel <fvogelnew1@free.fr>
- * doc/text.n: [Bug 1630251]: Documentation for -endline option was wrong
+ * doc/text.n: [Bug 1630251]: Doc for -endline option was wrong
2012-05-28 Francois Vogel <fvogelnew1@free.fr>
- * generic/tkTextDisp.c: [Bug 1630254]: missing scrolling of text widget
- when from a -startline == -endline initial state it is configured to display
- a non-empty part of it
+ * generic/tkTextDisp.c: [Bug 1630254]: missing scrolling of text widget
+ when from a -startline == -endline initial state it is configured to
+ display a non-empty part of it
2012-05-24 Jan Nijtmans <nijtmans@users.sf.net>
@@ -133,15 +149,16 @@
2012-05-05 Jan Nijtmans <nijtmans@users.sf.net>
* xlib/xcolors.c: Single "const" addition
- * generic/tkWindow.c: If tk.dll loaded in cygwin, don't use the win32 file dialogs
+ * generic/tkWindow.c: If tk.dll loaded in cygwin, don't use the
+ win32 file dialogs
2012-05-04 Jan Nijtmans <nijtmans@users.sf.net>
- * library/menu.tcl: [Bug 2768586]: Menu posting problem on dual monitors
+ * library/menu.tcl: [Bug 2768586]: Menu posting on dual monitors
2012-04-29 Jan Nijtmans <nijtmans@users.sf.net>
- * library/tk.tcl: [Bug 533519]: Window placement with multiple screens
+ * library/tk.tcl: [Bug 533519]: Window placement with multiple screens
* generic/tkBind.c:
* generic/tkFocus.c:
* generic/tkMenuDraw.c:
@@ -154,8 +171,8 @@
2012-04-26 Jan Nijtmans <nijtmans@users.sf.net>
- * generic/tk.decls: [Bug 3508771]: Implement TkClipBox, Tk*Region and
- * generic/tkInt.decls: Tk_GetHINSTANCE for Cygwin
+ * generic/tk.decls: [Bug 3508771]: Implement TkClipBox, Tk*Region
+ * generic/tkInt.decls: and Tk_GetHINSTANCE for Cygwin
* generic/tkPlatDecls.h:
* generic/tkintDecls.h:
* generic/tkStubInit.c:
@@ -262,6 +279,11 @@
Tkinter's handling of multiple filename results. Issue was reported
via StackOverflow: http://stackoverflow.com/q/9227859/301832
+2012-01-30 Joe English <jenglish@users.sourceforge.net>
+
+ * library/ttk/combobox.tcl: [Bug 2925561] Don't take focus in
+ disabled state.
+
2012-01-29 Jan Nijtmans <nijtmans@users.sf.net>
* win/tkImgPhoto.c: [Bug 3480634]: PNG Images missing in menus on Mac
@@ -305,6 +327,11 @@
* generic/tkText.c: [Bug-3021557]: Moving the cursor in
* tests/text.test: elided text freezes Tk
+2011-12-22 Don Porter <dgp@users.sourceforge.net>
+
+ * win/tkWinMenu.c: [Bug 3235256] Keep menu entry IDs out of system
+ values. Thanks Colin McDonald.
+
2011-12-13 Donal K. Fellows <dkf@users.sf.net>
* doc/getOpenFile.n: Make example follow best practices. Issue spotted
diff --git a/changes b/changes
index 84c46e9..929fe83 100644
--- a/changes
+++ b/changes
@@ -6946,3 +6946,53 @@ and -to (porter)
2011-10-25 (bug fix)[3410609] AltGr keysyms on Swiss keyboard (tasser,kenny)
--- Released 8.6b3, November 20, 2011 --- See ChangeLog for details ---
+
+2011-11-17 (bug fix)[3437816] return code of [canvas lower] (hirner,ferrieux)
+
+2011-12-22 (bug fix)[3235256] correct menu failure on Windows (mcdonald)
+
+2012-01-19 (bug fix)[3021557] cursor freeze in elided text (vogel)
+
+2012-01-22 (bug fix)[3476698] hang in [text mark prev/next] (vogel)
+
+2012-01-25 (bug fix)[3475627] Stop text-31.11 failure (vogel)
+
+2012-01-25 (bug fix)[1630271] hang/crash on mark before -startline (vogel)
+
+2012-01-26 (bug fix)[1754043,2321450] -blockcursor appearance (vogel)
+
+2012-01-27 (bug fix)[3480471] crash in [tk_getOpenFile] (nijtmans)
+
+2012-01-29 (bug fix)[3480634] PNG image in menus (nijtmans)
+
+2012-01-30 (bug fix)[2925561] disabled combobox don't take focus (english)
+
+2012-02-10 (bug fix) win dialog avoid shimmer that confuses Python (fellows)
+
+2012-02-15 (bug fix)[3486474] Correct color scaling (goth,nijtmans)
+
+2012-02-28 (bug fix)[1630262,1615425] [text] crash tags & -*line (vogel)
+
+2012-03-07 (bug fix)[3497848] consistent pixel rounding (fassel,fellows)
+
+2012-03-18 (enhancement)[3503317] XParseColor speedup (nijtmans)
+
+2012-04-07 (bug fix)[3176239] control-Mousewheel crash (couch,nijtmans)
+
+2012-04-22 (bug fix)[3520202] <MouseWheel> %k,%K,%N for Python (deily,fellows)
+
+2012-05-02 (bug fix)[533519] multiscreen window placement (nijtmans)
+
+2012-05-04 (bug fix)[2768586] multiscreen menu posting (nijtmans)
+
+2012-05-28 (bug fix)[1630254] text peer update on -startline reset (baker,vogel)
+
+2012-06-11 (bug fix)[3294450] ttk text element clipping (oehlmann,fellows)
+
+2012-07-02 (bug fix) Make sure all index tables are static (kirkham,english)
+
+2012-07-23 (bug fix)[3546073] DisplayString() -> DefaultDisplay() (english)
+
+Many revisions to better support a Cygwin environment (nijtmans)
+
+--- Released 8.5.12, July 27, 2012 --- See ChangeLog for details ---
diff --git a/doc/canvas.n b/doc/canvas.n
index 9eb0ec0..e215222 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -918,7 +918,7 @@ coordinates.
Defaults to the coordinate of the top edge of the window.
.RE
.TP
-\fIpathName \fBraise \fItagOrId \fR?\fIaboveThis\fR?
+\fIpathName \fB \fItagOrId \fR?\fIaboveThis\fR?
.
Move all of the items given by \fItagOrId\fR to a new position
in the display list just after the item given by \fIaboveThis\fR.
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index e153064..043c167 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -645,11 +645,8 @@ TkClipInit(
* and set up an event handler for it.
*/
- dispPtr->clipWindow = Tk_CreateWindow(interp, NULL, "_clip",
- DisplayString(dispPtr->display));
- if (dispPtr->clipWindow == NULL) {
- return TCL_ERROR;
- }
+ dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr,
+ DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve(dispPtr->clipWindow);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts);
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 6eccf51..a3d0179 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1225,10 +1225,10 @@ static void EntryDisplay(void *clientData, Drawable d)
* clipping area from the GC, so we have to supply that by other means.
*/
- rect.x = entryPtr->entry.layoutX;
- rect.y = entryPtr->entry.layoutY;
+ rect.x = textarea.x;
+ rect.y = textarea.y;
rect.width = textarea.width;
- rect.height = entryPtr->entry.layoutHeight;
+ rect.height = textarea.height;
clipRegion = TkCreateRegion();
TkUnionRectWithRegion(&rect, clipRegion, clipRegion);
#ifdef HAVE_XFT
diff --git a/unix/install-sh b/unix/install-sh
index 5975819..7c34c3f 100644
--- a/unix/install-sh
+++ b/unix/install-sh
@@ -120,7 +120,7 @@ Options:
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
- -S $stripprog installed files.
+ -S $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
@@ -156,8 +156,8 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
--S) stripcmd="$stripprog $2"
- shift;;
+ -S) stripcmd="$stripprog $2"
+ shift;;
-t) dst_arg=$2
shift;;
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 7461d75..f132e59 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -11,6 +11,7 @@
*/
#include "tkInt.h"
+#include <X11/XKBlib.h>
/*
* Prototypes for local functions defined in this file:
@@ -210,8 +211,8 @@ TkpGetString(
/*
* When mapping from a keysym to a keycode, need information about the
- * modifier state that should be used so that when they call XKeycodeToKeysym
- * taking into account the xkey.state, they will get back the original keysym.
+ * modifier state to be used so that when they call XkbKeycodeToKeysym taking
+ * into account the xkey.state, they will get back the original keysym.
*/
void
@@ -230,7 +231,7 @@ TkpSetKeycodeAndState(
keycode = XKeysymToKeycode(display, keySym);
if (keycode != 0) {
for (state = 0; state < 4; state++) {
- if (XKeycodeToKeysym(display, keycode, state) == keySym) {
+ if (XkbKeycodeToKeysym(display, keycode, 0, state) == keySym){
if (state & 1) {
eventPtr->xkey.state |= ShiftMask;
}
@@ -320,7 +321,8 @@ TkpGetKeySym(
&& (eventPtr->xkey.state & LockMask))) {
index += 1;
}
- sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, index);
+ sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode, 0,
+ index);
/*
* Special handling: if the key was shifted because of Lock, but lock is
@@ -334,8 +336,8 @@ TkpGetKeySym(
|| ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis))
|| ((sym >= XK_Ooblique) && (sym <= XK_Thorn)))) {
index &= ~1;
- sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode,
- index);
+ sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode,
+ 0, index);
}
}
@@ -345,8 +347,8 @@ TkpGetKeySym(
*/
if ((index & 1) && (sym == NoSymbol)) {
- sym = XKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode,
- index & ~1);
+ sym = XkbKeycodeToKeysym(dispPtr->display, eventPtr->xkey.keycode,
+ 0, index & ~1);
}
return sym;
}
@@ -395,7 +397,7 @@ TkpInitKeymapInfo(
if (*codePtr == 0) {
continue;
}
- keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0);
+ keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0);
if (keysym == XK_Shift_Lock) {
dispPtr->lockUsage = LU_SHIFT;
break;
@@ -421,7 +423,7 @@ TkpInitKeymapInfo(
if (*codePtr == 0) {
continue;
}
- keysym = XKeycodeToKeysym(dispPtr->display, *codePtr, 0);
+ keysym = XkbKeycodeToKeysym(dispPtr->display, *codePtr, 0, 0);
if (keysym == XK_Mode_switch) {
dispPtr->modeModMask |= ShiftMask << (i/modMapPtr->max_keypermod);
}
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index be53ec6..13f2f04 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -1349,11 +1349,8 @@ SendInit(
* for it.
*/
- dispPtr->commTkwin = Tk_CreateWindow(interp, (Tk_Window) NULL,
- "_comm", DisplayString(dispPtr->display));
- if (dispPtr->commTkwin == NULL) {
- Tcl_Panic("Tk_CreateWindow failed in SendInit!");
- }
+ dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr,
+ DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve(dispPtr->commTkwin);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->commTkwin,
diff --git a/win/configure b/win/configure
index ad99837..67bff85 100755
--- a/win/configure
+++ b/win/configure
@@ -840,11 +840,11 @@ if test -n "$ac_init_help"; then
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-threads build with threads
- --enable-shared build and link with shared libraries --enable-shared
+ --enable-threads build with threads (default: on)
+ --enable-shared build and link with shared libraries (default: on)
--enable-64bit enable 64bit support (where applicable)
--enable-wince enable Win/CE support (where applicable)
- --enable-symbols build with debugging symbols --disable-symbols
+ --enable-symbols build with debugging symbols (default: off)
--enable-embedded-manifest
embed manifest if possible (default: yes)
@@ -3051,8 +3051,8 @@ else
fi;
if test "$tcl_ok" = "yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ echo "$as_me:$LINENO: result: yes (default)" >&5
+echo "${ECHO_T}yes (default)" >&6
TCL_THREADS=1
cat >>confdefs.h <<\_ACEOF
#define TCL_THREADS 1
@@ -3650,8 +3650,8 @@ echo $ECHO_N "checking compiler flags... $ECHO_C" >&6
MAKE_EXE="\${CC} -o \$@"
LIBPREFIX="lib"
- extra_ldflags="$extra_ldflags -pipe"
extra_cflags="$extra_cflags -pipe"
+ extra_ldflags="$extra_ldflags -pipe"
if test "${SHARED_BUILD}" = "0" ; then
# static
diff --git a/win/makefile.vc b/win/makefile.vc
index 14dc2d0..d69a530 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -13,10 +13,9 @@
# Copyright (c) 2003-2008 Pat Thoyts.
#------------------------------------------------------------------------------
-# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
-# or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define
-# VCINSTALLDIR instead.
-!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(MSSDK) && !defined(VCINSTALLDIR)
+# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
+# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
+!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(VCINSTALLDIR) && !defined(MSSDK) && !defined(WINDOWSSDKDIR)
MSG = ^
You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
Platform SDK first to setup the environment. Jump to this line to read^
@@ -43,23 +42,30 @@ the build instructions.
# turn on the 64-bit compiler, if your SDK has it.
#
# 3) Targets are:
-# release -- builds the core, the shell. (default)
-# core -- Only builds the core.
-# all -- builds everything.
-# test -- builds and runs the test suite.
-# tktest -- just builds the binaries for the test suite.
-# install -- installs the built binaries and libraries to $(INSTALLDIR)
+# release -- Builds the core, the shell and the dlls. (default)
+# dlls -- Just builds the windows extensions
+# shell -- Just builds the shell and the core.
+# core -- Only builds the core [tkXX.(dll|lib)].
+# all -- Builds everything.
+# test -- Builds and runs the test suite.
+# tktest -- Just builds the binaries for the test suite.
+# install -- Installs the built binaries and libraries to $(INSTALLDIR)
# as the root of the install tree.
# cwish -- builds a console version of wish.
-# clean -- removes the contents of $(TMP_DIR)
-# hose -- removes the contents of $(TMP_DIR) and $(OUT_DIR)
-# genstubs -- rebuilds the Stubs table and support files (dev only).
+# tidy/clean/hose -- varying levels of cleaning.
+# genstubs -- Rebuilds the Stubs table and support files (dev only).
# depend -- Generates an accurate set of source dependancies for this
# makefile. Helpful to avoid problems when the sources are
# refreshed and you rebuild, but can "overbuild" when common
# headers like tkInt.h just get small changes.
-# winhelp -- builds the windows .hlp file for Tcl from the troff man
-# files.
+# htmlhelp -- Builds a Windows .chm help file for Tcl and Tk from the
+# troff manual pages found in $(ROOT)\doc. You need to
+# have installed the HTML Help Compiler package from Microsoft
+# to produce the .chm file.
+# winhelp -- (deprecated) Builds the windows .hlp file for Tcl from
+# the troff man files found in $(ROOT)\doc. This type of
+# help file is deprecated by Microsoft in favour of html
+# help files (.chm)
#
# 4) Macros usable on the commandline:
# TCLDIR=<path>
@@ -72,32 +78,32 @@ the build instructions.
# Sets where to install Tcl from the built binaries.
# C:\Progra~1\Tcl is assumed when not specified.
#
-# OPTS=static,msvcrt,linkexten,threads,symbols,profile,unchecked,none
+# OPTS=static,msvcrt,staticpkg,nothreads,symbols,profile,loimpact,unchecked,pdbs,none
# Sets special options for the core. The default is for none.
# Any combination of the above may be used (comma separated).
# 'none' will over-ride everything to nothing.
#
-# static = Builds a static library of the core instead of a
+# static = Builds a static library of the core instead of a
# dll. The shell will be static (and large), as well.
-# msvcrt = Effects the static option only to switch it from
+# msvcrt = Affects the static option only to switch it from
# using libcmt(d) as the C runtime [by default] to
# msvcrt(d). This is useful for static embedding
# support.
-# staticpkg= Affects the static option only to switch wishXX.exe
+# staticpkg = Affects the static option only to switch wishXX.exe
# to have the dde and reg extension linked inside it.
-# threads = Turns on full multithreading support.
+# nothreads = Turns off full multithreading support.
# thrdalloc = Use the thread allocator (shared global free pool)
# This is the default on threaded builds.
-# tclalloc = Use the old non-thread allocator
-# symbols = Adds symbols for step debugging.
+# symbols = Debug build. Links to the debug C runtime, disables
+# optimizations and creates pdb symbols files.
+# pdbs = Build detached symbols for release builds.
# profile = Adds profiling hooks. Map file is assumed.
-# loimpact = Adds a flag for how NT treats the heap to keep
-# memory in use, low. This is said to impact alloc
-# performance.
-# unchecked= Allows a symbols build to not use the debug
+# loimpact = Adds a flag for how NT treats the heap to keep memory
+# in use, low. This is said to impact alloc performance.
+# unchecked = Allows a symbols build to not use the debug
# enabled runtime (msvcrt.dll not msvcrtd.dll
# or libcmt.lib not libcmtd.lib).
-# noxp = If you do not have the uxtheme.h header then you
+# noxp = If you do not have the uxtheme.h header then you
# cannot include support for XP themeing.
# square = Include the demo square widget.
#
@@ -110,19 +116,21 @@ the build instructions.
# memdbg = Enables the debugging memory allocator.
# compdbg = Enables byte compilation logging.
#
-# CHECKS=nodep,fullwarn,none
+# CHECKS=nodep,fullwarn,64bit,none
# Sets special macros for checking compatability.
#
# nodep = Turns off compatability macros to ensure Tk isn't
# being built with deprecated functions.
# fullwarn = Builds with full compiler and link warnings enabled.
# Very verbose.
+# 64bit = Enable 64bit portability warnings (if available)
#
# MACHINE=(IX86|IA64|AMD64|ALPHA)
# Set the machine type used for the compiler, linker, and
# resource compiler. This hook is needed to tell the tools
# when alternate platforms are requested. IX86 is the default
-# when not specified.
+# when not specified. If the CPU environment variable has been
+# set (ie: recent Platform SDK) then MACHINE is set from CPU.
#
# TMP_DIR=<path>
# OUT_DIR=<path>
@@ -206,8 +214,8 @@ TTK_SQUARE_WIDGET = 0
STUBPREFIX = $(PROJECT)stub
WISHNAMEPREFIX = wish
-BINROOT = .
-ROOT = ..
+BINROOT = $(MAKEDIR) # originally .
+ROOT = $(MAKEDIR)\.. # originally ..
TK_LIBRARY = $(ROOT)\library
@@ -814,7 +822,11 @@ $(TMP_DIR)\wish.exe.manifest: $(WINDIR)\wish.exe.manifest.in
<<
#---------------------------------------------------------------------
-# Generate the makefile depedancies.
+# Generate the source dependencies. Having dependency rules will
+# improve incremental build accuracy without having to resort to a
+# full rebuild just because some non-global header file like
+# tclCompile.h was changed. These rules aren't needed when building
+# from scratch.
#---------------------------------------------------------------------
depend:
@@ -830,9 +842,8 @@ $(TKOBJS)
<<
!endif
-
#---------------------------------------------------------------------
-# Dedependency rules
+# Dependency rules
#---------------------------------------------------------------------
$(TMP_DIR)\tk.res: \
@@ -842,7 +853,7 @@ $(TMP_DIR)\tk.res: \
!if exist("$(OUT_DIR)\depend.mk")
!include "$(OUT_DIR)\depend.mk"
-!message *** Dependency rules in effect.
+!message *** Dependency rules in use.
!else
!message *** Dependency rules are not being used.
!endif
@@ -850,8 +861,11 @@ $(TMP_DIR)\tk.res: \
### add a spacer in the output
!message
+
#---------------------------------------------------------------------
-# Implicit rules
+# Implicit rules. A limitation exists with nmake that requires that
+# source directory can not contain spaces in the path. This an
+# absolute.
#---------------------------------------------------------------------
{$(XLIBDIR)}.c{$(TMP_DIR)}.obj::
@@ -935,8 +949,6 @@ install-libraries:
@echo installing language files
@$(CPY) "$(ROOT)\library\msgs\*" "$(SCRIPT_INSTALL_DIR)\msgs\"
-#"
-
#---------------------------------------------------------------------
# Clean up
#---------------------------------------------------------------------
@@ -971,6 +983,8 @@ clean:
@echo Cleaning $(WINDIR)\versions.vc ...
@if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
+realclean: hose
+
hose:
@echo Hosing $(OUT_DIR)\* ...
@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 4803b43..2868857 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -14,16 +14,21 @@
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
+#define NO_SHLWAPI_GDI
+#define NO_SHLWAPI_STREAM
+#define NO_SHLWAPI_REG
+#include <shlwapi.h>
#pragma comment (lib, "user32.lib")
#pragma comment (lib, "kernel32.lib")
+#pragma comment (lib, "shlwapi.lib")
#include <stdio.h>
#include <math.h>
/*
- * This library is required for x64 builds with _some_ versions
+ * This library is required for x64 builds with _some_ versions of MSVC
*/
#if defined(_M_IA64) || defined(_M_AMD64)
-#if _MSC_FULL_VER > 140000000 && _MSC_FULL_VER <= 140040310
+#if _MSC_VER >= 1400 && _MSC_VER < 1500
#pragma comment(lib, "bufferoverflowU")
#endif
#endif
@@ -37,13 +42,13 @@
/* protos */
-int CheckForCompilerFeature(const char *option);
-int CheckForLinkerFeature(const char *option);
-int IsIn(const char *string, const char *substring);
-int GrepForDefine(const char *file, const char *string);
-int SubstituteFile(const char *substs, const char *filename);
-const char * GetVersionFromFile(const char *filename, const char *match);
-DWORD WINAPI ReadFromPipe(LPVOID args);
+static int CheckForCompilerFeature(const char *option);
+static int CheckForLinkerFeature(const char *option);
+static int IsIn(const char *string, const char *substring);
+static int SubstituteFile(const char *substs, const char *filename);
+static int QualifyPath(const char *path);
+static const char *GetVersionFromFile(const char *filename, const char *match);
+static DWORD WINAPI ReadFromPipe(LPVOID args);
/* globals */
@@ -125,18 +130,6 @@ main(
} else {
return IsIn(argv[2], argv[3]);
}
- case 'g':
- if (argc == 2) {
- chars = snprintf(msg, sizeof(msg) - 1,
- "usage: %s -g <file> <string>\n"
- "grep for a #define\n"
- "exitcodes: integer of the found string (no decimals)\n",
- argv[0]);
- WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
- &dwWritten, NULL);
- return 2;
- }
- return GrepForDefine(argv[2], argv[3]);
case 's':
if (argc == 2) {
chars = snprintf(msg, sizeof(msg) - 1,
@@ -162,10 +155,21 @@ main(
}
printf("%s\n", GetVersionFromFile(argv[2], argv[3]));
return 0;
+ case 'Q':
+ if (argc != 3) {
+ chars = snprintf(msg, sizeof(msg) - 1,
+ "usage: %s -Q path\n"
+ "Emit the fully qualified path\n"
+ "exitcodes: 0 == no, 1 == yes, 2 == error\n", argv[0]);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars,
+ &dwWritten, NULL);
+ return 2;
+ }
+ return QualifyPath(argv[2]);
}
}
chars = snprintf(msg, sizeof(msg) - 1,
- "usage: %s -c|-l|-f|-g|-V ...\n"
+ "usage: %s -c|-f|-l|-Q|-s|-V ...\n"
"This is a little helper app to equalize shell differences between WinNT and\n"
"Win9x and get nmake.exe to accomplish its job.\n",
argv[0]);
@@ -173,7 +177,7 @@ main(
return 2;
}
-int
+static int
CheckForCompilerFeature(
const char *option)
{
@@ -258,7 +262,7 @@ CheckForCompilerFeature(
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
(300-chars), 0);
- WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg,lstrlen(msg), &err,NULL);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
return 2;
}
@@ -307,7 +311,7 @@ CheckForCompilerFeature(
|| strstr(Err.buffer, "D2021") != NULL);
}
-int
+static int
CheckForLinkerFeature(
const char *option)
{
@@ -386,7 +390,7 @@ CheckForLinkerFeature(
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
(300-chars), 0);
- WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg,lstrlen(msg), &err,NULL);
+ WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
return 2;
}
@@ -432,7 +436,7 @@ CheckForLinkerFeature(
strstr(Err.buffer, "LNK4044") != NULL);
}
-DWORD WINAPI
+static DWORD WINAPI
ReadFromPipe(
LPVOID args)
{
@@ -457,7 +461,7 @@ ReadFromPipe(
return 0; /* makes the compiler happy */
}
-int
+static int
IsIn(
const char *string,
const char *substring)
@@ -466,70 +470,13 @@ IsIn(
}
/*
- * Find a specified #define by name.
- *
- * If the line is '#define TCL_VERSION "8.5"', it returns 85 as the result.
- */
-
-int
-GrepForDefine(
- const char *file,
- const char *string)
-{
- char s1[51], s2[51], s3[51];
- FILE *f = fopen(file, "rt");
-
- if (f == NULL) {
- return 0;
- }
-
- do {
- int r = fscanf(f, "%50s", s1);
-
- if (r == 1 && !strcmp(s1, "#define")) {
- /*
- * Get next two words.
- */
-
- r = fscanf(f, "%50s %50s", s2, s3);
- if (r != 2) {
- continue;
- }
-
- /*
- * Is the first word what we're looking for?
- */
-
- if (!strcmp(s2, string)) {
- double d1;
-
- fclose(f);
-
- /*
- * Add 1 past first double quote char. "8.5"
- */
-
- d1 = atof(s3 + 1); /* 8.5 */
- while (floor(d1) != d1) {
- d1 *= 10.0;
- }
- return ((int) d1); /* 85 */
- }
- }
- } while (!feof(f));
-
- fclose(f);
- return 0;
-}
-
-/*
* GetVersionFromFile --
* Looks for a match string in a file and then returns the version
* following the match where a version is anything acceptable to
* package provide or package ifneeded.
*/
-const char *
+static const char *
GetVersionFromFile(
const char *filename,
const char *match)
@@ -589,10 +536,7 @@ typedef struct list_item_t {
/* insert a list item into the list (list may be null) */
static list_item_t *
-list_insert(
- list_item_t **listPtrPtr,
- const char *key,
- const char *value)
+list_insert(list_item_t **listPtrPtr, const char *key, const char *value)
{
list_item_t *itemPtr = malloc(sizeof(list_item_t));
if (itemPtr) {
@@ -609,8 +553,7 @@ list_insert(
}
static void
-list_free(
- list_item_t **listPtrPtr)
+list_free(list_item_t **listPtrPtr)
{
list_item_t *tmpPtr, *listPtr = *listPtrPtr;
while (listPtr) {
@@ -639,7 +582,7 @@ list_free(
* <<
*/
-int
+static int
SubstituteFile(
const char *substitutions,
const char *filename)
@@ -715,6 +658,30 @@ SubstituteFile(
fclose(fp);
return 0;
}
+
+/*
+ * QualifyPath --
+ *
+ * This composes the current working directory with a provided path
+ * and returns the fully qualified and normalized path.
+ * Mostly needed to setup paths for testing.
+ */
+
+static int
+QualifyPath(
+ const char *szPath)
+{
+ char szCwd[MAX_PATH + 1];
+ char szTmp[MAX_PATH + 1];
+ char *p;
+ GetCurrentDirectory(MAX_PATH, szCwd);
+ while ((p = strchr(szPath, '/')) && *p)
+ *p = '\\';
+ PathCombine(szTmp, szCwd, szPath);
+ PathCanonicalize(szCwd, szTmp);
+ printf("%s\n", szCwd);
+ return 0;
+}
/*
* Local variables:
diff --git a/win/rules.vc b/win/rules.vc
index f2ee135..f09e2ea 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -8,7 +8,7 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Copyright (c) 2001-2003 David Gravereaux.
-# Copyright (c) 2003-2007 Patrick Thoyts
+# Copyright (c) 2003-2008 Patrick Thoyts
#------------------------------------------------------------------------------
!ifndef _RULES_VC
@@ -243,9 +243,9 @@ TCL_USE_STATIC_PACKAGES = 1
TCL_USE_STATIC_PACKAGES = 0
!endif
!if [nmakehlp -f $(OPTS) "nothreads"]
+!message *** Compile explicitly for non-threaded tcl
TCL_THREADS = 0
!else
-!message *** Doing threads
TCL_THREADS = 1
USE_THREAD_ALLOC= 1
!endif
@@ -287,7 +287,7 @@ LOIMPACT = 0
USE_THREAD_ALLOC = 1
!endif
!if [nmakehlp -f $(OPTS) "tclalloc"]
-!message *** Doing thrdalloc
+!message *** Doing tclalloc
USE_THREAD_ALLOC = 0
!endif
!if [nmakehlp -f $(OPTS) "unchecked"]
@@ -598,7 +598,7 @@ TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\lib
TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\lib\tcldde13$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
COFFBASE = \must\have\tcl\sources\to\build\this\target
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
TCL_INCLUDES = -I"$(_TCLDIR)\include"
@@ -611,7 +611,7 @@ TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\library
TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde13$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
TCLTOOLSDIR = $(_TCLDIR)\tools
TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
diff --git a/win/tcl.m4 b/win/tcl.m4
index bbea9a3..5e8e135 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -211,7 +211,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
AC_DEFUN([SC_ENABLE_SHARED], [
AC_MSG_CHECKING([how to build libraries])
AC_ARG_ENABLE(shared,
- [ --enable-shared build and link with shared libraries [--enable-shared]],
+ [ --enable-shared build and link with shared libraries (default: on)],
[tcl_ok=$enableval], [tcl_ok=yes])
if test "${enable_shared+set}" = set; then
@@ -250,11 +250,11 @@ AC_DEFUN([SC_ENABLE_SHARED], [
AC_DEFUN([SC_ENABLE_THREADS], [
AC_MSG_CHECKING(for building with threads)
- AC_ARG_ENABLE(threads, [ --enable-threads build with threads],
+ AC_ARG_ENABLE(threads, [ --enable-threads build with threads (default: on)],
[tcl_ok=$enableval], [tcl_ok=yes])
if test "$tcl_ok" = "yes"; then
- AC_MSG_RESULT(yes)
+ AC_MSG_RESULT([yes (default)])
TCL_THREADS=1
AC_DEFINE(TCL_THREADS)
# USE_THREAD_ALLOC tells us to try the special thread-based
@@ -297,7 +297,7 @@ AC_DEFUN([SC_ENABLE_THREADS], [
AC_DEFUN([SC_ENABLE_SYMBOLS], [
AC_MSG_CHECKING([for build with symbols])
- AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no])
+ AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols (default: off)], [tcl_ok=$enableval], [tcl_ok=no])
# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
@@ -533,8 +533,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
MAKE_EXE="\${CC} -o \[$]@"
LIBPREFIX="lib"
- extra_ldflags="$extra_ldflags -pipe"
extra_cflags="$extra_cflags -pipe"
+ extra_ldflags="$extra_ldflags -pipe"
if test "${SHARED_BUILD}" = "0" ; then
# static
@@ -1071,7 +1071,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [
#--------------------------------------------------------------------
AC_DEFUN([SC_TCL_CFG_ENCODING], [
- AC_ARG_WITH(encoding, [ --with-encoding encoding for configuration values], with_tcencoding=${withval})
+ AC_ARG_WITH(encoding, [ --with-encoding encoding for configuration values], with_tcencoding=${withval})
if test x"${with_tcencoding}" != x ; then
AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}")