In article <091104193344.m0225...@mirage.ceres.dti.ne.jp>, Izumi Tsutsui <tsut...@ceres.dti.ne.jp> wrote: >> >Modified Files: >> > src/sys/arch/x86/x86: patch.c >> > >> >Log Message: >> >Gracelessly bracket #include "opt_spldebug.h" with #ifdef i386. >> >Should fix the amd64 kernel-build failure that Andreas Wrede >> >reported. >> >> perhaps __i386__ > >I think __i386__ or __x86_64__ for ${MACHINE_ARCH}, >and i386 or amd64 for ${MACHINE}. >(I'm not sure if __amd64__ is defined or not) > >In this case __i386__ is proper, but I wonder >if we should also replace a bunch of #ifdef amd64 (or __amd64__) >and directries named "amd64" like sys/compat/linux/arch/amd64. >
$ cat > foo.c #include <stdio.h> int main(void) { #ifdef i386 printf("i386\n"); #endif #ifdef __i386__ printf("__i386__\n"); #endif return 0; } $ cc foo.c $ ./a.out i386 __i386__ $ cc -ansi foo.c __i386__ christos