Skip to content

Commit 918ddcd

Browse files
committed
Use always POSIX API under Cygwin, even if _WIN32 was defined by previous includes.
1 parent a9c528c commit 918ddcd

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

include/boost/interprocess/detail/win32_api.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
#include <string>
3232
#include <vector>
3333

34-
#ifdef BOOST_USE_WINDOWS_H
35-
#include <windows.h>
36-
#endif
37-
3834
#if defined(_MSC_VER)
3935
# pragma once
4036
# pragma comment( lib, "Advapi32.lib" )
@@ -43,6 +39,9 @@
4339
#endif
4440

4541
#if defined (BOOST_INTERPROCESS_WINDOWS)
42+
# ifdef BOOST_USE_WINDOWS_H
43+
# include <windows.h>
44+
# endif
4645
# include <cstdarg>
4746
# include <boost/detail/interlocked.hpp>
4847
#else

include/boost/interprocess/detail/workaround.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
//#define BOOST_INTERPROCESS_FORCE_NATIVE_EMULATION
2727

28-
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
28+
#if !defined(__CYGWIN__) && (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
2929
#define BOOST_INTERPROCESS_WINDOWS
3030
#if !defined(BOOST_INTERPROCESS_FORCE_NATIVE_EMULATION) && !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION)
3131
#define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION

0 commit comments

Comments
 (0)