This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Boostrap failure on i686-apple-darwin9 at revision 139725
Hi again,
I'm going to prepare and test on Darwin the trivial patch, if it fixes
the bootstrap failure I will post and commit it as obvious.
this is what I eventually committed. Apologies again for the breakage.
Paolo.
///////////////
2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
* gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix
rule that a symbolic constant must be defined and >= 0 for the
corresponding facility to be present at compile-time.
* gthr-posix.c: Likewise.
Index: gthr-posix.c
===================================================================
--- gthr-posix.c (revision 139737)
+++ gthr-posix.c (working copy)
@@ -112,12 +112,14 @@
}
#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
int
pthread_mutex_timedlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED,
const struct timespec *abs_timeout ATTRIBUTE_UNUSED)
{
return 0;
}
+#endif
#endif /* _POSIX_TIMEOUTS */
int
Index: gthr-posix.h
===================================================================
--- gthr-posix.h (revision 139737)
+++ gthr-posix.h (working copy)
@@ -104,7 +104,9 @@
__gthrw3(pthread_mutex_lock)
__gthrw3(pthread_mutex_trylock)
#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
__gthrw3(pthread_mutex_timedlock)
+#endif
#endif /* _POSIX_TIMEOUTS */
__gthrw3(pthread_mutex_unlock)
__gthrw3(pthread_mutex_init)
@@ -131,7 +133,9 @@
__gthrw(pthread_mutex_lock)
__gthrw(pthread_mutex_trylock)
#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
__gthrw(pthread_mutex_timedlock)
+#endif
#endif /* _POSIX_TIMEOUTS */
__gthrw(pthread_mutex_unlock)
__gthrw(pthread_mutex_init)
@@ -768,6 +772,7 @@
}
#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
static inline int
__gthread_mutex_timedlock (__gthread_mutex_t *mutex,
const __gthread_time_t *abs_timeout)
@@ -778,6 +783,7 @@
return 0;
}
#endif
+#endif
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *mutex)
@@ -823,6 +829,7 @@
}
#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
static inline int
__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *mutex,
const __gthread_time_t *abs_timeout)
@@ -830,6 +837,7 @@
return __gthread_mutex_timedlock (mutex, abs_timeout);
}
#endif
+#endif
static inline int
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)