aboutsummaryrefslogtreecommitdiff
path: root/signal
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-12-27 18:34:56 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-12-27 18:34:56 +0000
commitbfd32981f084b9f637b176bd086bc1debade56fd (patch)
tree967fd136666d4edd1c3a8868329b80b502f4f251 /signal
parente33b797ffa137522d3bcf8af53a9fa3dd0d2f730 (diff)
the included sys_* functions are different than the ones in s_stuff.h, so use them instead of the standard Pd ones
svn path=/trunk/externals/ggee/; revision=12847
Diffstat (limited to 'signal')
-rw-r--r--signal/streamin~.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/signal/streamin~.c b/signal/streamin~.c
index fcb8084..c2a4f7d 100644
--- a/signal/streamin~.c
+++ b/signal/streamin~.c
@@ -3,7 +3,6 @@
/* Thanks to Anthony Lee for Windows bug fixes */
#include <m_pd.h>
-#include <s_stuff.h>
#include "stream.h"
#include <sys/types.h>
@@ -48,17 +47,17 @@
#ifdef _WIN32
extern int close(int);
+#endif
extern void sys_rmpollfn(int fd);
extern sys_addpollfn(int fd, void* fn, void *ptr);
-#endif
static void sys_sockerror(char *s)
{
-#ifdef unix
- int err = errno;
-#else
+#ifdef _WIN32
int err = WSAGetLastError();
if (err == 10054) return;
+#else
+ int err = errno;
#endif
post("%s: %s (%d)\n", s, strerror(err), err);
}
@@ -66,18 +65,17 @@ static void sys_sockerror(char *s)
static void sys_closesocket(int fd)
{
-#ifdef UNIX
- close(fd);
-#endif
#ifdef _WIN32
closesocket(fd);
+#else
+ close(fd);
#endif
}
int setsocketoptions(int sockfd)
{
-#ifdef unix
+#ifndef _WIN32
int sockopt = 1;
if (setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (const char*) &sockopt, sizeof(int)) < 0)
{