From 1c2c168c6641023edce3f0f55e4d2fe8ee788958 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 9 Jul 2009 17:36:29 +0500 Subject: [PATCH] This patch pretends to fix run-time symbols clash on Solaris: - when finding out a way to hide symbols, make decision basing on compiler, not operating system. - Sun Studio supports __hidden declaration specifier for this purpose. --- storage/innodb_plugin/include/univ.i | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/storage/innodb_plugin/include/univ.i b/storage/innodb_plugin/include/univ.i index 05f719a81de..4b8277d93ee 100644 --- a/storage/innodb_plugin/include/univ.i +++ b/storage/innodb_plugin/include/univ.i @@ -236,10 +236,12 @@ by one. */ /* Linkage specifier for non-static InnoDB symbols (variables and functions) that are only referenced from within InnoDB, not from MySQL */ -#ifdef __WIN__ -# define UNIV_INTERN -#else +#if defined(__GNUC__) && (__GNUC__ >= 4) # define UNIV_INTERN __attribute__((visibility ("hidden"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +# define UNIV_INTERN __hidden +#else +# define UNIV_INTERN #endif #if (!defined(UNIV_DEBUG) && !defined(UNIV_MUST_NOT_INLINE))