office-gobmx/external/boost/boost.between.warning.patch

22 lines
863 B
Diff
Raw Normal View History

diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
Upgrade external/boost to latest Boost 1.80.0 <https://dev-www.libreoffice.org/src/boost_1_80_0.tar.xz> has been generated (on Fedora 36) with > $ wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2 > $ printf '1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0 boost_1_80_0.tar.bz2' | sha256sum -c # cf. <https://www.boost.org/users/history/version_1_80_0.html> > boost_1_80_0.tar.bz2: OK > $ external/boost/repack_tarball.sh boost_1_80_0.tar.bz2 > Unpacking boost_1_80_0.tar.bz2 ... > Removing unnecessary files ... > Creating boost_1_80_0.tar.xz ... > Cleaning up ... > 322e567e98c466c0aa0e380ed8c647552fe4af48998648428f1b5f0c8eff4666 boost_1_80_0.tar.xz > Done. * In StaticLibrary_boost_filesystem, <https://github.com/boostorg/filesystem/commit/36cf9aaf816a39dce3d32e2bfe09e214d7f3ab64> "Updated protection of remove_all against CVE-2022-21658 on POSIX" had introduced uses of certain POSIX *at functions (like utimensat) conditionally on some new BOOST_FILESYSTEM_HAS_POSIX_AT_APIS, to be discovered by workdir/UnpackedTarball/boost/libs/filesystem/CMakeLists.txt which we don't run. At least AT_NO_AUTOMOUNT, as used in workdir/UnpackedTarball/boost/libs/filesystem/src/operations.cpp, appears to be unavailable on the macOS baseline, but otherwise assume that all that POSIX functionality is available on all other non-Windows baselines and hardcode that in external/boost/StaticLibrary_boost_filesystem.mk. (If it turns out that we need to exclude some more platforms there, we /might/ need to backport <https://github.com/boostorg/filesystem/commit/5864f397ccad30f6e73221b90bdac57a303b9752> "Fixed a missing include on POSIX systems that don't support *at APIs" from the develop branch towards Boost 1.81.) * In StaticLibrary_boost_locale, <https://github.com/boostorg/locale/commit/41868c62a0519799696b544518f1efd831ff71c2> "Support systems without implicit include path" had moved source files around (and then would have failed with > workdir/UnpackedTarball/boost/libs/locale/src/boost/locale/shared/mo_lambda.cpp:7:10: fatal error: 'boost/locale/shared/mo_lambda.hpp' file not found > #include "boost/locale/shared/mo_lambda.hpp" > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ etc. without the additional -I option). * Some Clang builds would have started to fail with > In file included from desktop/qa/unit/desktop-lok-init.cxx:19: > In file included from desktop/inc/lib/init.hxx:20: > In file included from workdir/UnpackedTarball/boost/boost/container/flat_map.hpp:26: > workdir/UnpackedTarball/boost/boost/container/new_allocator.hpp:168:12: error: '__cpp_sized_deallocation' is not defined, evaluates to 0 [-Werror,-Wundef] > # if __cpp_sized_deallocation > ^ so add another external/boost/include/ wrapper. Change-Id: I5e53f7ddab07eadba9bdf653acad571f50517b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138511 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-19 03:17:24 -05:00
+++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
@@ -8,6 +8,7 @@
#include <boost/locale/hold_ptr.hpp>
#include <memory>
#include <string>
+#include <string.h>
#include "boost/locale/encoding/conv.hpp"
#if BOOST_LOCALE_USE_WIN32_API
@@ -58,6 +58,9 @@
Upgrade external/boost to latest Boost 1.81.0 <https://dev-www.libreoffice.org/src/boost_1_81_0.tar.xz> has been generated (on Fedora 37) with > $ wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2 > $ printf '71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa boost_1_81_0.tar.bz2' | sha256sum -c # cf. <https://www.boost.org/users/history/version_1_81_0.html> > boost_1_81_0.tar.bz2: OK > $ external/boost/repack_tarball.sh boost_1_81_0.tar.bz2 > Unpacking boost_1_81_0.tar.bz2 ... > Removing unnecessary files ... > Creating boost_1_81_0.tar.xz ... > Cleaning up ... > 1deb0a5a9e33a6626fcaa1d2efd4c0e74ca2b0eea87c1559e3917f3066b633d6 boost_1_81_0.tar.xz > Done. * external/boost/windows-no-utf8-locales.patch.0, introduced with f046fed2782f0d4244aff719ba70a56399a2583a "Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows", was presumably obsoleted by <https://github.com/boostorg/locale/commit/f45adfc9b963feacc827c3754e2549dd0cffaecb> "Use UTF-16 <-> UTF-8 codecvt on Windows". * external/boost/libc++.patch.0 was obsoleted by <https://github.com/boostorg/config/commit/f0af4a9184457939b89110795ae2d293582c5f66> "The std lib unary/binary_function base classes are deprecated/removed from libcpp15." * external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 was obsoleted by <https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a> "Change mpl::integral_c to boost::integral_constant to avoid Clang 16 errors when constructing out of range enums (refs #24, boostorg/mpl#69)". * external/boost/0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2 is needed to e.g. avoid > ./.libs/libetonyek_internal.a(libetonyek_internal_la-KEY1DivElement.o):(.bss+0x3e): multiple definition of `boost::phoenix::placeholders::uarg1'; ./.libs/libetonyek_internal.a(libetonyek_internal_la-IWORKFormula.o):(.bss+0x3e): first defined here etc. while building ExternalProject_libetonyek, caused by <https://github.com/boostorg/phoenix/commit/8b6a9c26c115bc2cefea300b5c0abf7edf6dd9b7> "std::tuple support (Resolving #103) (#104)". Change-Id: I48773166d0c50f2850d8bb37fa6215d9e5c0d51d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145044 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-01-04 10:57:45 -06:00
return cvt->convert(begin, end);
#endif
#endif
+ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
+ if (to_charset && from_charset && !strcmp(to_charset, from_charset))
+ return std::string(begin, end - begin);
throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
}