>>>> "VK" == Valdis Kletnieks
<Valdis.Kletnieks(a)vt.edu> writes:
VK> The AIX xlc 3.6.6 compiler does *NOT* like the INCLUDE_GLUE hackery on a #include.
VK> The following test case demonstrates:
VK> cd lwlib/
VK> cat > z9.c << EOF
VK> #include "config.h"
VK> ATHENA_INCLUDE(foobar.h)
VK> #include ATHENA_INCLUDE(foobar.h)
VK> EOF
VK> xlc -E -I. -I/usr/local/include z9.c | tail
VK> produces on stderr:
VK> "z9.c", line 3.11: 1506-341 (S) #include header must be ended before the
end of the line.
VK> "z9.c", line 3.10: 1506-234 (E) Expecting a new-line character on
#include directive.
VK> and on stdout:
VK> #line 11 "./../src/s/aix4.h"
VK> struct ether_addr;
VK> struct sockaddr_dl;
VK> #line 2 "z9.c"
VK> <X11/Xaw/foobar.h>
VK> #line 1 "/usr/local/include/X11"
R.> Q..>Sxpm.h>Tbpmplus.h
VK> Seems to expand that X11 into the actual directory name.
VK> I'm surprised that #including a directory works, this is PROBABLY
VK> an IBM bug.
I think so. Our code is weird, but legal C.
Did our previous incarnation of this code work? It also used
preprocessor macros inside a #include directive.
Does this work?
#include "config.h"
#define TMP ATHENA_INCLUDE(foobar.h)
#include TMP
Martin