CentOS7中的系统类型对应的真实类型
总结了CentOs7中,系统类型的真是类型及对应的头文件,列于下表。此表中 int为32位,long 为 32位,long int 为32位, short int为16位。
Type |
Real Type | header file | Description |
clock_t | long int | time.h | counter of clock ticks (process time) (Section 1.10) |
comp_t | compressed clock ticks (not defined by POSIX.1; see Section 8.14) |
||
dev_t | unsigned long int | types.h | device numbers (major and minor) (Section 4.24) |
fd_set |
struct{ #ifdef __USE_XOPEN
long int fds_bits[__FD_SETSIZE / __NFDBITS];
# define __FDS_BITS(set) ((set)->fds_bits)
#else
long int __fds_bits[__FD_SETSIZE / __NFDBITS];
# define __FDS_BITS(set) ((set)->__fds_bits)
#endif
}
|
sys/select.h | file descriptor sets (Section 14.4.1) |
fpos_t |
struct{long int __pos; struct{ int __count; union{ unsigned int __wch; char __wchb[4]; } } __state; } |
stdio.h | file position (Section 5.10) |
gid_t | unsigned int | types.h | numeric group IDs |
ino_t | unsigned long int | types.h | i-node numbers |
mode_t | unsigned int | types.h | file type, file creation mode (Section 4.5) |
nlink_t | unsigned long int | types.h | link counts for directory entries |
off_t | long int | types.h | file sizes and offsets (signed) (lseek, Section 3.6) |
pid_t | int | types.h | process IDs and process group IDs (signed) (Sections 8.2 and 9.4) |
pthread_t | unsigned long int | pthreadtypes.h | thread IDs (Section 11.3) |
ptrdiff_t | long int | stddef.h | result of subtracting two pointers (signed) |
rlim_t | unsigned long int | sys/resource.h | resource limits (Section 7.11) |
sig_atomic_t | int | signal.h | data type that can be accessed atomically (Section 10.15) |
sigset_t |
struct{ unsigned long int __val[SIGSET_NWORDS]; } |
signal.h | signal set (Section 10.11) |
size_t | unsigned long int | stddef.h | sizes of objects (such as strings) (unsigned) (Section 3.7) |
ssize_t | long int | types.h | functions that return a count of bytes (signed) (read, write, Section 3.7) |
time_t | long int | time.h | counter of seconds of calendar time (Section 1.10) |
uid_t | unsigned int | types.h | numeric user IDs |
wchar_t | int | can represent all distinct character codes |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具