Forte C compiler, SIZEOF from X11/xdm.h and macro concatenation
Hi,
I'm trying to trace the version of compiler I need to build some legacy software. The software can't be changed. I'm currently using:-
% cc -V
cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
with a demo licence.
I'm currently having problems compiling some code which makes use of the SIZEOF macro from /usr/openwin/include/X11/xdm.h. This macro uses concatenation to prefix the argument with 'sz_'. The problem I'm seeing is that 'sz_' is undefined at compile time; looking at the output of the preprocessor I see that a space has been added between the prefix and the argument (e.g. SIZEOF(x) produces 'sz_ x').
Questions:
1. Does this indicate an error in the way I'm using the compiler? I presume that the macro is defined as sz_/**/x, the null comment being replaced by a space. This definition is used because of #ifdef's in the xdm.h file guarding against using sz_##x. Is a -D flag required somewhere to force the correct definition?
2. I also don't want to change the make files in use if possible, so using a -D option is not ideal. Is there a later compiler version where any problem has been corrected?
Cheers,
Chris.

