From 122bb72a66973fecc8939b5bb376d2b65334738b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 28 Nov 2019 12:53:38 +0000 Subject: Enhance rules.vc like already done in other configure scripts: Determine HAVE_STDINT_H/HAVE_INTTYPES_H/HAVE_STDBOOL_H/MP_NO_STDINT the simple way, just by compiler version. --- win/makefile.vc | 2 +- win/rules.vc | 13 ++++++++++++- win/tclWinPort.h | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/win/makefile.vc b/win/makefile.vc index fe9b790..26f7da3 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -418,7 +418,7 @@ PKGSDIR = $(ROOT)\pkgs # Additional include and C macro definitions for the implicit rules # defined in rules.vc PRJ_INCLUDES = -I"$(TOMMATHDIR)" -PRJ_DEFINES = /DTCL_TOMMATH /DMP_PREC=4 /Dinline=__inline /DHAVE_ZLIB=1 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMP_FIXED_CUTOFFS /DMP_NO_STDINT +PRJ_DEFINES = /DTCL_TOMMATH /DMP_PREC=4 /Dinline=__inline /DHAVE_ZLIB=1 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMP_FIXED_CUTOFFS # Additional Link libraries needed beyond those in rules.vc PRJ_LIBS = netapi32.lib user32.lib userenv.lib ws2_32.lib diff --git a/win/rules.vc b/win/rules.vc index 2061e9b..8050ed3 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change # the major version. RULES_VERSION_MAJOR = 1 -RULES_VERSION_MINOR = 5 +RULES_VERSION_MINOR = 6 # The PROJECT macro must be defined by parent makefile. !if "$(PROJECT)" == "" @@ -1291,6 +1291,17 @@ INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\..\include # define PRJ_LIBS before including rules.rc if additional libs are needed OPTDEFINES = /DTCL_CFGVAL_ENCODING=$(CFG_ENCODING) /DSTDC_HEADERS +!if $(VCVERSION) >= 1600 +OPTDEFINES = $(OPTDEFINES) /DHAVE_STDINT_H=1 +!else +OPTDEFINES = $(OPTDEFINES) /DMP_NO_STDINT=1 +!endif +!if $(VCVERSION) >= 1700 +OPTDEFINES = $(OPTDEFINES) /DHAVE_INTTYPES_H=1 +!endif +!if $(VCVERSION) >= 1800 +OPTDEFINES = $(OPTDEFINES) /DHAVE_STDBOOL_H=1 +!endif !if $(TCL_MEM_DEBUG) OPTDEFINES = $(OPTDEFINES) /DTCL_MEM_DEBUG diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 5e63c02..e2eae56 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -92,7 +92,7 @@ typedef DWORD_PTR * PDWORD_PTR; #include #include #include -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif #include -- cgit v0.12