From b13e2d6c3a525918ed0816c41433509477c9912a Mon Sep 17 00:00:00 2001
From: Hans-Christoph Steiner <eighthave@users.sourceforge.net>
Date: Fri, 9 Dec 2005 06:25:59 +0000
Subject: updated things for the new build system while maintaining backwords
 compatibilty

svn path=/trunk/externals/unauthorized/; revision=4173
---
 speex~/speexin~.c     | 13 +++++++++----
 speex~/speexin~.libs  |  1 +
 speex~/speexout~.c    | 16 ++++++++++------
 speex~/speexout~.libs |  1 +
 4 files changed, 21 insertions(+), 10 deletions(-)
 create mode 100644 speex~/speexin~.libs
 create mode 100644 speex~/speexout~.libs

(limited to 'speex~')

diff --git a/speex~/speexin~.c b/speex~/speexin~.c
index 1db6dbd..786a9e7 100644
--- a/speex~/speexin~.c
+++ b/speex~/speexin~.c
@@ -33,7 +33,9 @@
 #include <sys/types.h>
 #include <string.h>
 #include <stdlib.h>
-#ifdef UNIX
+#ifdef WIN32
+#include <winsock.h>
+#else
 #include <sys/socket.h>
 #include <errno.h>
 #include <netinet/in.h>
@@ -45,14 +47,17 @@
 #include <fcntl.h>
 #include <stdio.h>
 #define SOCKET_ERROR -1
-#else
-#include <winsock.h>
+#endif
+
+#if defined(__APPLE__) || defined(WIN32)
+#define MSG_NOSIGNAL 0
+#define SOL_TCP IPPROTO_TCP
 #endif
 
 #include <speex/speex.h>        /* speex decoder stuff */
 #include <speex/speex_bits.h>   /* speex decoder stuff */
 
-#ifdef NT
+#ifdef _MSC_VER
 #pragma warning( disable : 4244 )
 #pragma warning( disable : 4305 )
 #endif
diff --git a/speex~/speexin~.libs b/speex~/speexin~.libs
new file mode 100644
index 0000000..eaefc44
--- /dev/null
+++ b/speex~/speexin~.libs
@@ -0,0 +1 @@
+-lspeex
diff --git a/speex~/speexout~.c b/speex~/speexout~.c
index c6968d9..2d2c104 100644
--- a/speex~/speexout~.c
+++ b/speex~/speexout~.c
@@ -47,7 +47,12 @@
 #include <malloc.h>
 #endif
 #include <ctype.h>
-#ifdef UNIX
+#ifdef WIN32
+#include <io.h>
+#include <windows.h>
+#include <winsock.h>
+#include <windef.h>
+#else
 #include <unistd.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -55,11 +60,10 @@
 #include <time.h>
 #include <sys/time.h>
 #define SOCKET_ERROR -1
-#else
-#include <io.h>
-#include <windows.h>
-#include <winsock.h>
-#include <windef.h>
+#endif
+
+#if defined(__APPLE__) || defined(WIN32)
+#define MSG_NOSIGNAL 0
 #endif
 
 #include <speex/speex.h>        /* speex codec stuff */ 
diff --git a/speex~/speexout~.libs b/speex~/speexout~.libs
new file mode 100644
index 0000000..eaefc44
--- /dev/null
+++ b/speex~/speexout~.libs
@@ -0,0 +1 @@
+-lspeex
-- 
cgit v1.2.1