[libcxx] r339852 - Merging r339794:

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 02:45:10 PDT 2018


Author: hans
Date: Thu Aug 16 02:45:10 2018
New Revision: 339852

URL: http://llvm.org/viewvc/llvm-project?rev=339852&view=rev
Log:
Merging r339794:
------------------------------------------------------------------------
r339794 | dim | 2018-08-15 19:30:32 +0200 (Wed, 15 Aug 2018) | 8 lines

For FreeBSD, don't define _M in nasty_macros.hpp

Because FreeBSD uses _M in its <sys/types.h>, and it is hard to avoid
including that header, only define _M to NASTY_MACRO for other operating
systems.  This fixes almost 2000 unexpected test failures.

Discussed with Eric Fiselier.

------------------------------------------------------------------------

Modified:
    libcxx/branches/release_70/   (props changed)
    libcxx/branches/release_70/test/support/nasty_macros.hpp

Propchange: libcxx/branches/release_70/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 16 02:45:10 2018
@@ -1,2 +1,2 @@
 /libcxx/branches/apple:136569-137939
-/libcxx/trunk:339431,339697
+/libcxx/trunk:339431,339697,339794

Modified: libcxx/branches/release_70/test/support/nasty_macros.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_70/test/support/nasty_macros.hpp?rev=339852&r1=339851&r2=339852&view=diff
==============================================================================
--- libcxx/branches/release_70/test/support/nasty_macros.hpp (original)
+++ libcxx/branches/release_70/test/support/nasty_macros.hpp Thu Aug 16 02:45:10 2018
@@ -22,7 +22,11 @@
 #define _J NASTY_MACRO
 #define _K NASTY_MACRO
 #define _L NASTY_MACRO
+// Because FreeBSD uses _M in its <sys/types.h>, and it is hard to avoid
+// including that header, only define _M for other operating systems.
+#ifndef __FreeBSD__
 #define _M NASTY_MACRO
+#endif
 #define _N NASTY_MACRO
 #define _O NASTY_MACRO
 #define _P NASTY_MACRO




More information about the cfe-commits mailing list