[Asterisk-cvs] asterisk/include/asterisk lock.h,1.42,1.43
kpfleming
kpfleming
Thu Nov 10 19:30:56 CST 2005
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv10521/include/asterisk
Modified Files:
lock.h
Log Message:
issue #5668, modified to compile on non-Cygwin platforms :-)
Index: lock.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/lock.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- lock.h 8 Nov 2005 03:54:04 -0000 1.42
+++ lock.h 11 Nov 2005 00:21:42 -0000 1.43
@@ -36,13 +36,9 @@
#ifdef __APPLE__
/* Provide the Linux initializers for MacOS X */
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
-#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { 0x4d555458, \
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
- 0x20 } }
-#endif
-
-#ifdef __CYGWIN__
-#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { 0x4d555458, \
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0x20 } }
#endif
#ifdef BSD
@@ -55,7 +51,11 @@
/* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes
and will not run without them. */
-#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#if defined(__CYGWIN__)
+#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+#define PTHREAD_MUTEX_INIT_VALUE (ast_mutex_t)18
+#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
#define PTHREAD_MUTEX_INIT_VALUE PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP
#else
More information about the svn-commits
mailing list