本专栏代码部分使用到的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
相关推荐
Brilliantwxx6 小时前
【Linux】IO(上)全篇:文件本质、C 接口、系统调用与文件描述符
linux·运维·服务器·c语言
承渊政道6 小时前
Linux网络学习【深入理解应用层HTTP协议、Cookie与Session机制及HTTPS协议原理】
linux·网络·学习·http·cookie·session
北风toto6 小时前
Linux 服务器通过 tgz 离线部署 Docker
linux·服务器·docker
重生之小比特6 小时前
【Linux系统】13 基础IO(上)
linux·运维·服务器
CCCCCCCCharlie6 小时前
从0到1:一个字节的磁盘之旅
linux·开发语言·c++
运维小斌6 小时前
麒麟 V10 ARM64 离线部署 OceanBase:8 步实施手册
linux·数据库·oceanbase·麒麟
着迷不白6 小时前
生产环境标准的Linux系统安装到服务器
linux·云计算
吹什么轩7 小时前
linux系统复习:进程优先级与O(1)调度
java·linux·算法
syagain_zsx9 小时前
spdlog实战:日志分级、滚动与性能调优
linux·c++·日志库·二次开发日志库
GeW21 小时前
新质生产力路线图Linux、数据库、国产化替代一次讲透
linux