Hi, On Wed, May 31, 2017 at 11:27:16AM +0200, Stephan Bergmann <sberg...@redhat.com> wrote: > So after the recent bump to macOS 10.9, HAVE_THREADSAFE_STATICS should > effectively be true everywhere expect on Android (where configure.ac doesn't > bother at all to decide whether or not it would be true, always leaving it > false; either because it is known to be false for the current Android > baseline, or because those setting up Android support didn't bother). > > Can somebody clarify the actual situation on Android?
As far as I can see it's the "because those setting up Android support didn't bother" case. The attached patch does not break opening Writer documents for me, so I guess it's safe to turn that "always false" to "always true", as it happens on macOS. Regards, Miklos
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index c8755a246d39..d35acdebe197 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -40,6 +40,7 @@ #include <ndindex.hxx> #include <accessibilityoptions.hxx> #include <calbck.hxx> +#include <pthread.h> void SwViewShell::Init( const SwViewOption *pNewOpt ) { @@ -138,6 +139,18 @@ void SwViewShell::Init( const SwViewOption *pNewOpt ) } } +int h() { return 0; } +void * g(void * /*unused*/) { + static int n = h(); + return &n; +} +int f() { + pthread_t t; + pthread_create(&t, 0, g, 0); + pthread_join(t, 0); + return 0; +} + /// CTor for the first Shell. SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow, const SwViewOption *pNewOpt, OutputDevice *pOutput, @@ -166,6 +179,10 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow, mpPrePostOutDev(nullptr), maPrePostMapMode() { + SAL_DEBUG("SwViewShell ctor, before test"); + static int n = f(); + (void)n; + SAL_DEBUG("SwViewShell ctor, after test"); // in order to suppress event handling in // <SwDrawContact::Changed> during construction of <SwViewShell> instance mbInConstructor = true;
signature.asc
Description: Digital signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice