[grilo/master.msvc: 6/13] grl-definitions.h: Add _GRL_EXTERN
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/master.msvc: 6/13] grl-definitions.h: Add _GRL_EXTERN
- Date: Wed, 22 Apr 2020 07:00:28 +0000 (UTC)
commit 1b2e54438d08c8b2df532545e0c4ed10c22174c7
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Apr 22 14:30:45 2020 +0800
grl-definitions.h: Add _GRL_EXTERN
This macro can be used to export and import symbols where necessary, on
compilers that do not support autoexporting mechanisms. The
__declspec(dllimport) usage is required for variables that need to be accessed
from the DLL.
src/grl-definitions.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/grl-definitions.h b/src/grl-definitions.h
index 7ca2899..afc51d6 100644
--- a/src/grl-definitions.h
+++ b/src/grl-definitions.h
@@ -42,4 +42,16 @@
remain to be sent */
#define GRL_SOURCE_REMAINING_UNKNOWN -1
+#ifndef _GRL_EXTERN
+# if defined (G_OS_WIN32) && !defined (GRL_STATIC)
+# ifdef GRILO_COMPILATION
+# define _GRL_EXTERN __declspec(dllexport) extern
+# else
+# define _GRL_EXTERN __declspec(dllimport) extern
+# endif
+# else
+# define _GRL_EXTERN extern
+# endif
+#endif
+
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]