From f074c54f0217028c9244c0d7da2d90625498d3d6 Mon Sep 17 00:00:00 2001 From: Matthew Seaman Date: Sun, 4 Feb 2018 09:16:23 +0000 Subject: Patches to make the code compatible with clang-6.0 / C++17 -- this will fix the build on FreeBSD 12.0 - delete the 'register' keyword everywhere - Add whitespace between adjacent quoted strings - Update the offsetof() macro to cast the result to int Reported by: pkg-fallout --- textproc/sphinxsearch/files/patch-src_sphinxaot.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 textproc/sphinxsearch/files/patch-src_sphinxaot.cpp (limited to 'textproc/sphinxsearch/files/patch-src_sphinxaot.cpp') diff --git a/textproc/sphinxsearch/files/patch-src_sphinxaot.cpp b/textproc/sphinxsearch/files/patch-src_sphinxaot.cpp new file mode 100644 index 000000000000..8688e447a034 --- /dev/null +++ b/textproc/sphinxsearch/files/patch-src_sphinxaot.cpp @@ -0,0 +1,11 @@ +--- src/sphinxaot.cpp.orig 2018-02-03 10:35:17 UTC ++++ src/sphinxaot.cpp +@@ -1133,7 +1133,7 @@ static inline int Utf8ToWin1251 ( BYTE * pOut, const B + assert ( pWord[1]>=0x80 && pWord[1]<0xC0 ); + + // table index D0 80..BF to 0..3F, and D1 80..BF to 40..7F +- register BYTE uWin = dTable [ ( pWord[1] & 0x7F ) + ( ( pWord[0] & 1 )<<6 ) ]; ++ BYTE uWin = dTable [ ( pWord[1] & 0x7F ) + ( ( pWord[0] & 1 )<<6 ) ]; + pWord += 2; + + if ( !uWin ) -- cgit v1.2.3