RE: Problems with #import <stdarg.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ronald,

I believe* all the operating system provided headers (such as the Standard C Library ones) expected to be #include'd (which uses the C protocol for the preprocessor), not #import'd (the ObjC protocol for the preprocessor).

Using #import can interfere with their multi-include logic.  The reason for the multi-include logic is historical/legacy, evolutionary, backwards compatibility, and also involves ISO 9899 standardization (both 1989 and 1999).  And for some headers, which are more intimately tied to the operating system than the Standard C Library, there may be some POSIX (IEEE Std 1003) contortions as well or UNIX 2003 contortions.  It's hard to please everyone.

In theory, they could be made to be #import savvy as well, but those headers are really C headers, not ObjC headers.  (Often they have allowances incorporated to be used as-is for C++.  But C++ compilation units really should use <cstdarg> and <cstdio> rather than the raw C <stdarg.h> and <stdio.h> anyway.)

HTH,
--Eljay

* I may be mistaken.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux