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 | 23da6252985418ada3083303f3847817a23044fb (patch) | |
tree | d61f874b6efa3c648ec7957c940fd35ca5290fc9 | |
parent | 8dd384ea4f00ebe9f99297fc4072aa6cb19dec76 (diff) |
added UNIX and unix defines
svn path=/trunk/externals/ext13/; revision=451
-rw-r--r-- | streamin13~.c | 8 | ||||
-rw-r--r-- | streamout13~.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/streamin13~.c b/streamin13~.c index bf7eafb..41422ee 100644 --- a/streamin13~.c +++ b/streamin13~.c @@ -5,7 +5,7 @@ #include <sys/types.h> #include <string.h> -#ifdef UNIX +#if defined(UNIX) || defined(unix) #include <sys/socket.h> #include <sys/errno.h> #include <netinet/in.h> @@ -31,7 +31,7 @@ static void sys_sockerror(char *s) { -#ifdef UNIX +#if defined(UNIX) || defined(unix) int err = errno; #else int err = WSAGetLastError(); @@ -43,7 +43,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 @@ -106,7 +106,7 @@ static int streamin13_listen(t_streamin13 *x,int portno) server.sin_family = AF_INET; server.sin_addr.s_addr = INADDR_ANY; - #ifdef UNIX + #if defined(UNIX) || defined(unix) if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) post("setsockopt failed\n"); #endif diff --git a/streamout13~.c b/streamout13~.c index 7ce7681..22ad6f8 100644 --- a/streamout13~.c +++ b/streamout13~.c @@ -3,7 +3,7 @@ #include <sys/types.h> #include <string.h> -#ifdef UNIX +#if defined(UNIX) || defined(unix) #include <sys/errno.h> #include <sys/socket.h> #include <netinet/in.h> @@ -23,7 +23,7 @@ static void sys_sockerror(char *s) { -#ifdef UNIX +#if defined(UNIX) || defined(unix) int err = errno; #else int err = WSAGetLastError(); @@ -36,7 +36,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 |