Kaydet (Commit) d098fb74 authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Tor Lillqvist

Improve handling of _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING

_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING turned into a global
-D..., same as existing
_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING.

Change-Id: Ifefdc930a1d3ecf5366523dea509bfaca1f4e002
Reviewed-on: https://gerrit.libreoffice.org/55188Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst c4015f23
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
// See https://blogs.msdn.microsoft.com/vcblog/2017/12/08/c17-feature-removals-and-deprecations/
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 1
#include <vector> #include <vector>
#include "ole2uno.hxx" #include "ole2uno.hxx"
......
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
// https://www.codeproject.com/Articles/9014/Understanding-COM-Event-Handling // https://www.codeproject.com/Articles/9014/Understanding-COM-Event-Handling
// https://blogs.msdn.microsoft.com/ericlippert/2005/02/15/why-does-wscript-connectobject-not-always-work/ // https://blogs.msdn.microsoft.com/ericlippert/2005/02/15/why-does-wscript-connectobject-not-always-work/
// See https://blogs.msdn.microsoft.com/vcblog/2017/12/08/c17-feature-removals-and-deprecations/
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 1
#include "ole2uno.hxx" #include "ole2uno.hxx"
#include <stdio.h> #include <stdio.h>
......
...@@ -15,11 +15,6 @@ ...@@ -15,11 +15,6 @@
#ifndef INCLUDED_COMPHELPER_WINDOWSDEBUGOUTPUT_HXX #ifndef INCLUDED_COMPHELPER_WINDOWSDEBUGOUTPUT_HXX
#define INCLUDED_COMPHELPER_WINDOWSDEBUGOUTPUT_HXX #define INCLUDED_COMPHELPER_WINDOWSDEBUGOUTPUT_HXX
// If you get a warning about <codecvt> being deprecated from VS2017, you need to add a "#define
// _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 1" to your source file before any #include
// statements. It would not be enough to have that here. See
// https://blogs.msdn.microsoft.com/vcblog/2017/12/08/c17-feature-removals-and-deprecations/
#include <codecvt> #include <codecvt>
#include <iomanip> #include <iomanip>
#include <ostream> #include <ostream>
......
...@@ -48,6 +48,7 @@ gb_COMPILERDEFS := \ ...@@ -48,6 +48,7 @@ gb_COMPILERDEFS := \
-DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE \ -DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE \
-DBOOST_SYSTEM_NO_DEPRECATED \ -DBOOST_SYSTEM_NO_DEPRECATED \
-D_HAS_AUTO_PTR_ETC \ -D_HAS_AUTO_PTR_ETC \
-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING \
-D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \ -D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \
-D_CRT_NON_CONFORMING_SWPRINTFS \ -D_CRT_NON_CONFORMING_SWPRINTFS \
-D_CRT_NONSTDC_NO_DEPRECATE \ -D_CRT_NONSTDC_NO_DEPRECATE \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment