aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/tcpclient.c2
-rw-r--r--net/tcpserver.c2
-rw-r--r--net/udpreceive~.c6
-rw-r--r--net/udpsend~.c8
4 files changed, 9 insertions, 9 deletions
diff --git a/net/tcpclient.c b/net/tcpclient.c
index 3677dde..dc48fc5 100644
--- a/net/tcpclient.c
+++ b/net/tcpclient.c
@@ -34,7 +34,7 @@
#include <sys/types.h>
#include <string.h>
#include <pthread.h>
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
#include <sys/socket.h>
#include <sys/errno.h>
#include <netinet/in.h>
diff --git a/net/tcpserver.c b/net/tcpserver.c
index 837ea26..b7cc254 100644
--- a/net/tcpserver.c
+++ b/net/tcpserver.c
@@ -35,7 +35,7 @@
#include <sys/types.h>
#include <stdio.h>
#include <pthread.h>
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
diff --git a/net/udpreceive~.c b/net/udpreceive~.c
index 75b5996..86a7f08 100644
--- a/net/udpreceive~.c
+++ b/net/udpreceive~.c
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
@@ -67,7 +67,7 @@
#define DEFAULT_NETWORK_POLLTIME 1 /* interval in ms for polling for input data (Max/MSP only) */
#define DEFAULT_QUEUE_LENGTH 3 /* min. number of buffers that can be used reliably on your hardware */
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
#define CLOSESOCKET(fd) close(fd)
#endif
#ifdef _WIN32
@@ -865,7 +865,7 @@ static int udpreceive_tilde_sockerror(char *s)
#ifdef _WIN32
if (err == WSAEWOULDBLOCK)
#endif
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
if (err == EAGAIN)
#endif
{
diff --git a/net/udpsend~.c b/net/udpsend~.c
index 2c56d8c..5846524 100644
--- a/net/udpsend~.c
+++ b/net/udpsend~.c
@@ -39,7 +39,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
@@ -887,7 +887,7 @@ static void *udpsend_tilde_new(t_floatarg inlets, t_floatarg blocksize)
x->x_cbufsize = x->x_blocksize * sizeof(t_float) * x->x_ninlets;
x->x_cbuf = (char *)t_getbytes(x->x_cbufsize);
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
/* we don't want to get signaled in case send() fails */
signal(SIGPIPE, SIG_IGN);
#endif
@@ -990,7 +990,7 @@ static int udpsend_tilde_sockerror(char *s)
#ifdef _WIN32
if (err == WSAEWOULDBLOCK)
#endif
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
if (err == EAGAIN)
#endif
{
@@ -1001,7 +1001,7 @@ static int udpsend_tilde_sockerror(char *s)
static void udpsend_tilde_closesocket(int fd)
{
-#if defined(UNIX) || defined(unix)
+#ifndef _WIN32
close(fd);
#endif
#ifdef _WIN32