Define PUBLIC to dllexport on MSVC.

Define PUBLIC to __declspec(dllexport) when _MVC_VER is defined.
This commit is contained in:
Chia-I Wu 2010-05-31 11:15:06 +08:00
parent 14f1157a2e
commit ba26631d0d
3 changed files with 12 additions and 6 deletions

View file

@ -62,10 +62,14 @@
/**
* Function visibility
*/
#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
#else
# define PUBLIC
#ifndef PUBLIC
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# elif defined(_MSC_VER)
# define PUBLIC __declspec(dllexport)
# else
# define PUBLIC
# endif
#endif
/**

View file

@ -102,6 +102,8 @@ typedef unsigned char boolean;
#ifndef PUBLIC
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# elif defined(_MSC_VER)
# define PUBLIC __declspec(dllexport)
# else
# define PUBLIC
# endif

View file

@ -28,10 +28,10 @@
#ifndef PUBLIC
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# define HIDDEN __attribute__((visibility("hidden")))
# elif defined(_MSC_VER)
# define PUBLIC __declspec(dllexport)
# else
# define PUBLIC
# define HIDDEN
# endif
#endif