Explicitly export libuv symbols if gcc >= 4.

Only export symbols that are part of the libuv API, hide everything else.

Prevents symbol clashes in applications and libraries that depend on libuv and
speeds up link times to boot.
This commit is contained in:
Ben Noordhuis 2012-02-06 16:44:57 +01:00
parent 65bbf02dc5
commit e53302fcea

View File

@ -41,8 +41,9 @@ extern "C" {
# define UV_EXTERN /* nothing */
# define CARES_STATICLIB 1
# endif
#elif __GNUC__ >= 4
# define UV_EXTERN __attribute__((visibility("default")))
#else
/* Unix. TODO: symbol hiding */
# define UV_EXTERN /* nothing */
#endif