123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- //////////////////////////////////////////////////////////////////////////////
- //
- // (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
- // Software License, Version 1.0. (See accompanying file
- // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- //
- // See http://www.boost.org/libs/interprocess for documentation.
- //
- //////////////////////////////////////////////////////////////////////////////
- //
-
-
-
-
-
-
- //////////////////////////////////////////////////////
- //Check for XSI shared memory objects. They are available in nearly all UNIX platforms
- //////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////
- // From SUSv3/UNIX 98, pthread_mutexattr_settype is mandatory
- //////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////
- // _POSIX_THREAD_PROCESS_SHARED (POSIX.1b/POSIX.4)
- //////////////////////////////////////////////////////
-
- //Cygwin defines _POSIX_THREAD_PROCESS_SHARED but does not implement it.
-
-
-
- //The pthreads implementation of darwin stores a pointer to a mutex inside the condition
- //structure so real sharing between processes is broken. See:
- //https://opensource.apple.com/source/libpthread/libpthread-301.30.1/src/pthread_cond.c.auto.html
- //in method pthread_cond_wait
-
-
- //If buggy _POSIX_THREAD_PROCESS_SHARED is detected avoid using it
-
-
-
-
-
-
- //////////////////////////////////////////////////////
- // _POSIX_SHARED_MEMORY_OBJECTS (POSIX.1b/POSIX.4)
- //////////////////////////////////////////////////////
-
- (defined(__vms) && __CRTL_VER >= 70200000)
-
- //Some systems have filesystem-based resources, so the
- //portable "/shmname" format does not work due to permission issues
- //For those systems we need to form a path to a temporary directory:
- // hp-ux tru64 vms freebsd
-
-
- //Some systems have "jailed" environments where shm usage is restricted at runtime
- //and temporary file based shm is possible in those executions.
-
-
-
-
- //////////////////////////////////////////////////////
- // _POSIX_MAPPED_FILES (POSIX.1b/POSIX.4)
- //////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////
- // _POSIX_SEMAPHORES (POSIX.1b/POSIX.4)
- //////////////////////////////////////////////////////
-
- ( defined(__FreeBSD__) && (__FreeBSD__ >= 4)) || \
- defined(__APPLE__)
-
- //MacOsX declares _POSIX_SEMAPHORES but sem_init returns ENOSYS
-
-
-
-
-
-
-
- //////////////////////////////////////////////////////
- // _POSIX_BARRIERS (SUSv3/Unix03)
- //////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////
- // _POSIX_TIMEOUTS (SUSv3/Unix03)
- //////////////////////////////////////////////////////
-
-
-
- //////////////////////////////////////////////////////
- // Detect BSD derivatives to detect sysctl
- //////////////////////////////////////////////////////
-
-
- //Some *BSD systems (OpenBSD & NetBSD) need sys/param.h before sys/sysctl.h, whereas
- //others (FreeBSD & Darwin) need sys/types.h
-
-
-
-
- //
-
-
- //////////////////////////////////////////////////////
- //64 bit offset
- //////////////////////////////////////////////////////
-
- (defined (_V6_LP64_OFF64) &&(_V6_LP64_OFF64 - 0 > 0)) ||\
- (defined (_V6_LPBIG_OFFBIG) &&(_V6_LPBIG_OFFBIG - 0 > 0)) ||\
- (defined (_XBS5_ILP32_OFFBIG)&&(_XBS5_ILP32_OFFBIG - 0 > 0)) ||\
- (defined (_XBS5_LP64_OFF64) &&(_XBS5_LP64_OFF64 - 0 > 0)) ||\
- (defined (_XBS5_LPBIG_OFFBIG)&&(_XBS5_LPBIG_OFFBIG - 0 > 0)) ||\
- (defined (_FILE_OFFSET_BITS) &&(_FILE_OFFSET_BITS - 0 >= 64))||\
- (defined (_FILE_OFFSET_BITS) &&(_FILE_OFFSET_BITS - 0 >= 64))
-
-
- //////////////////////////////////////////////////////
- //posix_fallocate
- //////////////////////////////////////////////////////
-
-
-
- //Now declare some Boost.Interprocess features depending on the implementation
-
-
-
- // Timeout duration use if BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING is set
-
- //Other switches
- //BOOST_INTERPROCESS_MSG_QUEUE_USES_CIRC_INDEX
- //message queue uses a circular queue as index instead of an array (better performance)
- //Boost version < 1.52 uses an array, so undef this if you want to communicate
- //with processes compiled with those versions.
- //Macros for documentation purposes. For code, expands to the argument
- //
-
-
- //"__forceinline" and MSVC seems to have some bugs in debug mode
-
- //Older GCCs have problems with forceinline
-
-
-
- _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
-
-
- __pragma(warning(disable : 4996))
-
|