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 /net/udpsend~.c | |
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
Diffstat (limited to 'net/udpsend~.c')
-rw-r--r-- | net/udpsend~.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 |