Revert 1792965, 1792964, 1792962 (r1792961, r1792963 on trunk), was;

pthread_mutex_timedlock is broken on Solaris 10.
It can block without timeout in case of EDEADLK.
On Solaris 8 it does not exist, on Solaris 11
it is fixed. For Solaris 10 no patch is available.

Silence compiler warning "defined but not used"




git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1796066 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
index fd3d33d..549a2db 100644
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -237,11 +237,6 @@
     *-solaris2*)
     	PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
 	APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT])
-        if test $PLATOSVERS -eq 10; then
-            # pthread_mutex_timedlock is broken on Solaris 10.
-            # It can block without timeout in case of EDEADLK.
-            APR_SETIFNULL(ac_cv_func_pthread_mutex_timedlock, [no])
-        fi
         if test $PLATOSVERS -ge 10; then
             APR_SETIFNULL(apr_lock_method, [USE_PROC_PTHREAD_SERIALIZE])
         else
diff --git a/test/testlock.c b/test/testlock.c
index ee63a56..a36720b 100644
--- a/test/testlock.c
+++ b/test/testlock.c
@@ -183,7 +183,6 @@
     ABTS_INT_EQUAL(tc, MAX_ITER, x);
 }
 
-#if APR_HAS_TIMEDLOCKS
 static void test_thread_timedmutex(abts_case *tc, void *data)
 {
     apr_thread_t *t1, *t2, *t3, *t4;
@@ -215,7 +214,6 @@
 
     ABTS_INT_EQUAL(tc, MAX_ITER, x);
 }
-#endif
 
 static void test_thread_rwlock(abts_case *tc, void *data)
 {
@@ -344,7 +342,6 @@
                        apr_thread_cond_destroy(timeout_cond));
 }
 
-#if APR_HAS_TIMEDLOCKS
 static void test_timeoutmutex(abts_case *tc, void *data)
 {
     apr_status_t s;
@@ -376,7 +373,6 @@
     APR_ASSERT_SUCCESS(tc, "Unable to destroy the mutex",
                        apr_thread_mutex_destroy(timeout_mutex));
 }
-#endif
 
 #endif /* !APR_HAS_THREADS */