beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luasocket / src / usocket.h
blob8b3241bf3c2ce2386fd6c4a6a265a8a0bb1aa2ca
1 #ifndef USOCKET_H
2 #define USOCKET_H
3 /*=========================================================================*\
4 * Socket compatibilization module for Unix
5 * LuaSocket toolkit
6 \*=========================================================================*/
8 /*=========================================================================*\
9 * BSD include files
10 \*=========================================================================*/
11 /* error codes */
12 #include <errno.h>
13 /* close function */
14 #include <unistd.h>
15 /* fnctnl function and associated constants */
16 #include <fcntl.h>
17 /* struct sockaddr */
18 #include <sys/types.h>
19 /* socket function */
20 #include <sys/socket.h>
21 /* struct timeval */
22 #include <sys/time.h>
23 /* gethostbyname and gethostbyaddr functions */
24 #include <netdb.h>
25 /* sigpipe handling */
26 #include <signal.h>
27 /* IP stuff*/
28 #include <netinet/in.h>
29 #include <arpa/inet.h>
30 /* TCP options (nagle algorithm disable) */
31 #include <netinet/tcp.h>
33 #ifndef SO_REUSEPORT
34 #define SO_REUSEPORT SO_REUSEADDR
35 #endif
37 typedef int t_socket;
38 typedef t_socket *p_socket;
39 typedef struct sockaddr_storage t_sockaddr_storage;
41 #define SOCKET_INVALID (-1)
43 #endif /* USOCKET_H */