[KDE/Mac] kshareddatacache_p.h forcibly avoids defining KSDC_THREAD_PROCESS_SHARED_SUPPORTED
iandw.au at gmail.com
Thu Jan 8 21:52:04 UTC 2015
On 09/01/2015, at 1:00 AM, René J.V. Bertin wrote:
> A remark about OS X not providing posix_fallocate led me to browse kshareddatacache_p.h (because posix_fallocate can be emulated), and therein I noticed
> #if defined(_POSIX_THREAD_PROCESS_SHARED) && ((_POSIX_THREAD_PROCESS_SHARED == 0) || (_POSIX_THREAD_PROCESS_SHARED >= 200112L)) && !defined(__APPLE__)
> #include <pthread.h>
> #define KSDC_THREAD_PROCESS_SHARED_SUPPORTED 1
> which surprises me because even is OS X doesn't have timed mutex locking, it does have standard pthread mutexes.
> Deactivating this when __APPLE__ is defined is not among the MacPorts patches, so where does it come from? Has anyone tested behaviour on OS X *with* KSDC_THREAD_PROCESS_SHARED_SUPPORTED defined?
Hmmmm, a blast from the past?… :-)
One of first KDE libs bugs I noticed on Apple OS X was:
KSharedDataCache not working on Apple OS X 10.7.4 (Lion)
Michael Pyne (KSharedDataCache author) was very helpful, but
of course he did not have a Mac to test on and I did not have the
ability back then to build test versions of kdelibs. It bubbled along
for a year or two and then the bug stopped happening in mid-2014,
so we closed the Bugzilla report. Mysterious.
Re your issue, René, there is just the one use of that POSIX macro in KDE:
Also see the following pages on KDE's repository browser:
The "&& !defined(__APPLE__)" string was added on 2011-07-31,
a year or so before my bug report (see above), which answers your
question about where it comes from, but it cannot be what fixed the bug...
Cheers, Ian W.
More information about the kde-mac