4 ms·
His point is to use C instead of the preprocessor. #ifdef MIPS mips_stuff(); #endif should be if (MIPS) { mips_stuff(); } Ev
by beza1e1 17y ago
His point is to use C instead of the preprocessor.
#ifdef MIPS
mips_stuff();
#endif
should be
if (MIPS) {
mips_stuff();
}
Even a mediocre compiler should be able to eliminate the then-body in the non-MIPS case.
Another possibility is to generate the same symbols in every architecture specific component and link the one you want to use.