summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <joerg@mysql.com>2006-03-10 21:05:10 +0100
committerunknown <joerg@mysql.com>2006-03-10 21:05:10 +0100
commit1b9b17c33e266bfc13d61a29f451cf64d5494f3e (patch)
tree1676781dbf3f3f965f10aa509bc9df4e9c25c4fb /include
parentf8e9e29ff287c893762f6f825a20cd5a9558115a (diff)
parent2722db6dd45f3084f8f5dd5966474274dba798f3 (diff)
downloadmariadb-git-1b9b17c33e266bfc13d61a29f451cf64d5494f3e.tar.gz
Merge mysql.com:/M50/mysql-5.0 into mysql.com:/M51/mysql-5.1
Diffstat (limited to 'include')
-rw-r--r--include/my_no_pthread.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/include/my_no_pthread.h b/include/my_no_pthread.h
index 2c9cde65e78..5691de08783 100644
--- a/include/my_no_pthread.h
+++ b/include/my_no_pthread.h
@@ -14,15 +14,34 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#if !defined(_my_no_pthread_h) && !defined(THREAD)
+#define _my_no_pthread_h
+
+
+/*
+ This block is to access some thread-related type definitions
+ even in builds which do not need thread functions,
+ as some variables (based on these types) are declared
+ even in non-threaded builds.
+ Case in point: 'mf_keycache.c'
+*/
+#if defined(__WIN__) || defined(OS2)
+
+#elif defined(HAVE_UNIXWARE7_THREADS)
+/* #include <thread.h> Currently, not relevant. Enable if needed. */
+
+#else /* Normal threads */
+#include <pthread.h>
+
+#endif /* defined(__WIN__) */
+
+
/*
This undefs some pthread mutex locks when one isn't using threads
to make thread safe code, that should also work in single thread
environment, easier to use.
*/
-
-#if !defined(_my_no_pthread_h) && !defined(THREAD)
-#define _my_no_pthread_h
-
#define pthread_mutex_init(A,B)
#define pthread_mutex_lock(A)
#define pthread_mutex_unlock(A)
@@ -32,4 +51,5 @@
#define rw_wrlock(A)
#define rw_unlock(A)
#define rwlock_destroy(A)
+
#endif