AP_FN_ATTR_WARN_UNUSED_RESULT
AP_FN_ATTR_ALLOC_SIZE(2);
+#if APR_HAS_THREADS
+
#if APR_VERSION_AT_LEAST(1,8,0)
/**
#define ap_thread_current apr_thread_current
#define ap_thread_current_create apr_thread_current_create
-#else /* !APR_VERSION_AT_LEAST(1,8,0) */
+#else /* !APR_VERSION_AT_LEAST(1,8,0) */
-#if APR_HAS_THREADS
/**
* AP_THREAD_LOCAL keyword mapping the compiler's.
*/
#elif defined(WIN32) && defined(_MSC_VER)
#define AP_THREAD_LOCAL __declspec(thread)
#endif
-#endif /* APR_HAS_THREADS */
#ifndef AP_THREAD_LOCAL
#define AP_HAS_THREAD_LOCAL 0
#endif /* !APR_VERSION_AT_LEAST(1,8,0) */
+#else /* !APR_HAS_THREADS */
+
+#define AP_HAS_THREAD_LOCAL 0
+
+#endif /* !APR_HAS_THREADS */
+
/**
* Get server load params
* @param ld struct to populate: -1 in fields means error
return p;
}
-#if !APR_VERSION_AT_LEAST(1,8,0)
+#if APR_HAS_THREADS && !APR_VERSION_AT_LEAST(1,8,0)
#if AP_HAS_THREAD_LOCAL
struct thread_ctx {