[Interprocess] WIN32 define case unaccessible ?
Hello, I'm using Boost.Interprocess in order to get a single portable source code between Windows and Linux using Mutexes and Shared Memory. Documentation says that, for Windows, the API default behaviour is emulation with mapped files, which is the case (:D). Though, having a look at interprocess' headers, i encountrered this case : from D:\Libraries\boost\boost_1_51\boost\interprocess\sync\named_mutex.hpp : ____________________________________________________________________________ #if defined(BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES) #include <boost/interprocess/sync/posix/named_mutex.hpp> #define BOOST_INTERPROCESS_USE_POSIX_SEMAPHORES #elif !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_WINDOWS) #include <boost/interprocess/sync/windows/named_mutex.hpp> #define BOOST_INTERPROCESS_USE_WINDOWS #else #include <boost/interprocess/sync/shm/named_mutex.hpp> #endif ____________________________________________________________________________ A case where BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION is not defined and BOOST_INTERPROCESS_WINDOWS is, meaning that i can use Windows standard API. My problem is that i want to use this case and i wonder how to reach it. The former file includes boost/interprocess/detail/workaround.hpp where both symbols are defined : ____________________________________________________________________________ #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define BOOST_INTERPROCESS_WINDOWS #define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION #define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME ____________________________________________________________________________ and i can't see an #undef anywhere to get into the case i want. Thanks in advance, Antoine
El 09/02/2013 18:07, Antoine Pédron escribió: ____________________________________________________________________________
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define BOOST_INTERPROCESS_WINDOWS #define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION #define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME ____________________________________________________________________________
and i can't see an #undef anywhere to get into the case i want.
You can't because it's highly experimental and not supported right now. If you want to test it, you'll need to modify this header commenting out #define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION Best, Ion
participants (2)
-
Antoine Pédron
-
Ion Gaztañaga