[libcxx-commits] [PATCH] D89588: [libcxx] [test] Avoid conflicting definitions of _CRT_SECURE_NO_WARNINGS

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 18 12:30:32 PDT 2020


mstorsjo updated this revision to Diff 298895.
mstorsjo retitled this revision from "[libcxx] [test] Remove a duplicate definition of _CRT_SECURE_NO_WARNINGS" to "[libcxx] [test] Avoid conflicting definitions of _CRT_SECURE_NO_WARNINGS".
mstorsjo edited the summary of this revision.
mstorsjo added a comment.

Kept both instances of the define but adjusted them to match.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89588/new/

https://reviews.llvm.org/D89588

Files:
  libcxx/test/support/msvc_stdlib_force_include.h
  libcxx/utils/libcxx/test/config.py


Index: libcxx/utils/libcxx/test/config.py
===================================================================
--- libcxx/utils/libcxx/test/config.py
+++ libcxx/utils/libcxx/test/config.py
@@ -272,7 +272,6 @@
         compile_flags_str = self.get_lit_conf('compile_flags', '')
         self.cxx.compile_flags += shlex.split(compile_flags_str)
         if self.target_info.is_windows():
-            # FIXME: Can we remove this?
             self.cxx.compile_flags += ['-D_CRT_SECURE_NO_WARNINGS']
             # Required so that tests using min/max don't fail on Windows,
             # and so that those tests don't have to be changed to tolerate
Index: libcxx/test/support/msvc_stdlib_force_include.h
===================================================================
--- libcxx/test/support/msvc_stdlib_force_include.h
+++ libcxx/test/support/msvc_stdlib_force_include.h
@@ -14,7 +14,7 @@
 
 #ifndef _LIBCXX_IN_DEVCRT
     // Silence warnings about CRT machinery.
-    #define _CRT_SECURE_NO_WARNINGS
+    #define _CRT_SECURE_NO_WARNINGS 1
 
     // Avoid assertion dialogs.
     #define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89588.298895.patch
Type: text/x-patch
Size: 1137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201018/563f9da8/attachment.bin>


More information about the libcxx-commits mailing list