Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | * generic/tclInt.decls: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: * win/tclWin32Dll.c: removed TclWinSynchSpawn (vestige of Win32s support). * win/tclWinReg.c: made use of TclWinGetPlatformId instead of getting info again * win/tclWinPort.h: * win/Makefile.in: * win/configure.in: * win/tcl.m4: Added support for gcc/mingw on Windows [Bug: 4234] |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
36c0007d3febaff6e2e098f6a89f9c2a |
| User & Date: | hobbs 2000-03-31 08:52:25.000 |
Context
|
2000-03-31
| ||
| 19:39 | * generic/tclGet.c (Tcl_GetDouble): Added additional conditions to error test (previously only errno... check-in: 27f457dd13 user: ericm tags: trunk | |
| 08:52 | * generic/tclInt.decls: * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: * win/tclWin32Dll.... check-in: 36c0007d3f user: hobbs tags: trunk | |
| 08:52 | * generic/tclBasic.c (Tcl_DeleteCommandFromToken): Added comments noting the need to pair ckalloc ... check-in: 4d38e9fd6a user: hobbs tags: trunk | |
Changes
Changes to win/Makefile.in.
1 2 3 4 5 6 7 | # # This file is a Makefile for Tcl. If it has the name "Makefile.in" # then it is a template for a Makefile; to generate the actual Makefile, # run "./configure", which is a configuration script generated by the # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # # This file is a Makefile for Tcl. If it has the name "Makefile.in" # then it is a template for a Makefile; to generate the actual Makefile, # run "./configure", which is a configuration script generated by the # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # # RCS: @(#) $Id: Makefile.in,v 1.29 2000/03/31 08:52:25 hobbs Exp $ VERSION = @TCL_VERSION@ #---------------------------------------------------------------- # Things you can change to personalize the Makefile for your own # site (you can make these changes in either Makefile.in or # Makefile, but changes to Makefile will get lost if you re-run |
| ︙ | ︙ | |||
101 102 103 104 105 106 107 108 109 | SRC_DIR = @srcdir@ ROOT_DIR = @srcdir@/.. GENERIC_DIR = @srcdir@/../generic WIN_DIR = @srcdir@ COMPAT_DIR = @srcdir@/../compat PATHTYPE = @PATHTYPE@ | > > > > | > | | | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | SRC_DIR = @srcdir@ ROOT_DIR = @srcdir@/.. GENERIC_DIR = @srcdir@/../generic WIN_DIR = @srcdir@ COMPAT_DIR = @srcdir@/../compat # This is a switch passed to a Cygwin script that generates file # names based on the platform. PATHTYPE = @PATHTYPE@ # This program converts between Windows native and Cygwin POSIX pathnames. CYGPATH = @CYGPATH@ GENERIC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(GENERIC_DIR)') WIN_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(WIN_DIR)') ROOT_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)') LIBRARY_DIR = $(shell echo '$(ROOT_DIR_NATIVE)/library' | sed 's/\\/\//g' ) DLLSUFFIX = @DLLSUFFIX@ LIBSUFFIX = @LIBSUFFIX@ EXESUFFIX = @EXESUFFIX@ |
| ︙ | ︙ | |||
136 137 138 139 140 141 142 | MAN2TCL = man2tcl$(EXEEXT) @SET_MAKE@ # Macro that expands to the first dependency argument with the appropriate # path type already resolved. | | | > | | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | MAN2TCL = man2tcl$(EXEEXT) @SET_MAKE@ # Macro that expands to the first dependency argument with the appropriate # path type already resolved. DEPARG = "$(shell $(CYGPATH) $(PATHTYPE) $<)" # Setting the VPATH variable to a list of paths will cause the # makefile to look into these paths when resolving .c to .obj # dependencies. Note the ':' to avoid autoconf's habit of deleting # all VPATH lines without an explicit ':' in it. VPATH = $(GENERIC_DIR)@VPSEP@$(WIN_DIR)@VPSEP@$(COMPAT_DIR) # : AR = @AR@ CC = @CC@ AC_FLAGS = @EXTRA_CFLAGS@ @DEFS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LDFLAGS_CONSOLE = @LDFLAGS_CONSOLE@ |
| ︙ | ︙ | |||
306 307 308 309 310 311 312 | $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME) $(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME) | | | | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
$(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS)
$(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME)
$(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32)
$(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS) $(CC_EXENAME)
cat32.${OBJEXT}: cat.c
$(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
$(CAT32): cat32.${OBJEXT}
$(CC) $(CFLAGS) cat32.obj $(CC_EXENAME) -link $(LDFLAGS_CONSOLE)
# The following targets are configured by autoconf to generate either
# a shared library or static library
${TCL_STUB_LIB_FILE}: ${STUB_OBJS}
@$(RM) ${TCL_STUB_LIB_FILE}
|
| ︙ | ︙ | |||
349 350 351 352 353 354 355 |
# Add the object extension to the implicit rules. By default .obj is not
# automatically added.
.SUFFIXES: .${OBJEXT}
# Special case object targets
| | | | | | | | | | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# Add the object extension to the implicit rules. By default .obj is not
# automatically added.
.SUFFIXES: .${OBJEXT}
# Special case object targets
tclWinInit.${OBJEXT}: tclWinInit.c
$(CC) -c $(CC_SWITCHES) -DBUILD_tcl $(EXTFLAGS) $(DEPARG) $(CC_OBJNAME)
testMain.${OBJEXT}: tclAppInit.c
$(CC) -c $(CC_SWITCHES) -DTCL_TEST $(DEPARG) $(CC_OBJNAME)
tclTest.${OBJEXT}: tclTest.c
$(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
tclTestObj.${OBJEXT}: tclTestObj.c
$(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
tclWinTest.${OBJEXT}: tclWinTest.c
$(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
tclAppInit.${OBJEXT} : tclAppInit.c
$(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
# The following objects should be built using the stub interfaces
tclWinReg.${OBJEXT} : tclWinReg.c
$(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS $(DEPARG) $(CC_OBJNAME)
tclWinDde.${OBJEXT} : tclWinDde.c
$(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS $(DEPARG) $(CC_OBJNAME)
# The following objects are part of the stub library and should not
# be built as DLL objects but none of the symbols should be exported
tclStubLib.${OBJEXT}: tclStubLib.c
$(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD $(DEPARG) $(CC_OBJNAME)
|
| ︙ | ︙ |
Changes to win/configure.in.
1 2 3 4 | # This file is an input file used by the GNU "autoconf" program to # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 | # This file is an input file used by the GNU "autoconf" program to # generate the file "configure", which is run during Tcl installation # to configure the system for the local environment. # # RCS: @(#) $Id: configure.in,v 1.19 2000/03/31 08:52:29 hobbs Exp $ AC_INIT(../generic/tcl.h) TCL_VERSION=8.3 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=3 TCL_PATCH_LEVEL=".0" |
| ︙ | ︙ | |||
84 85 86 87 88 89 90 |
#--------------------------------------------------------------------
TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
eval "TCL_SRC_DIR=`cd $srcdir; pwd`"
| | | > | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
#--------------------------------------------------------------------
TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
eval "TCL_SRC_DIR=`cd $srcdir; pwd`"
eval "TCL_STUB_LIB_FILE=${LIBPREFIX}tclstub$VER${LIBSUFFIX}"
eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}"
eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}"
eval "DLLSUFFIX=${DLLSUFFIX}"
eval "LIBPREFIX=${LIBPREFIX}"
eval "LIBSUFFIX=${LIBSUFFIX}"
eval "EXESUFFIX=${EXESUFFIX}"
CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}
CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}
CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}
|
| ︙ | ︙ | |||
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_DBGX) AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX) AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX) AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX) AC_SUBST(PATHTYPE) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(EXTRA_CFLAGS) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(CC_OBJNAME) AC_SUBST(CC_EXENAME) AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) AC_SUBST(LDFLAGS_CONSOLE) AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) AC_SUBST(RC) AC_SUBST(DLLSUFFIX) AC_SUBST(LIBSUFFIX) AC_SUBST(EXESUFFIX) AC_SUBST(LIBRARIES) AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_DLL) AC_OUTPUT(Makefile tclConfig.sh tcl.hpj) | > > > | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_DBGX) AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX) AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX) AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX) AC_SUBST(PATHTYPE) AC_SUBST(CYGPATH) AC_SUBST(VPSEP) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(EXTRA_CFLAGS) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(CC_OBJNAME) AC_SUBST(CC_EXENAME) AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) AC_SUBST(LDFLAGS_CONSOLE) AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) AC_SUBST(RC) AC_SUBST(DLLSUFFIX) AC_SUBST(LIBPREFIX) AC_SUBST(LIBSUFFIX) AC_SUBST(EXESUFFIX) AC_SUBST(LIBRARIES) AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_DLL) AC_OUTPUT(Makefile tclConfig.sh tcl.hpj) |
Changes to win/tcl.m4.
| ︙ | ︙ | |||
170 171 172 173 174 175 176 |
AC_DEFUN(SC_ENABLE_GCC, [
AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]],
[ok=$enableval], [ok=no])
if test "$ok" = "yes"; then
CC=gcc
AC_PROG_CC
else
| > > | > | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
AC_DEFUN(SC_ENABLE_GCC, [
AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]],
[ok=$enableval], [ok=no])
if test "$ok" = "yes"; then
CC=gcc
AC_PROG_CC
else
# Allow user to override
if test -z "$CC"; then
CC=cl
fi
fi
])
#------------------------------------------------------------------------
# SC_ENABLE_SHARED --
#
# Allows the building of shared libraries
|
| ︙ | ︙ | |||
316 317 318 319 320 321 322 323 | # Defines the following vars for all compilers: # EXTRA_CFLAGS # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # CFLAGS_WARNING # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE # PATHTYPE | > > > > | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < | > > > > > > > | | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# Defines the following vars for all compilers:
# EXTRA_CFLAGS
# CFLAGS_DEBUG
# CFLAGS_OPTIMIZE
# CFLAGS_WARNING
# LDFLAGS_DEBUG
# LDFLAGS_OPTIMIZE
# LDFLAGS_CONSOLE
# LDFLAGS_WINDOW
# CC_OBJNAME
# CC_EXENAME
# PATHTYPE
# VPSEP
# CYGPATH
#
# Defines the following vars for non-gcc compilers
# SHLIB_LD
# SHLIB_LD_LIBS
# LIBS
# AR
# MAKE_LIB
# MAKE_EXE
# MAKE_DLL
#
# LIBSUFFIX
# LIBPREFIX
# LIBRARIES
# EXESUFFIX
# DLLSUFFIX
#
#--------------------------------------------------------------------
AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_MSG_CHECKING([compiler flags])
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
PATHTYPE='-w'
CYGPATH='cygpath'
VPSEP=';'
# set various compiler flags depending on whether we are using gcc or cl
if test "${GCC}" = "yes" ; then
SHLIB_LD=""
SHLIB_LD_LIBS=""
LIBS=""
LIBS_GUI="-lgdi32 -lcomdlg32"
AR="${AR-ar}"
STLIB_LD="${AR-ar}"
RC="${WINDRES-windres}"
MAKE_LIB="\${AR} crv \[$]@"
MAKE_EXE="\${CC} -o \[$]@"
LIBPREFIX="lib"
if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[[3-6]]86[[^\/]]*-cygwin' >/dev/null; then
mno_cygwin="yes"
extra_cflags="-mno-cygwin"
extra_ldflags="-mno-cygwin"
else
mno_cygwin="no"
extra_cflags=""
extra_ldflags=""
fi
if test "$cross_compiling" = "yes" -o "$mno_cygwin" = "yes"; then
PATHTYPE=''
CYGPATH='echo '
VPSEP=':'
fi
if test "${SHARED_BUILD}" = "0" ; then
# static
AC_MSG_RESULT([using static flags])
runtime=
MAKE_DLL="echo "
LIBSUFFIX="s\${DBGX}.a"
LIBRARIES="\${STATIC_LIBRARIES}"
EXESUFFIX="s\${DBGX}.exe"
DLLSUFFIX=""
else
# dynamic
AC_MSG_RESULT([using shared flags])
# check to see if ld supports --shared. Libtool does a much
# more extensive test, but not really needed in this case.
if test -z "$LD"; then
ld_prog="`(${CC} -print-prog-name=ld) 2>/dev/null`"
if test -z "$ld_prog"; then
ld_prog=ld
else
# get rid of the potential '\r' from ld_prog.
ld_prog="`(echo $ld_prog | tr -d '\015' | sed 's,\\\\,\\/,g')`"
fi
LD="$ld_prog"
fi
AC_MSG_CHECKING([whether $ld_prog supports -shared option])
# now the ad-hoc check to see if GNU ld supports --shared.
if "$LD" --shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
ld_supports_shared="no"
SHLIB_LD="${DLLWRAP-dllwrap}"
else
ld_supports_shared="yes"
SHLIB_LD="${CC} -shared"
fi
AC_MSG_RESULT([$ld_supports_shared])
runtime=
# Add SHLIB_LD_LIBS to the Make rule, not here.
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags}"
if test "${ld_supports_shared}" = "yes"; then
MAKE_DLL="${MAKE_DLL} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)"
else
MAKE_DLL="${MAKE_DLL} --output-lib \$(patsubst %.dll,lib%.a,\[$]@)"
fi
LIBSUFFIX="\${DBGX}.a"
DLLSUFFIX="\${DBGX}.dll"
EXESUFFIX="\${DBGX}.exe"
LIBRARIES="\${SHARED_LIBRARIES}"
fi
EXTRA_CFLAGS="${extra_cflags}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
CFLAGS_WARNING="-Wall -Wconversion"
LDFLAGS_DEBUG=-g
LDFLAGS_OPTIMIZE=-O
# Specify the CC output file names based on the target name
CC_OBJNAME="-o \[$]@"
CC_EXENAME="-o \[$]@"
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
LDFLAGS_WINDOW="-mwindows ${extra_ldflags}"
else
SHLIB_LD="link -dll -nologo"
SHLIB_LD_LIBS="user32.lib advapi32.lib"
LIBS="user32.lib advapi32.lib"
LIBS_GUI="gdi32.lib comdlg32.lib"
AR="lib -nologo"
STLIB_LD="lib -nologo"
RC="rc"
MAKE_LIB="\${AR} -out:\[$]@"
MAKE_EXE="\${CC} -Fe\[$]@"
LIBPREFIX=""
if test "${SHARED_BUILD}" = "0" ; then
# static
AC_MSG_RESULT([using static flags])
runtime=-MT
MAKE_DLL="echo "
LIBSUFFIX="s\${DBGX}.lib"
LIBRARIES="\${STATIC_LIBRARIES}"
|
| ︙ | ︙ | |||
389 390 391 392 393 394 395 |
EXTRA_CFLAGS="-YX"
CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
CFLAGS_WARNING="-W3"
LDFLAGS_DEBUG="-debug:full -debugtype:cv"
LDFLAGS_OPTIMIZE="-release"
| < | | 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
EXTRA_CFLAGS="-YX"
CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
CFLAGS_WARNING="-W3"
LDFLAGS_DEBUG="-debug:full -debugtype:cv"
LDFLAGS_OPTIMIZE="-release"
# Specify the CC output file names based on the target name
CC_OBJNAME="-Fo\[$]@"
CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) \$(PATHTYPE) '\[$]@')\""
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
LDFLAGS_CONSOLE="-subsystem:console"
LDFLAGS_WINDOW="-subsystem:windows"
fi
])
|
| ︙ | ︙ |
Changes to win/tclWin32Dll.c.
1 2 3 | /* * tclWin32Dll.c -- * | | < > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /* * tclWin32Dll.c -- * * This file contains the DLL entry point. * * Copyright (c) 1995-1996 Sun Microsystems, Inc. * Copyright (c) 1998-2000 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclWin32Dll.c,v 1.9 2000/03/31 08:52:30 hobbs Exp $ */ #include "tclWinInt.h" /* * The following data structures are used when loading the thunking * library for execing child processes under Win32s. |
| ︙ | ︙ | |||
31 32 33 34 35 36 37 | /* * The following variables keep track of information about this DLL * on a per-instance basis. Each time this DLL is loaded, it gets its own * new data segment with its own copy of all static and global information. */ static HINSTANCE hInstance; /* HINSTANCE of this DLL. */ | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | /* * The following variables keep track of information about this DLL * on a per-instance basis. Each time this DLL is loaded, it gets its own * new data segment with its own copy of all static and global information. */ static HINSTANCE hInstance; /* HINSTANCE of this DLL. */ static int platformId; /* Running under NT, or 95/98? */ /* * The following function tables are used to dispatch to either the * wide-character or multi-byte versions of the operating system calls, * depending on whether the Unicode calls are available. */ |
| ︙ | ︙ | |||
199 200 201 202 203 204 205 | #endif /* !STATIC_BUILD */ #endif /* __WIN32__ */ /* *---------------------------------------------------------------------- * | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | #endif /* !STATIC_BUILD */ #endif /* __WIN32__ */ /* *---------------------------------------------------------------------- * * TclWinGetTclInstance -- * * Retrieves the global library instance handle. * * Results: * Returns the global library instance handle. * |
| ︙ | ︙ | |||
309 310 311 312 313 314 315 | * * This function initializes the internal state of the tcl library. * * Results: * None. * * Side effects: | | < | | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
*
* This function initializes the internal state of the tcl library.
*
* Results:
* None.
*
* Side effects:
* Initializes the tclPlatformId variable.
*
*----------------------------------------------------------------------
*/
void
TclWinInit(hInst)
HINSTANCE hInst; /* Library instance handle. */
{
OSVERSIONINFO os;
hInstance = hInst;
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&os);
platformId = os.dwPlatformId;
/*
* We no longer support Win32s, so just in case someone manages to
* get a runtime there, make sure they know that.
*/
|
| ︙ | ︙ |
Changes to win/tclWinInit.c.
1 2 3 4 5 6 7 8 9 | /* * tclWinInit.c -- * * Contains the Windows-specific interpreter initialization functions. * * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | /* * tclWinInit.c -- * * Contains the Windows-specific interpreter initialization functions. * * Copyright (c) 1994-1997 Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * * RCS: @(#) $Id: tclWinInit.c,v 1.22 2000/03/31 08:52:31 hobbs Exp $ */ #include "tclWinInt.h" #include <winreg.h> #include <winnt.h> #include <winbase.h> |
| ︙ | ︙ | |||
545 546 547 548 549 550 551 |
char *ptr;
char buffer[TCL_INTEGER_SPACE * 2];
SYSTEM_INFO sysInfo;
OemId *oemId;
OSVERSIONINFOA osInfo;
Tcl_DString ds;
| | | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
char *ptr;
char buffer[TCL_INTEGER_SPACE * 2];
SYSTEM_INFO sysInfo;
OemId *oemId;
OSVERSIONINFOA osInfo;
Tcl_DString ds;
osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
GetVersionExA(&osInfo);
oemId = (OemId *) &sysInfo;
GetSystemInfo(&sysInfo);
/*
* Initialize the tclDefaultLibrary variable from the registry.
|
| ︙ | ︙ |
Changes to win/tclWinPort.h.
1 2 3 4 5 6 7 8 9 10 11 12 | /* * tclWinPort.h -- * * This header file handles porting issues that occur because of * differences between Windows and Unix. It should be the only * file that contains #ifdefs to handle different flavors of OS. * * Copyright (c) 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /* * tclWinPort.h -- * * This header file handles porting issues that occur because of * differences between Windows and Unix. It should be the only * file that contains #ifdefs to handle different flavors of OS. * * Copyright (c) 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclWinPort.h,v 1.12 2000/03/31 08:52:31 hobbs Exp $ */ #ifndef _TCLWINPORT #define _TCLWINPORT #ifndef _TCLINT # include "tclInt.h" |
| ︙ | ︙ | |||
331 332 333 334 335 336 337 | /* * Visual C++ has some odd names for common functions, so we need to * define a few macros to handle them. Also, it defines EDEADLOCK and * EDEADLK as the same value, which confuses Tcl_ErrnoId(). */ | | > > > | | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | /* * Visual C++ has some odd names for common functions, so we need to * define a few macros to handle them. Also, it defines EDEADLOCK and * EDEADLK as the same value, which confuses Tcl_ErrnoId(). */ #if defined(_MSC_VER) || defined(__MINGW32__) # define environ _environ # define hypot _hypot # define exception _exception # undef EDEADLOCK # if defined(__MINGW32__) && !defined(__MSVCRT__) # define timezone _timezone # endif #endif /* _MSC_VER || __MINGW32__ */ /* *--------------------------------------------------------------------------- * The following macros and declarations represent the interface between * generic and windows-specific parts of Tcl. Some of the macros may * override functions declared in tclInt.h. *--------------------------------------------------------------------------- |
| ︙ | ︙ |
Changes to win/tclWinReg.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* * tclWinReg.c -- * * This file contains the implementation of the "registry" Tcl * built-in command. This command is built as a dynamically * loadable extension in a separate DLL. * * Copyright (c) 1997 by Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* * tclWinReg.c -- * * This file contains the implementation of the "registry" Tcl * built-in command. This command is built as a dynamically * loadable extension in a separate DLL. * * Copyright (c) 1997 by Sun Microsystems, Inc. * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclWinReg.c,v 1.11 2000/03/31 08:52:32 hobbs Exp $ */ #include <tclPort.h> #include <stdlib.h> #define WIN32_LEAN_AND_MEAN #include <windows.h> |
| ︙ | ︙ | |||
209 210 211 212 213 214 215 |
*----------------------------------------------------------------------
*/
int
Registry_Init(
Tcl_Interp *interp)
{
| < < < < < | | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
*----------------------------------------------------------------------
*/
int
Registry_Init(
Tcl_Interp *interp)
{
if (!Tcl_InitStubs(interp, "8.0", 0)) {
return TCL_ERROR;
}
/*
* Determine if the unicode interfaces are available and select the
* appropriate registry function table.
*/
if (TclWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {
regWinProcs = &unicodeProcs;
} else {
regWinProcs = &asciiProcs;
}
Tcl_CreateObjCommand(interp, "registry", RegistryObjCmd, NULL, NULL);
return Tcl_PkgProvide(interp, "registry", "1.0");
|
| ︙ | ︙ |