diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-11-09 09:06:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-11-09 10:23:54 +0100 |
commit | becbabbb785545af6a1799f5ecd445785534d478 (patch) | |
tree | 9ba13219fef8c0dc156c81e58c88ade7f0fc6fb4 /external | |
parent | 615930949304104933d38f0394ef26e104ecaedc (diff) |
external/clucene: Remove unnecessary uses of obsolete std::binary_function
...which has been removed from C++17. libc++ and libstdc++ still silently
support it, but MSVC needs an explicit -D_HAS_AUTO_PTR_ETC, and this change is a
prerequisite to drop that global define again from
solenv/gbuild/platform/com_MSC_defs.mk (it had been added there with
61c88ae6945c241f5f2aeb844eeca0776b487132 "gbuild: always compile as C++17 with
MSVC 2017", but code including external/clucene, like
helpcompiler/source/LuceneHelper.cxx, appears to be the only code relying on
that global define)
Change-Id: I512d56f833c516dba3874cb0b4ef5190a88d3faf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124900
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/clucene/UnpackedTarball_clucene.mk | 1 | ||||
-rw-r--r-- | external/clucene/patches/binary_function.patch | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/external/clucene/UnpackedTarball_clucene.mk b/external/clucene/UnpackedTarball_clucene.mk index b215d1a8206a..c3928d335c57 100644 --- a/external/clucene/UnpackedTarball_clucene.mk +++ b/external/clucene/UnpackedTarball_clucene.mk @@ -53,6 +53,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\ external/clucene/patches/c++20.patch \ external/clucene/patches/write-strings.patch \ external/clucene/patches/nullstring.patch \ + external/clucene/patches/binary_function.patch \ )) ifneq ($(OS),WNT) diff --git a/external/clucene/patches/binary_function.patch b/external/clucene/patches/binary_function.patch new file mode 100644 index 000000000000..5b6f8ece9bee --- /dev/null +++ b/external/clucene/patches/binary_function.patch @@ -0,0 +1,34 @@ +--- src/core/CLucene/util/Equators.h ++++ src/core/CLucene/util/Equators.h +@@ -22,19 +22,19 @@ + /** @internal */ + class CLUCENE_INLINE_EXPORT Equals{ + public: +- class CLUCENE_INLINE_EXPORT Int32:public CL_NS_STD(binary_function)<const int32_t*,const int32_t*,bool> ++ class CLUCENE_INLINE_EXPORT Int32 + { + public: + bool operator()( const int32_t val1, const int32_t val2 ) const; + }; + +- class CLUCENE_INLINE_EXPORT Char:public CL_NS_STD(binary_function)<const char*,const char*,bool> ++ class CLUCENE_INLINE_EXPORT Char + { + public: + bool operator()( const char* val1, const char* val2 ) const; + }; + #ifdef _UCS2 +- class CLUCENE_INLINE_EXPORT WChar: public CL_NS_STD(binary_function)<const wchar_t*,const wchar_t*,bool> ++ class CLUCENE_INLINE_EXPORT WChar + { + public: + bool operator()( const wchar_t* val1, const wchar_t* val2 ) const; +@@ -48,7 +48,7 @@ + + + template<typename _cl> +- class CLUCENE_INLINE_EXPORT Void:public CL_NS_STD(binary_function)<const void*,const void*,bool> ++ class CLUCENE_INLINE_EXPORT Void + { + public: + bool operator()( _cl* val1, _cl* val2 ) const{ |