summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-04 10:00:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-03-04 10:11:15 +0100
commit61b541e9ef725ea75cf2e5c8407b0b8fa151fb1b (patch)
tree261b8bc209d6005523889f8a11b866fb4ab48399 /external
parent6b68df576344f24f549030604c5413eb2062551a (diff)
external/liblangtag: -Werror,-Wundef (__GNUC__ vs. clang-cl)
Change-Id: I4213eb841d7eb3627ae64cc242b81b8e7f09cc79
Diffstat (limited to 'external')
-rw-r--r--external/liblangtag/UnpackedTarball_langtag.mk5
-rwxr-xr-xexternal/liblangtag/clang-cl.patch.020
2 files changed, 25 insertions, 0 deletions
diff --git a/external/liblangtag/UnpackedTarball_langtag.mk b/external/liblangtag/UnpackedTarball_langtag.mk
index ebcb0611c66f..69bc045950d4 100644
--- a/external/liblangtag/UnpackedTarball_langtag.mk
+++ b/external/liblangtag/UnpackedTarball_langtag.mk
@@ -30,4 +30,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,langtag,\
))
endif
endif
+
+$(eval $(call gb_UnpackedTarball_add_patches,langtag, \
+ external/liblangtag/clang-cl.patch.0 \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/liblangtag/clang-cl.patch.0 b/external/liblangtag/clang-cl.patch.0
new file mode 100755
index 000000000000..d61fde270cd1
--- /dev/null
+++ b/external/liblangtag/clang-cl.patch.0
@@ -0,0 +1,20 @@
+--- liblangtag/lt-macros.h
++++ liblangtag/lt-macros.h
+@@ -120,7 +120,7 @@
+ * It allows the compiler to type-check the arguments passed to the function.
+ * See the GNU C documentation for details.
+ */
+-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
++#if (defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))) || defined __clang__
+ # define LT_GNUC_PRINTF(format_idx, arg_idx) \
+ __attribute__((__format__ (__printf__, format_idx, arg_idx)))
+ #else /* !__GNUC__ */
+@@ -136,7 +136,7 @@
+ * explicit %NULL.
+ * See the GNU C documentation for details.
+ */
+-#if __GNUC__ >= 4
++#if (defined __GNUC__ &&__GNUC__ >= 4) || defined __clang__
+ # define LT_GNUC_NULL_TERMINATED \
+ __attribute__((__sentinel__))
+ #else /* !__GNUC__ */