aboutsummaryrefslogtreecommitdiff
path: root/contrib/native/client/src/include/drill/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/native/client/src/include/drill/common.hpp')
-rw-r--r--contrib/native/client/src/include/drill/common.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/native/client/src/include/drill/common.hpp b/contrib/native/client/src/include/drill/common.hpp
index a617dc71f..6d3816e7c 100644
--- a/contrib/native/client/src/include/drill/common.hpp
+++ b/contrib/native/client/src/include/drill/common.hpp
@@ -20,6 +20,24 @@
#ifndef _COMMON_H_
#define _COMMON_H_
+#if defined _WIN32 || defined __CYGWIN__
+ #ifdef DRILL_CLIENT_EXPORTS
+ #define DECLSPEC_DRILL_CLIENT __declspec(dllexport)
+ #else
+ #ifdef USE_STATIC_LIBDRILL
+ #define DECLSPEC_DRILL_CLIENT
+ #else
+ #define DECLSPEC_DRILL_CLIENT __declspec(dllimport)
+ #endif
+ #endif
+#else
+ #if __GNUC__ >= 4
+ #define DECLSPEC_DRILL_CLIENT __attribute__ ((visibility ("default")))
+ #else
+ #define DECLSPEC_DRILL_CLIENT
+ #endif
+#endif
+
#ifdef _WIN32
// The order of inclusion is important. Including winsock2 before everything else
// ensures that the correct typedefs are defined and that the older typedefs defined