diff options
author | nijtmans <nijtmans> | 2010-10-31 21:25:07 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-10-31 21:25:07 (GMT) |
commit | 44f16df1be0b7cc077186b156b508865160a0b50 (patch) | |
tree | d5fdcbd91e15ba658de09ed986f38f3ee76e8820 | |
parent | 118b3a147bb0d54069c2190fa61bdd06dce15cd9 (diff) | |
download | tcl-44f16df1be0b7cc077186b156b508865160a0b50.zip tcl-44f16df1be0b7cc077186b156b508865160a0b50.tar.gz tcl-44f16df1be0b7cc077186b156b508865160a0b50.tar.bz2 |
Add -D_CRT_SECURE_NO_DEPRECATE and -D_CRT_NONSTDC_NO_DEPRECATE, reducing the number of
deprecation warnings on later VC++ versions.
Better VCVERSION determination.
All changes backported from Tcl8.5/8.6
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | win/.cvsignore | 2 | ||||
-rwxr-xr-x | win/configure | 33 | ||||
-rw-r--r-- | win/rules.vc | 35 | ||||
-rw-r--r-- | win/tcl.m4 | 29 |
5 files changed, 64 insertions, 44 deletions
@@ -1,3 +1,12 @@ +2010-10-31 Jan Nijtmans <nijtmans@users.sf.net> + + * win/tcl.m4 Add -D_CRT_SECURE_NO_DEPRECATE and + -D_CRT_NONSTDC_NO_DEPRECATE, reducing the number of + deprecation warnings on later VC++ versions. + * win/rules.vc Better VCVERSION determination + * win/configure (regenerated with autoconf 2.13) + All changes backported from Tcl8.5/8.6 + 2010-10-23 Jan Nijtmans <nijtmans@users.sf.net> * tools/uniParse.tcl: [Bug 3085863]: tclUniData 9 years old diff --git a/win/.cvsignore b/win/.cvsignore index b986cda..89889c3 100644 --- a/win/.cvsignore +++ b/win/.cvsignore @@ -13,3 +13,5 @@ tcl.hpj tclConfig.sh nmakehlp.exe .#* +config.cache +config.status diff --git a/win/configure b/win/configure index 7030953..912cf97 100755 --- a/win/configure +++ b/win/configure @@ -1618,7 +1618,7 @@ echo "configure:1525: checking compiler flags" >&5 CC_OBJNAME="-o \$@" CC_EXENAME="-o \$@" - # Specify linker flags depending on the type of app being + # Specify linker flags depending on the type of app being # built -- Console vs. Window. # # ORIGINAL COMMENT: @@ -1629,7 +1629,7 @@ echo "configure:1525: checking compiler flags" >&5 # cross compiling. Remove this -e workaround once we # require a gcc that does not have this bug. # - # MK NOTE: Tk should use a different mechanism. This causes + # MK NOTE: Tk should use a different mechanism. This causes # interesting problems, such as wish dying at startup. #LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" @@ -1729,16 +1729,19 @@ echo "configure:1525: checking compiler flags" >&5 MAKE_EXE="\${CC} -Fe\$@" LIBPREFIX="" + CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" LDFLAGS_DEBUG="-debug:full" LDFLAGS_OPTIMIZE="-release" - + # Specify the CC output file names based on the target name CC_OBJNAME="-Fo\$@" CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\"" - # Specify linker flags depending on the type of app being + # Specify linker flags depending on the type of app being # built -- Console vs. Window. LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" @@ -1759,7 +1762,7 @@ echo "configure:1525: checking compiler flags" >&5 echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1763: checking for build with symbols" >&5 +echo "configure:1766: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1819,7 +1822,7 @@ TCL_DBGX=${DBGX} #-------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1823: checking how to run the C preprocessor" >&5 +echo "configure:1826: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1834,13 +1837,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1838 "configure" +#line 1841 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1851,13 +1854,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1855 "configure" +#line 1858 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1868,13 +1871,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 1872 "configure" +#line 1875 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1900,17 +1903,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:1904: checking for errno.h" >&5 +echo "configure:1907: checking for errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1909 "configure" +#line 1912 "configure" #include "confdefs.h" #include <errno.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/win/rules.vc b/win/rules.vc index f4fad25..c63e1c4 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2006 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.11.2.8 2010/10/23 21:42:15 nijtmans Exp $ +# RCS: @(#) $Id: rules.vc,v 1.11.2.9 2010/10/31 21:25:07 nijtmans Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -183,24 +183,27 @@ LINKERFLAGS =-ltcg _VC_MANIFEST_EMBED_EXE= _VC_MANIFEST_EMBED_DLL= -!if ![cl /Zs /Tc NUL 2>&1 | find "Version 12" > NUL] -VCVER=6 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 13" > NUL] -VCVER=7 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 14" > NUL] -VCVER=8 -_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 -_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 15" > NUL] -VCVER=9 -_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 -_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 16" > NUL] +VCVER=0 +!if ![echo VCVERSION=_MSC_VER > vercl.x] \ + && ![cl -nologo -TC -P vercl.x $(ERRNULL)] +!include vercl.i +!if $(VCVERSION) >= 1600 VCVER=10 +!elseif $(VCVERSION) >= 1500 +VCVER=9 +!elseif $(VCVERSION) >= 1400 +VCVER=8 +!elseif $(VCVERSION) >= 1300 +VCVER=7 +!elseif $(VCVERSION) >= 1200 +VCVER=6 +!endif +!endif + +# Since MSVC8 we must deal with manifest resources. +!if $(VCVERSION) >= 1400 _VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!else -VCVER=0 !endif #---------------------------------------------------------- @@ -27,7 +27,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ else TCL_BIN_DIR_DEFAULT=../../tcl/win fi - + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.4 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then @@ -67,7 +67,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ else TK_BIN_DIR_DEFAULT=../../tk/win fi - + AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.4 binaries from DIR], TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`) if test ! -d $TK_BIN_DIR; then @@ -86,7 +86,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # Load the tclConfig.sh file. # # Arguments: -# +# # Requires the following vars to be set: # TCL_BIN_DIR # @@ -158,7 +158,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ # Currently a no-op for Windows # # Arguments: -# +# # Requires the following vars to be set: # TK_BIN_DIR # @@ -191,7 +191,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -235,7 +235,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -273,11 +273,11 @@ AC_DEFUN([SC_ENABLE_THREADS], [ # # Arguments: # none -# +# # Requires the following vars to be set in the Makefile: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE -# +# # Results: # # Adds the following arguments to configure: @@ -526,7 +526,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CC_OBJNAME="-o \[$]@" CC_EXENAME="-o \[$]@" - # Specify linker flags depending on the type of app being + # Specify linker flags depending on the type of app being # built -- Console vs. Window. # # ORIGINAL COMMENT: @@ -537,7 +537,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # cross compiling. Remove this -e workaround once we # require a gcc that does not have this bug. # - # MK NOTE: Tk should use a different mechanism. This causes + # MK NOTE: Tk should use a different mechanism. This causes # interesting problems, such as wish dying at startup. #LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" @@ -637,16 +637,19 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ MAKE_EXE="\${CC} -Fe\[$]@" LIBPREFIX="" + CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" + EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" LDFLAGS_DEBUG="-debug:full" LDFLAGS_OPTIMIZE="-release" - + # Specify the CC output file names based on the target name CC_OBJNAME="-Fo\[$]@" CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\[$]@')\"" - # Specify linker flags depending on the type of app being + # Specify linker flags depending on the type of app being # built -- Console vs. Window. LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" @@ -682,7 +685,7 @@ AC_DEFUN([SC_WITH_TCL], [ else TCL_BIN_DEFAULT=../../tcl8.4/win fi - + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.4 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then |