On 5/1/07, Curt Arnold <[EMAIL PROTECTED]> wrote:
apr_thread_pool.c did not appear in the VC6 project in 1.2.8, but has
been added in the SVN HEAD and it fails to compile under VC6 in debug
mode due to a C++ style variable declaration. The following change
fixes the compile error.
Shouldn't the moved variable be in conditionals too? This will
introduce a warning when *not* compiling with NDEBUG, right?
bye,
Erik.
Index: apr_thread_pool.c
===================================================================
--- apr_thread_pool.c (revision 534087)
+++ apr_thread_pool.c (working copy)
@@ -595,6 +595,7 @@
static void wait_on_busy_threads(apr_thread_pool_t * me, void *owner)
{
+ apr_os_thread_t *os_thread;
struct apr_thread_list_elt *elt;
apr_thread_mutex_lock(me->lock);
elt = APR_RING_FIRST(me->busy_thds);
@@ -605,7 +606,6 @@
}
#ifndef NDEBUG
/* make sure the thread is not the one calling tasks_cancel */
- apr_os_thread_t *os_thread;
apr_os_thread_get(&os_thread, elt->thd);
#ifdef WIN32
/* hack for apr win32 bug */