becher@armada.UUCP (Jonathan D. Becher) (03/11/89)
Is there any way with the GNU preprocessor to turn a macro
argument into a charater constant. We are trying to duplicate
the following macro from <sys/ioctl.h> but gcc-cpp does not
expand macro arguments inside strings and character constants.
BTW, stringification does not do what we want. We also do not want
to use -traditional because it turns off other ANSI features.
#define _IOR(x,y,t) \
(int)(IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|('x'<<8)|y)
Thanks for any help,
Jon Becher
argosy!becher@decwrl.dec.com