gcc not reading macros from -DMACRONAME=value?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This appears to be a Red Hat 7.3 (and possibly earlier)-specific
problem, as it works fine on Debian, Solaris, and at least 6.x
releases of RH.

I have a source file (idtest.c) with the lines:

	#define DBSPECS "dbspecs0" DB ".h"

	#include DBSPECS

which is compiled with "gcc -DDB=\"c\" idtest.c -Wall"

This should (and, everywhere else, does) make DBSPECS = "dbspecs0c.h"
and at the very least result in a "dbspecs0c.h: No such file or
directory" error.  But on Valhalla, instead, I get:

"dbspecs0: No such file or directory"

I.e., it reads as far as the second quotation mark and then stops.
Since it's on line 7, I don't get any other errors or warnings -- it
just bombs.

Does anyone know what is different about the environment in RH 7.3
that makes this not work?  And does it have anything to do with the
fact that, when I add the "-v" flag, on RH it shows that it's using
cc1 and on others it's cpp0?

Any help?

Thanks,

O.



_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux