mirror of
https://github.com/boostorg/system.git
synced 2025-08-02 13:54:28 +02:00
Fix <winerror.h> include in error_code_test on cygwin/mingw
This commit is contained in:
@@ -31,7 +31,13 @@
|
|||||||
using namespace boost::system;
|
using namespace boost::system;
|
||||||
|
|
||||||
#if defined( BOOST_WINDOWS_API )
|
#if defined( BOOST_WINDOWS_API )
|
||||||
# include "winerror.h"
|
// Neither MinGW or Cygwin versions of winerror.h work if used alone, so on
|
||||||
|
// either of those platforms include the full windows.h
|
||||||
|
# if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||||
|
# include <windows.h>
|
||||||
|
# else
|
||||||
|
# include <winerror.h>
|
||||||
|
# endif
|
||||||
# define BOOST_ACCESS_ERROR_MACRO ERROR_ACCESS_DENIED
|
# define BOOST_ACCESS_ERROR_MACRO ERROR_ACCESS_DENIED
|
||||||
#elif defined( BOOST_POSIX_API )
|
#elif defined( BOOST_POSIX_API )
|
||||||
# define BOOST_ACCESS_ERROR_MACRO EACCES
|
# define BOOST_ACCESS_ERROR_MACRO EACCES
|
||||||
|
Reference in New Issue
Block a user