aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-18 18:44:38 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-18 18:44:38 +0000
commita86568ced67ce349ccbe8dda33bdc893587c1db2 (patch)
tree0de35a7da91d2a2f497ef075ba3f3e086684cfa7 /include
parent4b2a73468293727319f34ea606a4a2b3d759e0f8 (diff)
Fix a build problem on Mac OS X with DEBUG_THREADS enabled.
This set of changes was already in trunk. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@271339 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/autoconfig.h.in55
-rw-r--r--include/asterisk/lock.h32
2 files changed, 41 insertions, 46 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index fa883c472..cf000a1f4 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -10,6 +10,10 @@
/* Define to 1 if internal poll should be used. */
#undef AST_POLL_COMPAT
+/* Define to 1 if the implementation of mutexes supports comparison of a mutex
+ to its initializer. */
+#undef CAN_COMPARE_MUTEX_TO_INIT_VALUE
+
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID
@@ -463,7 +467,7 @@
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
+/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
/* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -652,12 +656,12 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if the C compiler supports function prototypes. */
-#undef PROTOTYPES
-
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
@@ -677,11 +681,6 @@
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
-/* Define to 1 if the `setvbuf' function takes the buffering type as its
- second argument and the buffer pointer as the third, as on System V before
- release 3. */
-#undef SETVBUF_REVERSED
-
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
@@ -702,20 +701,30 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
-/* Define to 1 if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
+/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
@@ -733,20 +742,6 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
-/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
-
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 32a36cacd..ff217a1e1 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -260,7 +260,7 @@ static inline int __ast_pthread_mutex_init(int track, const char *filename, int
int res;
pthread_mutexattr_t attr;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
/*
@@ -296,7 +296,7 @@ static inline int __ast_pthread_mutex_destroy(const char *filename, int lineno,
int res;
int canlog = strcmp(filename, "logger.c") & t->track;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
/* Don't try to uninitialize non initialized mutex
* This may no effect on linux
@@ -354,7 +354,7 @@ static inline int __ast_pthread_mutex_lock(const char *filename, int lineno, con
int res;
int canlog = strcmp(filename, "logger.c") & t->track;
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
/* Don't warn abount uninitialized mutex.
* Simple try to initialize it.
@@ -442,7 +442,7 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno,
int res;
int canlog = strcmp(filename, "logger.c") & t->track;
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
/* Don't warn abount uninitialized mutex.
* Simple try to initialize it.
@@ -488,7 +488,7 @@ static inline int __ast_pthread_mutex_unlock(const char *filename, int lineno, c
int res;
int canlog = strcmp(filename, "logger.c") & t->track;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
filename, lineno, func, mutex_name);
@@ -567,7 +567,7 @@ static inline int __ast_cond_wait(const char *filename, int lineno, const char *
int res;
int canlog = strcmp(filename, "logger.c") & t->track;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
filename, lineno, func, mutex_name);
@@ -638,7 +638,7 @@ static inline int __ast_cond_timedwait(const char *filename, int lineno, const c
int res;
int canlog = strcmp(filename, "logger.c") & t->track;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
filename, lineno, func, mutex_name);
@@ -862,7 +862,7 @@ static inline int __ast_rwlock_init(const char *filename, int lineno, const char
{
int res;
pthread_rwlockattr_t attr;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(filename, "logger.c");
if (*prwlock != ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -889,7 +889,7 @@ static inline int __ast_rwlock_destroy(const char *filename, int lineno, const c
int res;
int canlog = strcmp(filename, "logger.c");
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
if (*prwlock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
__ast_mutex_logger("%s line %d (%s): Warning: rwlock '%s' is uninitialized.\n",
filename, lineno, func, rwlock_name);
@@ -911,7 +911,7 @@ static inline int _ast_rwlock_unlock(ast_rwlock_t *lock, const char *name,
const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -938,7 +938,7 @@ static inline int _ast_rwlock_rdlock(ast_rwlock_t *lock, const char *name,
const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -971,7 +971,7 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *lock, const char *name,
const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -1004,7 +1004,7 @@ static inline int _ast_rwlock_timedrdlock(ast_rwlock_t *lock, const char *name,
const struct timespec *abs_timeout, const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -1053,7 +1053,7 @@ static inline int _ast_rwlock_timedwrlock(ast_rwlock_t *lock, const char *name,
const struct timespec *abs_timeout, const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -1102,7 +1102,7 @@ static inline int _ast_rwlock_tryrdlock(ast_rwlock_t *lock, const char *name,
const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {
@@ -1135,7 +1135,7 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *lock, const char *name,
const char *file, int line, const char *func)
{
int res;
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
int canlog = strcmp(file, "logger.c");
if (*lock == ((ast_rwlock_t) AST_RWLOCK_INIT_VALUE)) {