Rich Morin <[EMAIL PROTECTED]> wrote:
> At 15:36 +0100 11/20/07, Joerg Schilling wrote:
> > If you convert to ## and if Dtrace on Solaris still calls
> > /lib/cpp, it will no longer work on Solaris.
> >
> > Check the __CONCAT__ macro in /usr/include/sys/*.h
>
> Well, "grep __CONCAT__ /usr/include/sys/*.h" comes up empty
> on Leopard, so no help there. However, Googling about, I do
> see some examples of __CONCAT__ definitions.
OK, this on OpenSolaris
> I wonder if I need to do something like this, for portability:
>
> #if __APPLE__
> #define __CONCAT__(A,B) A ## B
> #else
> #define __CONCAT__(A,B) A/**/B
> #endif
>
> then use __CONCAT__ in the following code. Problem is, I
> don't know what the #if test should be. __APPLE__ is a bit
> too specific...
Use e.g.:
#ifdef __STDC__
#define __CONCAT__(A,B) A ## B
#else
#define __CONCAT__(A,B) A/**/B
#endif
or better:
#if __STDC__ - 0 == 0
#define __CONCAT__(A,B) A/**/B
#else
#define __CONCAT__(A,B) A ## B
#endif
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
dtrace-discuss mailing list
[email protected]