[Pcsclite-cvs-commit] r4766 - /trunk/PCSC/src/misc.h
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Sun Feb 21 17:32:38 UTC 2010
Author: rousseau
Date: Sun Feb 21 17:32:38 2010
New Revision: 4766
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4766
Log:
" The gcc on Solaris 10 combined with the Sun loader appears to not
handle the gcc visibility attribute correctly. The sparc version says it
is ignored, the x86 version gives linker error. The attached patch
sun.gcc.1.5.6-svn-477.txt tries to test for gcc on Sun and not use the
visibility attribute. If on a sun and the compiler is not GCC, try and
use the Sun __global and __hidden instead. (I did not try the Sun Studio
compiler with this.) "
Thanks to Douglas E. Engert for the patch
http://archives.neohapsis.com/archives/dev/muscle/2010-q1/0127.html
Modified:
trunk/PCSC/src/misc.h
Modified: trunk/PCSC/src/misc.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/misc.h?rev=4766&op=diff
==============================================================================
--- trunk/PCSC/src/misc.h (original)
+++ trunk/PCSC/src/misc.h Sun Feb 21 17:32:38 2010
@@ -24,9 +24,13 @@
* 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__ && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+#if defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
#define INTERNAL __attribute__ ((visibility("hidden")))
#define PCSC_API __attribute__ ((visibility("default")))
+#elif (! defined __GNUC__ ) && defined (__sun)
+/* http://wikis.sun.com/display/SunStudio/Macros+for+Shared+Library+Symbol+Visibility */
+#define INTERNAL __hidden
+#define PCSC_API __global
#else
#define INTERNAL
#define PCSC_API
More information about the Pcsclite-cvs-commit
mailing list