changeset 28014:e54712304c3e

Move PTHREAD_CACHE define logic to configure.
author reimar
date Fri, 28 Nov 2008 17:04:36 +0000
parents 57a075738b24
children 94cf4a9270cb
files configure stream/cache2.c
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Fri Nov 28 15:26:36 2008 +0000
+++ b/configure	Fri Nov 28 17:04:36 2008 +0000
@@ -715,6 +715,7 @@
 _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 @@
 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"
--- a/stream/cache2.c	Fri Nov 28 15:26:36 2008 +0000
+++ b/stream/cache2.c	Fri Nov 28 17:04:36 2008 +0000
@@ -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__)