diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-12-12 06:39:39 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-12-12 06:39:39 +0000 |
commit | 136893562488e6c767f786f9d94e5122adf78a28 (patch) | |
tree | c1251dc36a4780e00d4a4c60152b699d62f99c1e /oggcast~ | |
parent | a92ce7afde71bf40294475a94d5ef33ccf991fbb (diff) |
fixes for MinGW
svn path=/trunk/externals/pdogg/; revision=4194
Diffstat (limited to 'oggcast~')
-rw-r--r-- | oggcast~/oggcast~.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/oggcast~/oggcast~.c b/oggcast~/oggcast~.c index ae25aed..15253e4 100644 --- a/oggcast~/oggcast~.c +++ b/oggcast~/oggcast~.c @@ -38,7 +38,11 @@ #include <errno.h>
#include <fcntl.h>
#include <pthread.h>
-#ifdef UNIX
+#ifdef WIN32
+#include <io.h> /* for 'write' in pute-function only */
+#include <winsock.h>
+#include <winbase.h>
+#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -47,24 +51,19 @@ #include <sys/time.h>
#include <unistd.h>
#define SOCKET_ERROR -1
-#else
-#include <io.h> /* for 'write' in pute-function only */
-#include <winsock.h>
-#include <winbase.h>
#endif
-#ifdef NT
+#ifdef _MSC_VER
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
-#ifdef UNIX
-#define sys_closesocket close
-#define pdogg_strdup(s) strdup(s)
-#endif
-#ifdef NT
+#ifdef WIN32
#define sys_closesocket closesocket
#define pdogg_strdup(s) _strdup(s)
+#else
+#define sys_closesocket close
+#define pdogg_strdup(s) strdup(s)
#endif
/************************* oggcast~ object ******************************/
|