我看过这段代码:
#if !defined(errno)
extern int errno;
#endif
所以我的问题是errno
int 还是 macro ,因为#if
if 可以检查是否定义了宏,并且在我们完成之后extern int errno;
在 errno.h 中是这样定义的
#ifdef _ERRNO_H
/* Declare the `errno' variable, unless it's defined as a macro by
bits/errno.h. This is the case in GNU, where it is a per-thread
variable. This redeclaration using the macro still works, but it
will be a function declaration without a prototype and may trigger
a -Wstrict-prototypes warning. */
#ifndef errno
extern int errno;
#endif
#endif