本专栏代码部分使用到的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
相关推荐
云栖梦泽20 分钟前
Linux内核与驱动:14.SPI子系统
linux·运维·服务器·c++
yipiantian1 小时前
在Claude项目中实现跨目录访问Skills
linux·运维·服务器
cen__y1 小时前
Linux07(信号01)
linux·运维·服务器·c语言·开发语言
MT5开发1 小时前
Linux安装MariaDB
linux·运维·mariadb
Lentou2 小时前
日志轮询策略
linux·服务器·网络
Yoyo25年秋招冲冲冲2 小时前
【亲测可用】ubuntu系统下安装Openclaw+配置飞书
linux·ubuntu·ai·飞书·openclaw
你好,帅哥2 小时前
openssl ,msys2 ,交叉编译
linux·运维·服务器
计算机安禾2 小时前
【Linux从入门到精通】第36篇:DNS服务探秘——自己搭建一个内网DNS
linux·运维·servlet
2023自学中3 小时前
make clean 与 make distclean
linux·嵌入式
BenD-_-3 小时前
CVE-2026-31431 Copy Fail:Linux 内核本地提权漏洞风险与缓解
linux·网络·安全