2013-04-11 07:28:40 +04:00
|
|
|
#ifndef AROS_COMPAT_H
|
|
|
|
#define AROS_COMPAT_H
|
|
|
|
|
2013-04-14 21:11:48 +04:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/ioctl.h>
|
2013-04-11 07:28:40 +04:00
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <sys/mount.h>
|
2013-04-12 05:37:05 +04:00
|
|
|
#include <proto/socket.h>
|
2013-04-12 17:12:58 +04:00
|
|
|
#include <proto/exec.h>
|
2013-05-29 09:13:08 +04:00
|
|
|
#include <netdb.h>
|
|
|
|
#include <net/if.h>
|
2013-05-29 09:41:54 +04:00
|
|
|
#include <netinet/in.h>
|
2013-04-11 07:28:40 +04:00
|
|
|
|
|
|
|
#define statvfs statfs
|
2013-04-12 17:12:58 +04:00
|
|
|
#define ioctl IoctlSocket
|
|
|
|
#define close CloseSocket
|
|
|
|
|
2013-04-13 04:38:44 +04:00
|
|
|
#define inet_pton aros_inet_pton
|
|
|
|
#define freeaddrinfo aros_freeaddrinfo
|
|
|
|
#define getnameinfo aros_getnameinfo
|
|
|
|
#define getaddrinfo aros_getaddrinfo
|
|
|
|
|
2013-04-12 17:12:58 +04:00
|
|
|
extern struct Library * SocketBase;
|
|
|
|
|
|
|
|
void aros_init_socket(void);
|
2013-04-11 07:28:40 +04:00
|
|
|
|
|
|
|
#define f_flag f_flags
|
|
|
|
#define f_favail f_ffree
|
|
|
|
/* we dont have these at all */
|
|
|
|
#define f_fsid f_spare[0]
|
|
|
|
#define f_frsize f_spare[0]
|
|
|
|
#define f_namemax f_spare[0]
|
|
|
|
|
|
|
|
#define POLLIN 0x0001 /* There is data to read */
|
|
|
|
#define POLLPRI 0x0002 /* There is urgent data to read */
|
|
|
|
#define POLLOUT 0x0004 /* Writing now will not block */
|
|
|
|
#define POLLERR 0x0008 /* Error condition */
|
|
|
|
#define POLLHUP 0x0010 /* Hung up */
|
|
|
|
#define POLLNVAL 0x0020 /* Invalid request: fd not open */
|
|
|
|
|
2013-05-29 09:41:54 +04:00
|
|
|
struct utimbuf {
|
|
|
|
int actime;
|
|
|
|
int modtime;
|
|
|
|
};
|
|
|
|
|
2013-04-11 07:28:40 +04:00
|
|
|
struct pollfd {
|
|
|
|
int fd; /* file descriptor */
|
|
|
|
short events; /* requested events */
|
|
|
|
short revents; /* returned events */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define poll(x, y, z) aros_poll(x, y, z)
|
|
|
|
|
|
|
|
#endif
|