[libcxx] r339794 - For FreeBSD, don't define _M in nasty_macros.hpp
Dimitry Andric via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 10:30:32 PDT 2018
Author: dim
Date: Wed Aug 15 10:30:32 2018
New Revision: 339794
URL: http://llvm.org/viewvc/llvm-project?rev=339794&view=rev
Log:
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/trunk/test/support/nasty_macros.hpp
Modified: libcxx/trunk/test/support/nasty_macros.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/nasty_macros.hpp?rev=339794&r1=339793&r2=339794&view=diff
==============================================================================
--- libcxx/trunk/test/support/nasty_macros.hpp (original)
+++ libcxx/trunk/test/support/nasty_macros.hpp Wed Aug 15 10:30:32 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