2012-03-28 13:24:49 +02:00
|
|
|
#ifndef I2_UNIX_H
|
|
|
|
#define I2_UNIX_H
|
|
|
|
|
|
|
|
#include <execinfo.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2012-03-29 20:03:29 +02:00
|
|
|
#include <sys/ioctl.h>
|
2012-03-28 13:24:49 +02:00
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
|
|
|
typedef int SOCKET;
|
|
|
|
|
|
|
|
#define INVALID_SOCKET (-1)
|
|
|
|
|
|
|
|
inline void Sleep(unsigned long milliseconds)
|
|
|
|
{
|
|
|
|
usleep(milliseconds * 1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void closesocket(int fd)
|
|
|
|
{
|
|
|
|
close(fd);
|
|
|
|
}
|
|
|
|
|
2012-03-29 13:15:54 +02:00
|
|
|
#define ioctlsocket ioctl
|
|
|
|
|
2012-03-28 13:24:49 +02:00
|
|
|
#endif /* I2_UNIX_H */
|