summaryrefslogtreecommitdiffstats
path: root/googleurl
diff options
context:
space:
mode:
Diffstat (limited to 'googleurl')
-rw-r--r--googleurl/src/url_common.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/googleurl/src/url_common.h b/googleurl/src/url_common.h
index 7e7e27a..684555d 100644
--- a/googleurl/src/url_common.h
+++ b/googleurl/src/url_common.h
@@ -34,15 +34,20 @@
#define GURL_IMPLEMENTATION 0
#endif
-#if defined(WIN32) && defined(GURL_DLL)
+#if defined(GURL_DLL)
+#if defined(WIN32)
#if GURL_IMPLEMENTATION
#define GURL_API __declspec(dllexport)
#else
#define GURL_API __declspec(dllimport)
#endif
#else
+// Non-Windows DLLs.
+#define GURL_API __attribute__((visibility("default")))
+#endif
+#else
+// Not a DLL.
#define GURL_API
#endif
#endif // GOOGLEURL_SRC_URL_COMMON_H__
-