Where is stdarg.h?

前端 未结 2 806
一向
一向 2021-01-02 04:19

On my system (Mac OS 10.6) /usr/include/stdarg.h is:

/* This file is public domain.  */
/* GCC uses its own copy of this header */
#if defined(__GNU         


        
相关标签:
2条回答
  • 2021-01-02 04:20

    <stdarg.h>, even more than most C library headers, tends to be very compiler-specific. As such, each of the compilers on OS X has it's own stdarg.h implementation, found in a compiler-specific location (which is included as part of the default search paths for that compiler). The compiler finds the generic stdarg.h, which basically tells it to "keep looking" (via the extension #include_next), and it then finds the compiler-specific implementation.

    __MWERKS__ refers to an old compiler for PPC, "MetroWerks CodeWarrior".

    0 讨论(0)
  • 2021-01-02 04:25

    #include_next is a gcc extension. As you should know, #include has a list of paths it searches for header files. #include_next tells the preprocessor to include the specified header checking only paths in the list after the one that contained the current header file.

    __MWERKS__ is a preprocessor macro defined on old versions of CodeWarrior.

    0 讨论(0)
提交回复
热议问题