think I know what has gone wrong now.
We used to segregate the bsd derived includes into a separate header 'bsd' directory within the Kernel.framework and we used to add -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/Headers/bsd. At some stage recently I think we moved headers around and we didn't updated the newer project templates to the new layout, leaving the SDKs in the cold.
The cleanest solution for you is probably to add this include (-I...) to your project. Also it is probably a good idea to wrap this thread up and submit it to bugreporter.apple.com
I have an IOKit driver that I have always been building under Mac OS X 10.2.8 and ProjectBuilder to ensure the backwards compatibility of a single driver with Mac OS X 10.2, 10.3 and now 10.4, but wanted to use Mac OS X 10.4 and the new Xcode 2.0 for my IOKit driver development.
I had exactly the same problem of ansi.h not being found when setting Cross-Develop Using Target SDK MacOSX10.2.8 or MacOSX10.3.9. It compiled fine with setting Cross-Develop Using Target SDK Current Mac OS.
Doing a find, showed me this:
joel-vinks-ibook-g4:/Users/joelvink root# find / -name ansi.h -print
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/i386/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/ppc/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/i386/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/machine/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/ppc/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/i386/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/ppc/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/i386/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/machine/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/ppc/ansi.h
I then copied .../bsd/ppc/ansi.h over to .../ppc/ansi.h, in each respective SDK, so I now have:
joel-vinks-ibook-g4:/Users/joelvink root# find / -name ansi.h -print
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/i386/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/ppc/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ppc/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/i386/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/machine/ansi.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/ppc/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/i386/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/bsd/ppc/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ppc/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/i386/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/machine/ansi.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/ppc/ansi.h
This now allows my IOKit driver to compile. I first tried to copy .../machine/ansi.h as per Godfrey's suggestion and that did NOT solve the compile problems.
Joel