jds SVN: spec-files

Brian Cameron Brian.Cameron at Sun.COM
Thu Nov 15 10:56:08 PST 2007


Matt:

Isn't doing "#ifdef __sun" a bit better than doing "#ifdef sun"
or the other variants (like "__sun__")?

For reference, if you want the test to be "if Sun Studio C compiler"
then the proper #ifdef's are

For C:

__SUNPRO_C

For C++:

__SUNPRO_CC

It's better to use __SUNPRO_CC or __SUNPRO_C if you really mean
"if the Sun Studio compiler".  In other words, for changes that
are needed for differences between the Sun Studio and GCC
compilers (such as the lack of a GCC extension).  You don't really want
such changes to be "#ifdef __sun" since this might break things for
people who build on Solaris with GCC.

However, I think your change is appropriate since checking for
SunStudio *OR* (GNUC && __sun__) sounds pretty much the
same as just checking for __sun).

Brian


> Log message:
> * patches/bug-buddy-01-use-pstack.diff : Update #define check
>   from :
> 	#if defined(__SUNPRO_CC) || (defined(__GNUC__) && defined(__sun__))
>   back to :
> 	#if defined(sun) && defined(__SVR4)
> 
>   in file gdb-buddy.c, as this was causing bug-buddy to either crash
>   or simply hang. The top define is only available for C++ compiler
>   and is not defined when using cc.
> 
> 
> ------------------------------------------------------------------------
> 
> U   trunk/ChangeLog
> U   trunk/patches/bug-buddy-01-use-pstack.diff



More information about the jds-notify mailing list