IMHO a little bit cleanier way would be to apply http://gcc.gnu.org/ml/gcc-patches/2000-05/msg00769.html which provides those macros in libiberty. Actually, it doesn't, but it does provide a macro that can simplify the code I added to system.h once it's put in.