Subject: Re: cross compile on solaris fails using SunStudio Compiler
To: Kurt Schreiner <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 09/05/2006 18:37:49
On Tue, Sep 05, 2006 at 05:02:22PM +0200, Kurt Schreiner wrote:
> Looking at src/sys/fs/cd9660/iso.h I see a lot of
> 174 static __inline int isonum_711(u_char *) __attribute__ ((unused));
> Is __inline a gcc-ism (or NetBSD-ism?) or should the SunStudio11 cc crock
IIRC __inline is a gcc-ism, because 'inline' was a valid user variable name
before being added to C (posibly via C++) in C99.
Possibly _inline is valid, in any case a simple #define will suffice.
The '__attribute__ ((unused))' is definitely a gcc-ism.
One of the NetBSD header files (maybe sys/cdefs.h) might contain something
that should be used instead of '__attribute__ ((unused))' so that it
can be #defined to the appropraite string (if any) for the compiler.
OTOH it isn't obvious that the object files generated by sun's compiler
are useful to you - except for building tools to run under solaris (or
Sun's compiler does, however, support some gcc-isms (and M$ isms) but
not necessarily the ones you want. And I've had issues with sun's
sparc compiler not accepting M$isms that it is documented as handling.
David Laight: email@example.com