-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUnixfunc.h
More file actions
29 lines (29 loc) · 825 Bytes
/
Unixfunc.h
File metadata and controls
29 lines (29 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/epoll.h>
#include <string.h>
#include <sys/wait.h>
#include <dirent.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <syslog.h>
#include <sys/mman.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <signal.h>
#include <pthread.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/time.h>
#define ARGS_CHECK(argc, val) {if (argc!=val){printf("Args ERROR\n"); return -1;}}
#define THREAD_ERROR_CHECK(ret,funcName) {if(ret!=0) \
{printf("%s:%s\n",funcName,strerror(ret));return -1;}}
#define ERROR_CHECK(ret, retval, filename) {if (ret == retval){perror(filename); return -1;}}