linux C语言头文件

/C语言标准头文件:
#include <assert.h>		// assert断言
#include <stdio.h>		// 定义输入/输出函数 
#include <stdlib.h>		// 定义杂项函数及内存分配函数,atoi,free,abs,rand
#include <string.h>		// 字符串处理
#include <errno.h>		// 定义错误码 
#include <stddef.h>		// 

//linux常用头文件 -- POSIX标准定义的头文件
#include <fcntl.h>		// 文件控制,https://www.cnblogs.com/xuyh/p/3273082.html
#include <netdb.h>		// 网络数据库操作
#include <arpa/inet.h>	// 网络地址,INTERNET定义,htonl,htons
#include <netinet/in.h>   	// INTERNET地址族 sockaddr_in定义,INADDR_ANY
#include <netinet/tcp.h>	// 传输控制协议定义

//linux常用头文件 -- POSIX定义的XSI扩展头文件
#include <pthread.h>	// 线程
#include <unistd.h>		//符号常量

#include <netinet/in.h>   	// INTERNET地址族 sockaddr_in定义
#include <netinet/tcp.h>	// 传输控制协议定义

//#include sys/xxx.h是Linux系统中的系统头文件
#include <sys/ioctl.h>	//https://www.cnblogs.com/tdyizhen1314/p/4896689.html
#include <sys/prctl.h> 
#include <sys/select.h>	// for socket
#include <sys/socket.h>	// for socket
#include <sys/time.h>	//Linux系统的日期头文件,通常会包含include "time.h" C库函数头文件;
#include <sys/types.h>	// for socket

参考资料:
https://blog.csdn.net/u011068702/article/details/60764754
https://www.cnblogs.com/leijiangtao/p/3712698.html
https://www.cnblogs.com/happyliuyi/p/5209260.html
http://www.cnblogs.com/wannable/p/5910968.html

发布了66 篇原创文章 · 获赞 49 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/mayue_web/article/details/86553641
今日推荐