summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorMouse <mouse008@gmail.com>2016-07-04 13:11:15 -0400
committerMouse <mouse008@gmail.com>2016-07-04 13:11:15 -0400
commite36270fa7c15b1a47bd7336d09ccc0d7e9e81eec (patch)
tree5f2685ae855715f2327ad77062eec3f63711dd04 /misc.h
parentbe80fcdbba204b58e96c41b624807460d9eb2d7e (diff)
downloadcryptopp-git-e36270fa7c15b1a47bd7336d09ccc0d7e9e81eec.tar.gz
Do not re-define macros already provided by native compiler
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/misc.h b/misc.h
index a888deef..3e16e0e1 100644
--- a/misc.h
+++ b/misc.h
@@ -63,10 +63,18 @@
#if defined(__GNUC__) && defined(__BMI__)
# include <immintrin.h>
# if defined(__clang__)
+#ifndef _tzcnt_u32
# define _tzcnt_u32(x) __tzcnt_u32(x)
+#endif
+#ifndef _tzcnt_u64
# define _tzcnt_u64(x) __tzcnt_u64(x)
+#endif
+#ifndef _blsr_u32
# define _blsr_u32(x) __blsr_u32(x)
+#endif
+#ifndef _blsr_u64
# define _blsr_u64(x) __blsr_u64(x)
+#endif
# endif
#endif