20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
-
+
-
-
-
-
|
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#include "socket.h"
#include "OFSocket.h"
#ifndef INVALID_SOCKET
# define INVALID_SOCKET -1
#endif
#ifndef INADDR_NONE
# define INADDR_NONE ((in_addr_t)-1)
#endif
#ifndef SOMAXCONN
/*
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
-
+
-
+
-
|
# endif
# include <sys/filio.h>
# define closesocket(sock) CloseSocket(sock)
# define ioctlsocket(fd, req, arg) IoctlSocket(fd, req, arg)
# define hstrerror(err) "unknown (no hstrerror)"
# define SOCKET_ERROR -1
# if defined(OF_HAVE_THREADS) && !defined(OF_MORPHOS)
# define SocketBase ((struct Library *)of_tlskey_get(of_socket_base_key))
# define SocketBase ((struct Library *)OFTLSKeyGet(OFSocketBaseKey))
# ifdef OF_AMIGAOS4
# define ISocket \
# define ISocket ((struct SocketIFace *)OFTLSKeyGet(OFSocketInterfaceKey))
((struct SocketIFace *)of_tlskey_get(of_socket_interface_key))
# endif
# endif
# ifdef OF_MORPHOS
typedef uint32_t in_addr_t;
# endif
#elif !defined(OF_WINDOWS) && !defined(OF_WII)
# define closesocket(sock) close(sock)
|