On 16/09/05, Nardmann, Heiko <[EMAIL PROTECTED]> wrote:
> Hi,

Hello,

> I have tried to compile ... with the native Sun compiler (cc: Sun C 5.6
> 2004/07/15) which resulted in the following error message:
> 
>  cc -DHAVE_CONFIG_H -I. -I. -I.. -I../src/PCSC -I../src -I/usr/local/include
> -g -D_REENTRANT -c debuglog.c  -KPIC -DPIC -o .libs/debuglog.o
> "debuglog.c", line 217: syntax error before or at: (
> "debuglog.c", line 217: warning: old-style declaration or incorrect type for:
> __attribute__
> "debuglog.c", line 239: cannot recover from previous errors
> cc: acomp failed for debuglog.c
> make[3]: *** [debuglog.lo] Error 1
> make[3]: Leaving directory `/home/nardmann/pcsc-lite-1.2.9-beta8/src'
> 
> Line 217 is this one:
> 
> INTERNAL int DebugLogSetCategory(const int dbginfo)
> 
> So the problem is with the definition of INTERNAL in src/misc.h:
> 
> #define INTERNAL __attribute__ ((visibility("hidden")))
> 
> The Sun native compiler does not support this syntax. So this part should be
> protected by some configure check. Sun Studio cc uses '__hidden' for this.
> For my part I changed the INTERNAL definition to
> 
> #if defined(HAS_COMPILER_ATTRIBUTE_SUPPORT)
> #define INTERNAL __attribute__ ((visibility("hidden")))
> #else
> #define INTERNAL __hidden
> #endif

I changed it in:
#ifdef __GCC__
#define INTERNAL __attribute__ ((visibility("hidden")))
#else
#define INTERNAL
#endif


> But this is not really the correct way to solve the problem - just my quick
> hack for it.

Exact.
Do you know a way to identify the SUN compiler (like we have __GCC__
for GCC) so we can add specific support for it? According to [1] I
could use "__sun" but that may not be the best choice. Any SUN hacker
willing to help?

Bye,

[1] 
http://developers.sun.com/prodtech/cc/documentation/ss10_docs/mr/man1/cc.1.html

-- 
 Dr. Ludovic Rousseau
 For private mail use [EMAIL PROTECTED] and not "big brother" Google

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to