summaryrefslogtreecommitdiff
path: root/libca-certificates-curl/libca-certificates-curl/export.h
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-01-18 22:19:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-22 15:46:09 +0300
commit004bb71d88ed54eb4d540d14491bf86256a952fd (patch)
treeb381d80f22682e29651370701d798a2e3dfebccc /libca-certificates-curl/libca-certificates-curl/export.h
parent66e25bf08b493258642cb844b987fd96afa39c7b (diff)
Add implementation
Diffstat (limited to 'libca-certificates-curl/libca-certificates-curl/export.h')
-rw-r--r--libca-certificates-curl/libca-certificates-curl/export.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libca-certificates-curl/libca-certificates-curl/export.h b/libca-certificates-curl/libca-certificates-curl/export.h
new file mode 100644
index 0000000..ec2f0a1
--- /dev/null
+++ b/libca-certificates-curl/libca-certificates-curl/export.h
@@ -0,0 +1,31 @@
+/* file : libca-certificates-curl/export.h -*- C -*-
+ * copyright : Copyright (c) 2018-2019 Code Synthesis Ltd
+ * license : Mozilla Public License 2.0; see accompanying LICENSE file
+ */
+
+#pragma once
+
+#if defined(LIBCA_CERTIFICATES_CURL_STATIC) // Using static.
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT
+#elif defined(LIBCA_CERTIFICATES_CURL_STATIC_BUILD) // Building static.
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT
+#elif defined(LIBCA_CERTIFICATES_CURL_SHARED) // Using shared.
+# ifdef _WIN32
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT __declspec(dllimport)
+# else
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT
+# endif
+#elif defined(LIBCA_CERTIFICATES_CURL_SHARED_BUILD) // Building shared.
+# ifdef _WIN32
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT __declspec(dllexport)
+# else
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT
+# endif
+#else
+// If none of the above macros are defined, then we assume we are being used
+// by some third-party build system that cannot/doesn't signal the library
+// type. Note that this fallback works for both static and shared but in case
+// of shared will be sub-optimal compared to having dllimport.
+//
+# define LIBCA_CERTIFICATES_CURL_SYMEXPORT // Using static or shared.
+#endif