ObjFW  Diff

Differences From Artifact [c6d03fb540]:

To Artifact [57adc3cc3c]:


9
10
11
12
13
14
15


16
17
18
19
20
21
22
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24







+
+







 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

/* Work around __block being used by glibc */
#ifdef __GLIBC__
# undef __USE_XOPEN
#endif

#include <unistd.h>
51
52
53
54
55
56
57
58

59
60
61
62

63
64
65
66
67

68
69
70
71
72
73
74
53
54
55
56
57
58
59

60
61
62
63

64
65
66
67
68

69
70
71
72
73
74
75
76







-
+



-
+




-
+







# define SOMAXCONN 32
#endif

#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
#endif

#ifdef _WIN32
#ifdef OF_WINDOWS
# define close(sock) closesocket(sock)
#endif

#ifdef _PSP
#ifdef OF_PSP
/* PSP defines AF_INET6, even though sockaddr_in6 is missing */
# undef AF_INET6
#endif

#ifdef __wii__
#ifdef OF_WII
# define accept(sock, addr, addrlen) net_accept(sock, addr, addrlen)
# define bind(sock, addr, addrlen) net_bind(sock, addr, addrlen)
# define close(sock) net_close(sock)
# define connect(sock, addr, addrlen) net_connect(sock, addr, addrlen)
# define gethostbyname(name) net_gethostbyname(name)
# define h_errno 0
# define hstrerror(err) "unknown (no hstrerror)"