From ed99c63070a3cbb49107006cc352dba0291b9d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 10 Oct 2014 20:34:17 -0400 Subject: [PATCH] winpr: fix DECLSPEC_EXPORT on Windows --- winpr/include/winpr/spec.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/winpr/include/winpr/spec.h b/winpr/include/winpr/spec.h index 9dbf394db..bd97220a2 100644 --- a/winpr/include/winpr/spec.h +++ b/winpr/include/winpr/spec.h @@ -73,24 +73,6 @@ #endif #endif -#if defined(_WIN32) || defined(__CYGWIN__) - #ifdef __GNUC__ - #define DECLSPEC_EXPORT __attribute__((dllexport)) - #define DECLSPEC_IMPORT __attribute__((dllimport)) - #else - #define DECLSPEC_EXPORT __declspec(dllexport) - #define DECLSPEC_IMPORT __declspec(dllimport) - #endif -#else - #if defined(__GNUC__) && __GNUC__ >= 4 - #define DECLSPEC_EXPORT __attribute__ ((visibility("default"))) - #define DECLSPEC_IMPORT - #else - #define DECLSPEC_EXPORT - #define DECLSPEC_IMPORT - #endif -#endif - #ifndef DECLSPEC_NORETURN #if (defined(__GNUC__) || defined(_MSC_VER) || defined(__clang__)) #define DECLSPEC_NORETURN __declspec(noreturn) @@ -971,5 +953,23 @@ char (*__countof_helper(_CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; #endif +#if defined(_WIN32) || defined(__CYGWIN__) + #ifdef __GNUC__ + #define DECLSPEC_EXPORT __attribute__((dllexport)) + #define DECLSPEC_IMPORT __attribute__((dllimport)) + #else + #define DECLSPEC_EXPORT __declspec(dllexport) + #define DECLSPEC_IMPORT __declspec(dllimport) + #endif +#else + #if defined(__GNUC__) && __GNUC__ >= 4 + #define DECLSPEC_EXPORT __attribute__ ((visibility("default"))) + #define DECLSPEC_IMPORT + #else + #define DECLSPEC_EXPORT + #define DECLSPEC_IMPORT + #endif +#endif + #endif /* WINPR_SPEC_H */