diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-08-17 01:02:11 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-08-17 18:16:10 +0300 |
commit | fb83fd9d22e07f8a12e5f54eea60440123125717 (patch) | |
tree | a8a59a1c3f33a5192d4625152a2d8529eb0e1ed0 /vcl/headless/svpinst.cxx | |
parent | f07b8e63fde24c04e0f496c356319440e03b4741 (diff) |
Massage ifdefs etc for iOS to avoid undefineds
I think it's best to not use cairo on iOS, even if we do use it on
Android. We probably want to use native APIs for the functionality
that cairo would provide. Just like we do on OS X.
No idea whether the resulting TiledLibreOffice will still work like it
used to in May last year, when I last tried.
Change-Id: Ie15cad6918d7a66e2aff7faabfcade7f3246b060
Diffstat (limited to 'vcl/headless/svpinst.cxx')
-rw-r--r-- | vcl/headless/svpinst.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index d5caadeefcaf..77b9ba580321 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -62,7 +62,7 @@ bool SvpSalInstance::isFrameAlive( const SalFrame* pFrame ) const SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr; -#ifndef ANDROID +#if !defined(ANDROID) && !defined(IOS) static void atfork_child() { @@ -82,11 +82,13 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) : m_aTimeout.tv_usec = 0; m_nTimeoutMS = 0; +#ifndef IOS m_pTimeoutFDS[0] = m_pTimeoutFDS[1] = -1; CreateWakeupPipe(true); +#endif if( s_pDefaultInstance == nullptr ) s_pDefaultInstance = this; -#ifndef ANDROID +#if !defined(ANDROID) && !defined(IOS) pthread_atfork(nullptr, nullptr, atfork_child); #endif } @@ -95,10 +97,13 @@ SvpSalInstance::~SvpSalInstance() { if( s_pDefaultInstance == this ) s_pDefaultInstance = nullptr; - +#ifndef IOS CloseWakeupPipe(true); +#endif } +#ifndef IOS + void SvpSalInstance::CloseWakeupPipe(bool log) { if (m_pTimeoutFDS[0] != -1) @@ -158,6 +163,8 @@ void SvpSalInstance::CreateWakeupPipe(bool log) } } +#endif + void SvpSalInstance::PostEvent(const SalFrame* pFrame, ImplSVEvent* pData, SalEvent nEvent) { { @@ -206,7 +213,9 @@ void SvpSalInstance::deregisterFrame( SalFrame* pFrame ) void SvpSalInstance::Wakeup() { +#ifndef IOS OSL_VERIFY(write (m_pTimeoutFDS[1], "", 1) == 1); +#endif } bool SvpSalInstance::CheckTimeout( bool bExecuteTimers ) |