本专栏代码部分使用到的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
相关推荐
ShineWinsu几秒前
对于Linux:文件操作以及文件IO的解析
linux·c++·面试·笔试·io·shell·文件操作
-SGlow-几秒前
Linux相关概念和易错知识点(52)(基于System V的信号量和消息队列)
linux·运维·服务器
江畔何人初2 分钟前
TCP的三次握手与四次挥手
linux·服务器·网络·网络协议·tcp/ip
Trouvaille ~16 分钟前
【MySQL篇】数据库操作:从创建到管理
linux·数据库·mysql·oracle·xshell·ddl
酸钠鈀19 分钟前
AI WB2 SDK Ubuntu 环境搭建
linux·运维·ubuntu
Robot_Nav23 分钟前
双系统Linux死机解决方法
linux·运维·服务器
加勒比之杰克1 小时前
从阻塞 IO 到 epoll:把 Linux 网络 IO 一次讲透
linux·网络·windows·select·多路转接·epoll·poll
书到用时方恨少!1 小时前
Linux 常用指令使用指南:从入门到“救命”
linux·运维·服务器
默|笙1 小时前
【Linux】线程同步与互斥_同步(1)
linux
Deitymoon1 小时前
linux——条件变量
linux