window linux 头文件

#ifndef _PLATFORMDEF_H_
#define _PLATFORMDEF_H_



#ifdef _LINUX
#include <sys/time.h>
#include <unistd.h>	/* SHOULD be before any other include files 	*/
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <fcntl.h>		/* open, O_RDONLY, O_WRONLY, etc.	*/
#include <ctype.h>
#include <limits.h>
#include <signal.h>		/* for "kill", etc.		*/
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netdb.h>		/* gethostbyname, etc.			*/
#include <netinet/in.h>		/* IPPROTO_*, etc.			*/
#include <sys/un.h>		/* for sockaddr_un			*/
#include <arpa/inet.h>		/* inet_addr, etc.			*/
#include <netinet/tcp.h>	/* TCP_NODELAY, etc.			*/
#include <pthread.h>
#include <dirent.h>
#include <math.h>
#include <execinfo.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/wait.h> 
#include <sys/reboot.h>
#include<sys/mount.h>
#ifndef INVALID_SOCKET
#define SOCKET int
#define INVALID_SOCKET -1
#endif

#define CM_MSSLEEP(t)  usleep(t*1000)

#elif _WIN32

#pragma warning(disable: 4996)

#include <io.h>
#include <WinSock2.h>
#include <windows.h>
#include <process.h>		/* for _beginthread, _endthread	*/
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <limits.h>
#include <conio.h>
#include <fcntl.h>
#include <math.h>

#if !defined(__cplusplus)
#define inline __inline
#endif
#endif

 

posted on 2021-03-01 19:20  lydstory  阅读(182)  评论(0)    收藏  举报

导航