以下宏定义可否逐句释义,谢谢!
#ifndef __sig_atomic_t_defined
#define __sig_atomic_t_defined 1
#include <bits/types.h>
/* An integral type that can be modified atomically, without the
possibility of a signal arriving in the middle of the operation. */
typedef __sig_atomic_t sig_atomic_t;
#endif
如果没有定义一个叫做__sig_atomic_t_defined的头文件
那么定义一个叫做__sig_atomic_t_defined的头文件
导入头文件bits/types.h
/*注释*/
类型别名关键字typedef 给类型__sig_atomic_t 起一个别名sig_atomic_t
结束定义
#ifndef 就是 if not define的意思,检查宏是否已经被定义,如果没定义,则执行#define来定义这个宏,从而避免宏重复定义
#endif是与#ifndef配对的结束标志
希望对你有帮助:https://blog.csdn.net/it_xiangqiang/category_10581430.html
希望对你有帮助:https://blog.csdn.net/it_xiangqiang/category_10768339.html
如果没有定义__sig_atomic_t_defined宏,那么就定义它的值为1,然后#include <bits/types.h>这个h头文件