本专栏代码部分使用到的head.h

本专栏代码部分使用到的head.h

存放路径在根目录下的 /usr/include/head.h

cpp 复制代码
#ifndef __HEAD_H__
#define __HEAD_H__

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
#include <dirent.h> //opendir closedir readdir函数头文件
#include <sys/wait.h>
#include <pthread.h>   //创建线程
#include <semaphore.h> //无名信号量
#include <signal.h>
#include <sys/ipc.h> //IPC进程间通信键的获取
#include <sys/msg.h> //IPC消息队列
#include <sys/shm.h> //IPC共享内存
#include <sys/sem.h> //IPC信号灯集
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h> // inet_addr 将点分十进制的字符串 转换成  网络字节序的 无符号四字节整型
#define PRINT_ERR(errmsg) \
    do                    \
    {                     \
        perror(errmsg);   \
        return -1;        \
    } while (0)

#endif
相关推荐
徐小黑ACG8 小时前
nginx配置文件
linux·服务器·nginx
新时代牛马8 小时前
Linux VFS 完整篇:从path_openat、dentry/inode 到page cache 与挂载排障
linux·运维·服务器
java_logo8 小时前
Docker 部署 Rocky Linux:轻松搭建 RHEL 兼容企业级基础镜像平台
linux·docker·容器·rocky linux·基础镜像·轩辕镜像·rhel 兼容
拂拉氏8 小时前
【知识讲解】 Linux虚拟地址空间认识
linux·虚拟地址空间
新时代牛马10 小时前
Linux 驱动中断与定时完整篇:从 request_threaded_irq 到hrtimer 选型与排障
linux·运维·服务器
分支预测失败12 小时前
RISC-V 核间中断 IPI 实战:从 MSIP 寄存器到 IMSIC 消息投递
linux·后端
GeW13 小时前
RHCE考试避坑指南"90%考生容易忽略的细节
linux
键盘会跳舞14 小时前
【C++多线程】死锁诊断工具实战:从 Windows 到 Linux 的全链路排查
linux·c++·windows·死锁
拂拉氏15 小时前
【知识讲解】 Linux环境变量的认识与使用
linux·环境变量
zhangrelay15 小时前
答疑-是否软件源问题都必须更换为国内呢-
linux·笔记·学习·ubuntu·ros2