@@ -30,35 +30,35 @@ static of_once_t onceControl = OF_ONCE_INIT; static of_mutex_t mutex; #endif static bool initialized = false; -#ifdef __wii__ +#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(_WIN32) +#if defined(OF_WINDOWS) WSADATA wsa; if (WSAStartup(MAKEWORD(2, 0), &wsa)) return; -#elif defined(__wii__) +#elif defined(OF_WII) if (net_init() < 0) return; #endif #ifdef OF_HAVE_THREADS if (!of_mutex_new(&mutex)) return; -# ifdef __wii__ +# ifdef OF_WII if (!of_spinlock_new(&spinlock)) return; # endif #endif @@ -79,11 +79,11 @@ } int of_socket_errno() { -#ifndef _WIN32 +#ifndef OF_WINDOWS return errno; #else switch (WSAGetLastError()) { case WSAEACCES: return EACCES; @@ -175,11 +175,11 @@ return 0; #endif } -#ifndef __wii__ +#ifndef OF_WII int of_getsockname(of_socket_t socket, struct sockaddr *restrict address, socklen_t *restrict address_len) { int ret;