summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-10-19 12:53:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-10-19 12:53:20 (GMT)
commit699c7669d27cbd7e1a7fe515e89e2755a28e3406 (patch)
tree47af18de869f496be9c339747fa96c9cd469aa93 /win
parentecec02fb16d9d8b720987fb25ee1e517b085e699 (diff)
parent602a687e5116fe133efb686f83f92cb108429306 (diff)
downloadtcl-699c7669d27cbd7e1a7fe515e89e2755a28e3406.zip
tcl-699c7669d27cbd7e1a7fe515e89e2755a28e3406.tar.gz
tcl-699c7669d27cbd7e1a7fe515e89e2755a28e3406.tar.bz2
merge trunk
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in46
-rw-r--r--win/tclWinThrd.c37
2 files changed, 28 insertions, 55 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index dcbb831..3358c7f 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -22,6 +22,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
+datarootdir = @datarootdir@
mandir = @mandir@
# The following definition can be set to non-null for special systems like AFS
@@ -106,11 +107,16 @@ ZLIB_DIR = $(COMPAT_DIR)/zlib
# Converts a POSIX path to a Windows native path.
CYGPATH = @CYGPATH@
-GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)' | sed 's!\\!/!g')
-TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)' | sed 's!\\!/!g')
-WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)' | sed 's!\\!/!g')
-ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)' | sed 's!\\!/!g')
-ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)' | sed 's!\\!/!g')
+libdir_native = $(shell $(CYGPATH) '$(libdir)')
+bindir_native = $(shell $(CYGPATH) '$(bindir)')
+includedir_native = $(shell $(CYGPATH) '$(includedir)')
+mandir_native = $(shell $(CYGPATH) '$(mandir)')
+TCL_LIBRARY_NATIVE = $(shell $(CYGPATH) '$(TCL_LIBRARY)')
+GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)')
+TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)')
+WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)')
+ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)')
+ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)')
#GENERIC_DIR_NATIVE = $(GENERIC_DIR)
#TOMMATH_DIR_NATIVE = $(TOMMATH_DIR)
#WIN_DIR_NATIVE = $(WIN_DIR)
@@ -119,7 +125,7 @@ ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)' | sed 's!\\!/!g')
# Fully qualify library path so that `make test`
# does not depend on the current directory.
LIBRARY_DIR1 = $(shell cd '$(ROOT_DIR_NATIVE)/library' ; pwd -P)
-LIBRARY_DIR = $(shell $(CYGPATH) '$(LIBRARY_DIR1)' | sed 's!\\!/!g')
+LIBRARY_DIR = $(shell $(CYGPATH) '$(LIBRARY_DIR1)')
DLLSUFFIX = @DLLSUFFIX@
LIBSUFFIX = @LIBSUFFIX@
EXESUFFIX = @EXESUFFIX@
@@ -182,7 +188,7 @@ SHLIB_LD = @SHLIB_LD@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_SUFFIX = @SHLIB_SUFFIX@
-LIBS = @LIBS@ @ZLIB_LIBS@
+LIBS = @LIBS@ $(shell $(CYGPATH) '@ZLIB_LIBS@')
RMDIR = rm -rf
MKDIR = mkdir -p
@@ -496,17 +502,17 @@ tclMain2.${OBJEXT}: tclMain.c
tclPkgConfig.${OBJEXT}: tclPkgConfig.c
$(CC) -c $(CC_SWITCHES) \
- -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR)\" \
- -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR)\" \
- -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \
- -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \
+ -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR_NATIVE)\" \
+ -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR_NATIVE)\" \
+ -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR_NATIVE)\" \
+ -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR_NATIVE)\" \
-DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \
\
- -DCFG_RUNTIME_LIBDIR=\"$(libdir)\" \
- -DCFG_RUNTIME_BINDIR=\"$(bindir)\" \
- -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY)\" \
- -DCFG_RUNTIME_INCDIR=\"$(includedir)\" \
- -DCFG_RUNTIME_DOCDIR=\"$(mandir)\" \
+ -DCFG_RUNTIME_LIBDIR=\"$(libdir_native)\" \
+ -DCFG_RUNTIME_BINDIR=\"$(bindir_native)\" \
+ -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY_NATIVE)\" \
+ -DCFG_RUNTIME_INCDIR=\"$(includedir_native)\" \
+ -DCFG_RUNTIME_DOCDIR=\"$(mandir_native)\" \
-DBUILD_tcl \
@DEPARG@ $(CC_OBJNAME)
@@ -603,7 +609,7 @@ install-binaries: binaries
fi
install-libraries: libraries install-tzdata install-msgs
- @for i in $(prefix)/lib $(INCLUDE_INSTALL_DIR) \
+ @for i in "$$($(CYGPATH) $(prefix)/lib)" "$(INCLUDE_INSTALL_DIR)" \
$(SCRIPT_INSTALL_DIR); \
do \
if [ ! -d $$i ] ; then \
@@ -747,7 +753,7 @@ PKG_CFG_ARGS = @PKG_CFG_ARGS@
PKG_DIR = ./pkgs
packages:
- @builddir=`pwd -P`; \
+ @builddir=`$(CYGPATH) $$(pwd -P)`; \
for i in $(PKGS_DIR)/*; do \
if [ -d $$i ] ; then \
if [ -x $$i/configure ] ; then \
@@ -755,8 +761,8 @@ packages:
mkdir -p $(PKG_DIR)/$$pkg; \
if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \
( cd $(PKG_DIR)/$$pkg; \
- echo "Configuring package '$$i' wd = `pwd -P`"; \
- $$i/configure --with-tcl=$$builddir --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \
+ echo "Configuring package '$$i' wd = `$(CYGPATH) $$(pwd -P)`"; \
+ $$i/configure --with-tcl=$$builddir --with-tclinclude=$(GENERIC_DIR_NATIVE) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \
fi ; \
echo "Building package '$$pkg'"; \
( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 40229f0..6c4ed7f 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -22,16 +22,6 @@ _CRTIMP unsigned int __cdecl _controlfp (unsigned int unNew, unsigned int unMask
#endif
/*
- * This is the number of milliseconds to wait between internal retries in
- * the Tcl_MutexLock function. This value must be greater than or equal
- * to zero and should be a suitable value for the given platform.
- */
-
-#ifndef TCL_MUTEX_LOCK_SLEEP_TIME
-# define TCL_MUTEX_LOCK_SLEEP_TIME (0)
-#endif
-
-/*
* This is the master lock used to serialize access to other serialization
* data structures.
*/
@@ -65,13 +55,6 @@ static int allocOnce = 0;
#endif /* TCL_THREADS */
/*
- * The mutexLock serializes Tcl_MutexLock. This is necessary to prevent
- * races when finalizing a mutex that some other thread may want to lock.
- */
-
-static CRITICAL_SECTION mutexLock;
-
-/*
* The joinLock serializes Create- and ExitThread. This is necessary to
* prevent a race where a new joinable thread exits before the creating thread
* had the time to create the necessary data structures in the emulation
@@ -384,7 +367,6 @@ TclpInitLock(void)
*/
init = 1;
- InitializeCriticalSection(&mutexLock);
InitializeCriticalSection(&joinLock);
InitializeCriticalSection(&initLock);
InitializeCriticalSection(&masterLock);
@@ -532,7 +514,6 @@ void
TclFinalizeLock(void)
{
MASTER_LOCK;
- DeleteCriticalSection(&mutexLock);
DeleteCriticalSection(&joinLock);
/*
@@ -586,8 +567,6 @@ Tcl_MutexLock(
{
CRITICAL_SECTION *csPtr;
-retry:
-
if (*mutexPtr == NULL) {
MASTER_LOCK;
@@ -603,20 +582,8 @@ retry:
}
MASTER_UNLOCK;
}
- while (1) {
- EnterCriticalSection(&mutexLock);
- csPtr = *((CRITICAL_SECTION **)mutexPtr);
- if (csPtr == NULL) {
- LeaveCriticalSection(&mutexLock);
- goto retry;
- }
- if (TryEnterCriticalSection(csPtr)) {
- LeaveCriticalSection(&mutexLock);
- return;
- }
- LeaveCriticalSection(&mutexLock);
- Tcl_Sleep(TCL_MUTEX_LOCK_SLEEP_TIME);
- }
+ csPtr = *((CRITICAL_SECTION **)mutexPtr);
+ EnterCriticalSection(csPtr);
}
/*