Cpp doesn't define __ELF__ when the object format is elf. I don't believe that anything in the core OS uses cpp, but I know at least one port that cares about __ELF__ does (archivers/zip). Fix: Since /usr/bin/cpp is a wrapper script, fixing it seems less intrusive than grafting objformat's functionality into /usr/libexec/cpp. This patch does that: How-To-Repeat: On a system where the default object format is elf: touch foo.c cc -E -dM foo.c cpp -dM foo.c Note the __ELF__ is listed in the former but not the latter output.
Someone what to close this? It has long since been overtaken by events and bde hated the idea when someone else suggested it. -- I've always wanted to be a dilettante, but I've never quite been ready to make the commitment.
State Changed From-To: open->closed cpp should define no more than absolutely necessary. Originator reportrts that his suggestion has long since been overtaken by events. Originator reports that bde also hated his suggestion. Originator confirms closure.