diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-04-22 14:30:45 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-04-22 14:30:45 +0800 |
commit | 1b2e54438d08c8b2df532545e0c4ed10c22174c7 (patch) | |
tree | e1856917482e7f777ae65e83e2185d6f38823be1 | |
parent | 681238f60b36fc5a8580b7d6f6ca17135fc88643 (diff) | |
download | grilo-1b2e54438d08c8b2df532545e0c4ed10c22174c7.tar.gz |
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.
-rw-r--r-- | src/grl-definitions.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |