X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=aros%2Faros_compat.h;fp=aros%2Faros_compat.h;h=76de2ac948f724daefc71df716b7a905d754b407;hb=ee872606f1e484f684276ec595f1e39d1f95b9a9;hp=0000000000000000000000000000000000000000;hpb=fab61e3d0384e61553b39860b923d41bc0cf17b1;p=deb_libnfs.git diff --git a/aros/aros_compat.h b/aros/aros_compat.h new file mode 100644 index 0000000..76de2ac --- /dev/null +++ b/aros/aros_compat.h @@ -0,0 +1,55 @@ +#ifndef AROS_COMPAT_H +#define AROS_COMPAT_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define statvfs statfs +#define ioctl IoctlSocket +#define close CloseSocket + +#define inet_pton aros_inet_pton +#define freeaddrinfo aros_freeaddrinfo +#define getnameinfo aros_getnameinfo +#define getaddrinfo aros_getaddrinfo + +extern struct Library * SocketBase; + +void aros_init_socket(void); + +#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 */ + +struct utimbuf { + int actime; + int modtime; +}; + +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