f06974b98c83de02f752de18beddb1fe7b949893
[deb_libnfs.git] / aros / aros_compat.h
1 #ifndef AROS_COMPAT_H
2 #define AROS_COMPAT_H
3
4 #include <unistd.h>
5 #include <sys/types.h>
6 #include <sys/ioctl.h>
7 #include <netinet/in.h>
8 #include <sys/mount.h>
9 #include <proto/socket.h>
10 #include <proto/exec.h>
11 #include <netdb.h>
12 #include <net/if.h>
13
14 #define statvfs statfs
15 #define ioctl IoctlSocket
16 #define close CloseSocket
17
18 #define inet_pton aros_inet_pton
19 #define freeaddrinfo aros_freeaddrinfo
20 #define getnameinfo aros_getnameinfo
21 #define getaddrinfo aros_getaddrinfo
22
23 extern struct Library * SocketBase;
24
25 void aros_init_socket(void);
26
27 #define f_flag f_flags
28 #define f_favail f_ffree
29 /* we dont have these at all */
30 #define f_fsid f_spare[0]
31 #define f_frsize f_spare[0]
32 #define f_namemax f_spare[0]
33
34 #define POLLIN 0x0001 /* There is data to read */
35 #define POLLPRI 0x0002 /* There is urgent data to read */
36 #define POLLOUT 0x0004 /* Writing now will not block */
37 #define POLLERR 0x0008 /* Error condition */
38 #define POLLHUP 0x0010 /* Hung up */
39 #define POLLNVAL 0x0020 /* Invalid request: fd not open */
40
41 struct pollfd {
42 int fd; /* file descriptor */
43 short events; /* requested events */
44 short revents; /* returned events */
45 };
46
47 #define poll(x, y, z) aros_poll(x, y, z)
48
49 #endif