summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/nasty_macros.hpp
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2018-08-15 17:30:32 +0000
committerDimitry Andric <dimitry@andric.com>2018-08-15 17:30:32 +0000
commitc7510aa2acc16e8fd417528d8b4e554c7fb543f4 (patch)
tree69fd722e9ba56b3454b05b1011b1fd0e1dc549a3 /libcxx/test/support/nasty_macros.hpp
parent49a8280f43f06dee8d2ef5f74c72fe628c186810 (diff)
downloadbcm5719-llvm-c7510aa2acc16e8fd417528d8b4e554c7fb543f4.tar.gz
bcm5719-llvm-c7510aa2acc16e8fd417528d8b4e554c7fb543f4.zip
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. llvm-svn: 339794
Diffstat (limited to 'libcxx/test/support/nasty_macros.hpp')
-rw-r--r--libcxx/test/support/nasty_macros.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/test/support/nasty_macros.hpp b/libcxx/test/support/nasty_macros.hpp
index 76d8ab0e720..97a17bb689a 100644
--- a/libcxx/test/support/nasty_macros.hpp
+++ b/libcxx/test/support/nasty_macros.hpp
@@ -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
OpenPOWER on IntegriCloud