summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-28 17:04:36 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-28 17:04:36 +0000
commitbd7e915bf50b24b8a1316ad99667d01e7175087a (patch)
tree7d48c64f95be0fd502098cd31cfad1397474797c
parentcdf2023d98244e78b312dab817c5eb5958ce5a3f (diff)
downloadmpv-bd7e915bf50b24b8a1316ad99667d01e7175087a.tar.bz2
mpv-bd7e915bf50b24b8a1316ad99667d01e7175087a.tar.xz
Move PTHREAD_CACHE define logic to configure.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28048 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-xconfigure10
-rw-r--r--stream/cache2.c4
2 files changed, 10 insertions, 4 deletions
diff --git a/configure b/configure
index 5ebe3bcdc2..4efb46e837 100755
--- a/configure
+++ b/configure
@@ -715,6 +715,7 @@ _rpath=no
_asmalign_pot=auto
_stream_cache=yes
_def_stream_cache="#define CONFIG_STREAM_CACHE 1"
+_def_pthread_cache="#undef PTHREAD_CACHE"
_need_shmem=yes
for ac_option do
case "$ac_option" in
@@ -3136,6 +3137,15 @@ else
fi
echores "$_pthreads"
+if cygwin ; then
+ if test "$_pthreads" = yes ; then
+ _def_pthread_cache="#define PTHREAD_CACHE 1"
+ else
+ _stream_cache=no
+ _def_stream_cache="#undef CONFIG_STREAM_CACHE"
+ fi
+fi
+
echocheck "w32threads"
if test "$_pthreads" = yes ; then
_res_comment="using pthread instead"
diff --git a/stream/cache2.c b/stream/cache2.c
index f84d221e13..d211ba483b 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -16,10 +16,6 @@
#include <sys/types.h>
#include <unistd.h>
-#ifdef __CYGWIN__
-#define PTHREAD_CACHE 1
-#endif
-
#include "osdep/shmem.h"
#include "osdep/timer.h"
#if defined(__MINGW32__)