The next release of VxWorks includes a system header file that forms an
include filename from a root directory component, an architecture macro,
and a filename. The architecture macro expands to 'mips' for MIPS
targets, but gcc by default defines 'mips' to 1. Thus the header file
includes foo/1/bar instead of foo/mips/bar.
This problem doesn't affect users of Wind River's makefiles, since those
makefiles add -ansi to the command line by default. However, it does
affect users who invoke the compiler directly, and it does affect anyone
wanting to run the gcc testsuites.
Although it's probably not wise of the headers to rely on identifiers
like 'mips' not being macros, I think gcc's definition of 'mips' is even
less sound. I'd get rid of it for all MIPS targets if I thought it was safe.
I don't think it is safe though, so this patch just stops the definition
for VxWorks.
Tested on mips-wrs-vxworks and mipsisa64-elfoabi. I can only approve
the mips.h change, so are the generic VxWorks changes OK too?