[Pcsclite-git-commit] [PCSC] 01/03: Fix SunOS compilation error

Ludovic Rousseau rousseau at moszumanska.debian.org
Sun May 29 12:13:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit 687128ad9a377a27bd93e542fc096530534dc101
Author: Richard PALO <richard at NetBSD.org>
Date:   Sat Apr 23 18:13:37 2016 +0200

    Fix SunOS compilation error
    
    Avoid visibility issues on SunOS on either gcc or studio
    by using a guard stipulating minimum versions for each compiler
    needed to support __attribute__((visibility("hidden")) or equivalent
---
 src/misc.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/misc.h b/src/misc.h
index ea0d098..c455acd 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -40,10 +40,12 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * see http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/Function-Attributes.html#Function-Attributes
  * see http://www.nedprod.com/programs/gccvisibility.html
  */
-#if defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+#if defined(__GNUC__) && \
+	(__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) || \
+	defined(__SUNPRO_C) && __SUNPRO_C >= 0x590
 #define INTERNAL __attribute__ ((visibility("hidden")))
 #define PCSC_API __attribute__ ((visibility("default")))
-#elif (! defined __GNUC__ ) && defined (__sun)
+#elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x550
 /* http://wikis.sun.com/display/SunStudio/Macros+for+Shared+Library+Symbol+Visibility */
 #define INTERNAL __hidden
 #define PCSC_API __global

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list