diff --git a/include/boost/interprocess/detail/workaround.hpp b/include/boost/interprocess/detail/workaround.hpp index e6793e8..02528ce 100644 --- a/include/boost/interprocess/detail/workaround.hpp +++ b/include/boost/interprocess/detail/workaround.hpp @@ -34,6 +34,10 @@ #else #include + #if defined (__CYGWIN__) && (!defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE < 200112L)) + #error "Error: Compiling on Cygwin without POSIX is not supported. Please define _XOPEN_SOURCE >= 600 or _POSIX_C_SOURCE >= 200112 when compiling" + #endif + ////////////////////////////////////////////////////// //Check for XSI shared memory objects. They are available in nearly all UNIX platforms ////////////////////////////////////////////////////// diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9b530a6..d22a419 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -25,7 +25,7 @@ project : requirements hpux,gcc:"-Wl,+as,mpas" windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" linux:"-lrt" - #cygwin with -std=c++XX does not include POSIX + #cygwin with -std=c++XX does not include POSIX features, so always request them cygwin:_XOPEN_SOURCE=600 ;