Skip to content

Commit

Permalink
Adapt jurt staticsalhack to MACOSX
Browse files Browse the repository at this point in the history
Change-Id: I0525b68cdb097edd3241809ae0dc9c22e1ad9814
  • Loading branch information
stbergmann committed Nov 7, 2016
1 parent 9ec4c4a commit 4e3e87e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jurt/Library_jpipe.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ $(eval $(call gb_Library_use_externals,jpipe, \
boost_headers \
))

ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_use_system_darwin_frameworks,jpipe, \
CoreFoundation \
))
endif

$(eval $(call gb_Library_add_libs,jpipe, \
$(if $(filter-out $(OS),ANDROID),-lpthread) \
))
Expand Down
19 changes: 19 additions & 0 deletions jurt/source/pipe/staticsalhack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#undef SAL_LOG_INFO
#undef SAL_LOG_WARN

#include <sal/config.h>

#include <cstdlib>

#include <sal/rtl/string.cxx>
#include <sal/rtl/ustring.cxx>

Expand Down Expand Up @@ -57,4 +61,19 @@
#include <sal/textenc/textenc.cxx>
#include <sal/textenc/unichars.cxx>

#if defined MACOSX
#include <sal/osl/unx/osxlocale.cxx>
#include <sal/osl/unx/system.cxx>
#endif

// Called from FullTextEncodingData::get in sal/textenc/textenc.cxx, but only
// defined for ANDROID (in ANDROID-specific sal/textenc/tables.cxx); would even
// work to leave it undefined for LINUX due to no '-z defs' under -fsanitize=*
// (solenv/gbuild/platform/linux.mk), but not for MACOSX:
extern "C" ImplTextEncodingData const * sal_getFullTextEncodingData(
rtl_TextEncoding)
{
std::abort();
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

0 comments on commit 4e3e87e

Please sign in to comment.