aboutsummaryrefslogtreecommitdiff
path: root/pcap/compiler-tests.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-24 02:31:40 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-24 02:31:40 -0800
commit89a890526ae2b36353c10c665c7228d19393722e (patch)
treed084c40e42388c655a1d576c4d2e627fdce52585 /pcap/compiler-tests.h
parent583704d0726c81170bb44586d848dfb3e327ea2d (diff)
Squelch warnings caused by Berkeley YACC bug/misfeature.
Diffstat (limited to 'pcap/compiler-tests.h')
-rw-r--r--pcap/compiler-tests.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/pcap/compiler-tests.h b/pcap/compiler-tests.h
index a184f6b0..5e17853a 100644
--- a/pcap/compiler-tests.h
+++ b/pcap/compiler-tests.h
@@ -88,6 +88,18 @@
#endif
/*
+ * Check whether this is Clang major.minor or a later release.
+ */
+
+#if !defined(__clang__)
+#define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) 0
+#else
+#define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) \
+ (__clang_major__ > (major) || \
+ (__clang_major__ == (major) && __clang_minor__ >= (minor)))
+#endif
+
+/*
* Check whether this is Sun C/SunPro C/Oracle Studio major.minor
* or a later release.
*