-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b124
-
generic
-
generic
The warning from VS2010 compilers: _STATIC_CPPLIB is deprecated
Silence this warning.
diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk
--- a/make/common/Defs-windows.gmk
+++ b/make/common/Defs-windows.gmk
@@ -266,6 +266,8 @@
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
+# NOTE: We use /D _DISABLE_DEPRECATE_STATIC_CPPLIB to shut up VS2010
+# about it being deprecated.
#
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
ifeq ($(MS_RUNTIME_STATIC),true)
@@ -293,7 +295,7 @@
endif
# Always add _STATIC_CPPLIB definition
-STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
+STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ifeq ($(CC_VERSION),msvc)
diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk
--- a/make/common/Defs-windows.gmk
+++ b/make/common/Defs-windows.gmk
@@ -266,6 +266,8 @@
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
+# NOTE: We use /D _DISABLE_DEPRECATE_STATIC_CPPLIB to shut up VS2010
+# about it being deprecated.
#
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
ifeq ($(MS_RUNTIME_STATIC),true)
@@ -293,7 +295,7 @@
endif
# Always add _STATIC_CPPLIB definition
-STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
+STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ifeq ($(CC_VERSION),msvc)
@@ -395,8 +397,11 @@
# Treat compiler warnings as errors, if requested
#
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
-# Turn off security warnings about using the standard C library function strcpy
-CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE
+# The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on
+# the standard C library functions like strcpy.
+# The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using
+# non-standard C POSIX functions.
+CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
ifeq ($(COMPILER_WARNINGS_FATAL),true)
CFLAGS_COMMON += -WX
endif
Silence this warning.
diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk
--- a/make/common/Defs-windows.gmk
+++ b/make/common/Defs-windows.gmk
@@ -266,6 +266,8 @@
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
+# NOTE: We use /D _DISABLE_DEPRECATE_STATIC_CPPLIB to shut up VS2010
+# about it being deprecated.
#
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
ifeq ($(MS_RUNTIME_STATIC),true)
@@ -293,7 +295,7 @@
endif
# Always add _STATIC_CPPLIB definition
-STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
+STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ifeq ($(CC_VERSION),msvc)
diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk
--- a/make/common/Defs-windows.gmk
+++ b/make/common/Defs-windows.gmk
@@ -266,6 +266,8 @@
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
+# NOTE: We use /D _DISABLE_DEPRECATE_STATIC_CPPLIB to shut up VS2010
+# about it being deprecated.
#
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
ifeq ($(MS_RUNTIME_STATIC),true)
@@ -293,7 +295,7 @@
endif
# Always add _STATIC_CPPLIB definition
-STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
+STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ifeq ($(CC_VERSION),msvc)
@@ -395,8 +397,11 @@
# Treat compiler warnings as errors, if requested
#
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
-# Turn off security warnings about using the standard C library function strcpy
-CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE
+# The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on
+# the standard C library functions like strcpy.
+# The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using
+# non-standard C POSIX functions.
+CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
ifeq ($(COMPILER_WARNINGS_FATAL),true)
CFLAGS_COMMON += -WX
endif
- relates to
-
JDK-7000995 Add check in makefiles to verify that msvcp100.dll is NOT used
- Closed