diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-21 20:37:09 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-21 20:37:09 +0000 |
commit | 9fdee08447854f52b81017e7659d86fd94311e8e (patch) | |
tree | 02c78514fb779ee193d8d5c38285eb2904d678fe | |
parent | b260314ec33edf6e7af5d9981b8cc8b0c8a32c6e (diff) |
use auto-macro _WIN32 instead of Pd-defined macro UNIX, this means the build system doesn't need to set any macros to work properly
svn path=/trunk/externals/mrpeach/; revision=15636
-rw-r--r-- | net/tcpclient.c | 2 | ||||
-rw-r--r-- | net/tcpserver.c | 2 | ||||
-rw-r--r-- | net/udpreceive~.c | 6 | ||||
-rw-r--r-- | net/udpsend~.c | 8 |
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 |