From 4e7f8e5a82e57914d07be2508c9e3ca3f7ca6ff0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 21 Dec 2016 18:13:48 +0100 Subject: external/hunspell: Work around -Werror,-Wundef with clang-cl ...when lingucomponent/source/spellcheck/spell/sspellimp.cxx includes hunspell.hxx Change-Id: Ibb4b2901a9dfbf7e145281bedeaa9d8daf79aba5 --- external/hunspell/UnpackedTarball_hunspell.mk | 6 ++++++ external/hunspell/clangcl-werror.patch | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100755 external/hunspell/clangcl-werror.patch (limited to 'external') diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk index 127ca5d8a0b1..f2bda3f55cff 100644 --- a/external/hunspell/UnpackedTarball_hunspell.mk +++ b/external/hunspell/UnpackedTarball_hunspell.mk @@ -17,4 +17,10 @@ $(eval $(call gb_UnpackedTarball_set_post_action,hunspell,\ )) endif +$(eval $(call gb_UnpackedTarball_set_patchlevel,hunspell,0)) + +$(eval $(call gb_UnpackedTarball_add_patches,hunspell, \ + external/hunspell/clangcl-werror.patch \ +)) + # vim: set noet sw=4 ts=4: diff --git a/external/hunspell/clangcl-werror.patch b/external/hunspell/clangcl-werror.patch new file mode 100755 index 000000000000..1a41da93c523 --- /dev/null +++ b/external/hunspell/clangcl-werror.patch @@ -0,0 +1,11 @@ +--- src/hunspell/hunspell.hxx ++++ src/hunspell/hunspell.hxx +@@ -85,7 +85,7 @@ + #define MAXSHARPS 5 + #define MAXWORDLEN 176 + +-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) ++#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) + # define H_DEPRECATED __attribute__((__deprecated__)) + #elif defined(_MSC_VER) && (_MSC_VER >= 1300) + # define H_DEPRECATED __declspec(deprecated) -- cgit