From b9a0b1b479b46cf273050f643514cd80c36db48f Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Mon, 3 Mar 2008 21:49:02 -0500 Subject: [PATCH] winnt.h: Fix dllimport and visibility attributes on cygwin. --- include/winnt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/winnt.h b/include/winnt.h index cfd1cac0567..78c44a57b8e 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -46,7 +46,7 @@ extern "C" { #ifndef MIDL_PASS # if defined(_MSC_VER) # define DECLSPEC_IMPORT __declspec(dllimport) -# elif defined(__MINGW32__) +# elif defined(__MINGW32__) || defined(__CYGWIN__) # define DECLSPEC_IMPORT __attribute__((dllimport)) # else # define DECLSPEC_IMPORT DECLSPEC_HIDDEN @@ -154,7 +154,9 @@ extern "C" { # define DECLSPEC_EXPORT #endif -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) +#if defined(__MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) +# define DECLSPEC_HIDDEN +#elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) # define DECLSPEC_HIDDEN __attribute__((visibility ("hidden"))) #else # define DECLSPEC_HIDDEN -- 2.11.4.GIT