问题描述
在我的系统(的Mac OS 10.6)的 /usr/include/stdarg.h 的是:
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(__GNUC__)
#include_next <stdarg.h>
#elif defined(__MWERKS__)
#include "mw_stdarg.h"
#else
#error "This header only supports __MWERKS__."
#endif
所以,如果GCC使用的的 STDARG.H 的,哪里是它自己的副本?我有不知道
如此,事情 #include_next
办法(可能是GCC的扩展?),也不是有关
MWERKS(编译?)。
So, if GCC uses its own copy of stdarg.h, where is it? I have no idea on whatthat #include_next
means (maybe a GCC extension?), nor something about"MWERKS" (a compiler?).
推荐答案
&LT; STDARG.H&GT;
,比大多数C库头还要多,往往是非常编译-具体。因此,每个在OS X上的编译器有它自己的 STDARG.H
的实施,在一个特定的编译器发现地点(包含作为默认搜索路径的一部分该编译器)。编译器发现通用 STDARG.H
,基本上告诉它继续找(通过扩展 #include_next
),它然后查找特定的编译器的实现。
<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
指的是旧的编译器的PPC,Metrowerks公司codeWarrior。
__MWERKS__
refers to an old compiler for PPC, "MetroWerks CodeWarrior".
这篇关于哪里是STDARG.H?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!