本专栏代码部分使用到的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
相关推荐
张洛闻Eren5 小时前
MySQL 维护稳定系统【MySQL第二课】
linux·数据库·mysql·云原生
ltl6 小时前
Linux 异步 I/O:epoll 与 io_uring 对比
linux
ltl6 小时前
压缩算法工程实践:吞吐、比率与 CPU 权衡
linux
fiveym7 小时前
01 - iPXE + Clonezilla 网络装机原理解析
linux·运维·服务器·网络
-今昭-8 小时前
Ansible
linux·运维·ansible
mounter62510 小时前
MACsec 全景解析:从技术演进、核心架构到 DPU 硬件卸载与 K8s 大规模调度实战
linux·kubernetes·linux kernel·kernel·macsec
IT邦德11 小时前
Dify1.6基于ubuntu系统的部署实战
linux·运维·ubuntu
吠品11 小时前
Java byte数组与String互转:编码细节与踩坑记录
java·linux·服务器
木白CPP12 小时前
Linux 驱动UART子系统源码分析
linux·运维·服务器·驱动开发·嵌入式硬件·开源软件
RisunJan12 小时前
Linux命令-times(进程累计时间显示)
linux·运维·chrome