最近开始看stevens的apue2, 看到section 1.7 error handling, 其中有一段
Linux, for example, supports multithreaded access to errno by defining it as
extern int *_ _errno_location(void);
#define errno (*_ _errno_location())
请问这个函数声明extern int *_ _errno_location(void) 中的int *_表示返回什么类型呢?
是不是返回指向整形的指针呢?为什么不是int *呢?
谢谢大虾指点
apue2中的一个函数声明的疑问:关于extern int *_ _errno_location(void)
-
- 帖子: 26
- 注册时间: 2006-08-02 9:47
-
- 帖子: 338
- 注册时间: 2008-05-24 1:24
Re: apue2中的一个函数声明的疑问:关于extern int *_ _errno_location(void)
个人觉得 * 和 _ 之间有个空格的话,应该就好理解了,这里是省略空格的写法
回忆下c的标识符规则和指针的写法
回忆下c的标识符规则和指针的写法