mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Use __has_declspec_attribute to determine support
This commit is contained in:
parent
533843e354
commit
228ee3c269
@ -27,6 +27,14 @@
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#ifndef __has_declspec_attribute
|
||||
#if defined(_WIN32)
|
||||
#define __has_declspec_attribute(x) 1
|
||||
#else
|
||||
#define __has_declspec_attribute(x) 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__GNUC_MINOR__)
|
||||
#define BROTLI_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
||||
#else
|
||||
@ -47,7 +55,7 @@
|
||||
#define BROTLI_MODERN_COMPILER 0
|
||||
#endif
|
||||
|
||||
#if defined(BROTLI_SHARED_COMPILATION) && defined(_WIN32)
|
||||
#if defined(BROTLI_SHARED_COMPILATION) && (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport))
|
||||
#if defined(BROTLICOMMON_SHARED_COMPILATION)
|
||||
#define BROTLI_COMMON_API __declspec(dllexport)
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user