summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-04 10:02:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-03-04 10:11:16 +0100
commit3889b2894fd7284aa7b2b9aeab763c7be658058d (patch)
tree24f6bd66bc600bef3fd40f719f1bc3f1fc2ae481 /external
parent7d697c7e22108035ef73a903dfc024b2b948b419 (diff)
external/redland: -Werror,-Wundef (__GNUC__ vs. clang-cl)
Change-Id: I1998dc90f20958ea8631e4db49e7f5206c907978
Diffstat (limited to 'external')
-rw-r--r--external/redland/UnpackedTarball_rasqal.mk1
-rw-r--r--external/redland/UnpackedTarball_redland.mk1
-rwxr-xr-xexternal/redland/rasqal/clang-cl.patch11
-rwxr-xr-xexternal/redland/redland/clang-cl.patch20
4 files changed, 33 insertions, 0 deletions
diff --git a/external/redland/UnpackedTarball_rasqal.mk b/external/redland/UnpackedTarball_rasqal.mk
index 92571dd4ca73..37e4fafee0a8 100644
--- a/external/redland/UnpackedTarball_rasqal.mk
+++ b/external/redland/UnpackedTarball_rasqal.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,rasqal,\
$(if $(filter WNTGCC,$(OS)$(COM)),external/redland/rasqal/rasqal-mingw.patch.1) \
$(if $(CROSS_COMPILING),external/redland/rasqal/rasqal-xcompile.patch.1) \
external/redland/rasqal/rpath.patch \
+ external/redland/rasqal/clang-cl.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/UnpackedTarball_redland.mk b/external/redland/UnpackedTarball_redland.mk
index d28e0dd0ecaf..8a0e88fd2b94 100644
--- a/external/redland/UnpackedTarball_redland.mk
+++ b/external/redland/UnpackedTarball_redland.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,redland,\
$(if $(CROSS_COMPILING),external/redland/redland/redland-xcompile.patch.1) \
external/redland/redland/redland-format.patch.0 \
external/redland/redland/rpath.patch \
+ external/redland/redland/clang-cl.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/rasqal/clang-cl.patch b/external/redland/rasqal/clang-cl.patch
new file mode 100755
index 000000000000..e35a2b4ee10c
--- /dev/null
+++ b/external/redland/rasqal/clang-cl.patch
@@ -0,0 +1,11 @@
+--- src/rasqal.h
++++ src/rasqal.h
+@@ -99,7 +99,7 @@
+ /* Use gcc 3.1+ feature to allow marking of deprecated API calls.
+ * This gives a warning during compiling.
+ */
+-#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
++#if (defined __GNUC__ && (( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3)) || defined __clang__
+ #define RASQAL_DEPRECATED __attribute__((deprecated))
+ #else
+ #define RASQAL_DEPRECATED
diff --git a/external/redland/redland/clang-cl.patch b/external/redland/redland/clang-cl.patch
new file mode 100755
index 000000000000..b5a7271fb089
--- /dev/null
+++ b/external/redland/redland/clang-cl.patch
@@ -0,0 +1,20 @@
+--- src/librdf.h
++++ src/librdf.h
+@@ -74,7 +74,7 @@
+ /* Use gcc 3.1+ feature to allow marking of deprecated API calls.
+ * This gives a warning during compiling.
+ */
+-#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
++#if (defined __GNUC__ && (( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3)) || defined __clang__
+ #define REDLAND_DEPRECATED __attribute__((deprecated))
+ #define REDLAND_NORETURN __attribute__((__noreturn__))
+ #else
+@@ -83,7 +83,7 @@
+ #endif
+
+
+-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
++#if (defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))) || defined __clang__
+ #define REDLAND_PRINTF_FORMAT(string_index, first_to_check_index) \
+ __attribute__((__format__(__printf__, string_index, first_to_check_index)))
+ #else