diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2003-03-03 20:39:47 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2003-03-03 20:39:47 +0000 |
commit | 7a64609c793d1ab2a1512adc353acc10f3eaa87a (patch) | |
tree | 0b80e2709e255410b0283f73342d1d67f740528b /src | |
parent | 80929a20e07d36abe421ea4cc3bdad760ccb89fa (diff) |
added UNIX and unix defines
svn path=/trunk/externals/maxlib/; revision=451
Diffstat (limited to 'src')
-rw-r--r-- | src/netclient.c | 8 | ||||
-rw-r--r-- | src/netdist.c | 6 | ||||
-rw-r--r-- | src/netrec.c | 2 | ||||
-rw-r--r-- | src/netserver.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/netclient.c b/src/netclient.c index 7ad252f..0503b97 100644 --- a/src/netclient.c +++ b/src/netclient.c @@ -29,7 +29,7 @@ #include <sys/types.h>
#include <string.h>
#include <pthread.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <sys/errno.h>
#include <netinet/in.h>
@@ -71,7 +71,7 @@ static void sys_sockerror(char *s) int err = WSAGetLastError();
if (err == 10054) return;
#endif
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
int err = errno;
#endif
post("%s: %s (%d)\n", s, strerror(err), err);
@@ -79,7 +79,7 @@ static void sys_sockerror(char *s) static void sys_closesocket(int fd) {
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
close(fd);
#endif
#ifdef NT
@@ -345,4 +345,4 @@ void netclient_setup(void) class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("receive"), 0);
class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("rcv"), 0);
class_sethelpsymbol(netclient_class, gensym("maxlib/help-netclient.pd"));
-}
\ No newline at end of file +}
diff --git a/src/netdist.c b/src/netdist.c index 4f91c2d..12a2e9d 100644 --- a/src/netdist.c +++ b/src/netdist.c @@ -29,7 +29,7 @@ #include <sys/types.h>
#include <string.h>
#include <pthread.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <sys/errno.h>
#include <netinet/in.h>
@@ -67,7 +67,7 @@ static void sys_sockerror(char *s) int err = WSAGetLastError();
if (err == 10054) return;
#endif
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
int err = errno;
#endif
post("%s: %s (%d)\n", s, strerror(err), err);
@@ -75,7 +75,7 @@ static void sys_sockerror(char *s) static void sys_closesocket(int fd) {
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
close(fd);
#endif
#ifdef NT
diff --git a/src/netrec.c b/src/netrec.c index 0b5d87e..ca89ccb 100644 --- a/src/netrec.c +++ b/src/netrec.c @@ -31,7 +31,7 @@ #include <errno.h>
#include <string.h>
#include <stdio.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
diff --git a/src/netserver.c b/src/netserver.c index 19cf6d4..97c3a5c 100644 --- a/src/netserver.c +++ b/src/netserver.c @@ -33,7 +33,7 @@ #include <string.h>
#include <stdio.h>
#include <pthread.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
|