[PATCH] Check for the __APPLE__ preprocessor macro additionally to __MACH__.
Thomas Schwinge
thomas at codesourcery.com
Mon Mar 25 09:07:50 PDT 2013
__MACH__ is defined for GNU/Hurd, too.
---
SingleSource/UnitTests/ms_struct-bitfield-init-1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git SingleSource/UnitTests/ms_struct-bitfield-init-1.c SingleSource/UnitTests/ms_struct-bitfield-init-1.c
index 237ff54..90ca791 100644
--- SingleSource/UnitTests/ms_struct-bitfield-init-1.c
+++ SingleSource/UnitTests/ms_struct-bitfield-init-1.c
@@ -3,7 +3,8 @@
#define ATTR __attribute__((__ms_struct__))
// GCC only implements #pragma ms_struct on Darwin.
-#define HAVE_PRAGMA_MS_STRUCT (defined(__clang__) || defined(__MACH__))
+#define HAVE_PRAGMA_MS_STRUCT (defined(__clang__) || \
+ defined(__APPLE__) && defined(__MACH__))
struct {
unsigned int bf_1 : 12;
--
1.7.9.5
More information about the llvm-commits
mailing list