ObjFW  Diff

Differences From Artifact [1832892042]:

  • File src/socket.m — part of check-in [12b8a7552e] at 2016-03-27 23:10:53 on branch trunk — Add socket support for Nintendo 3DS

    This removes the port registry that existed for the Wii and instead
    tries binding to random ports in a loop until it succeeds or errno is
    not EADDRINUSE. This is done for the Wii and Nintendo 3DS now.

    This also includes several other socket-related cleanups. (user: js, size: 4219) [annotate] [blame] [check-ins using]

To Artifact [46181077da]:


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

#ifdef OF_HAVE_THREADS
static of_once_t onceControl = OF_ONCE_INIT;
static of_mutex_t mutex;
#endif
static bool initialized = false;

#ifdef OF_WII
# ifdef OF_HAVE_THREADS
static of_spinlock_t spinlock;
# endif
static uint8_t portRegistry[2][65536 / 8];
#endif

static void
init(void)
{
#if defined(OF_WINDOWS)
	WSADATA wsa;

	if (WSAStartup(MAKEWORD(2, 0), &wsa))







<
<
<
<
<
<
<







39
40
41
42
43
44
45







46
47
48
49
50
51
52

#ifdef OF_HAVE_THREADS
static of_once_t onceControl = OF_ONCE_INIT;
static of_mutex_t mutex;
#endif
static bool initialized = false;








static void
init(void)
{
#if defined(OF_WINDOWS)
	WSADATA wsa;

	if (WSAStartup(MAKEWORD(2, 0), &wsa))