generic-64bit-atomics

# quick and dirty fix for FTBFS on mipsel
# There should be a proper configure check, see 
# https://bz.apache.org/bugzilla/show_bug.cgi?id=63566

Gbp-Pq: Name generic-64bit-atomics.patch
This commit is contained in:
OpenKylin Developers 2023-01-16 15:55:44 +08:00 committed by zhouganqing
parent e65583f8c1
commit 1871ed3f97
3 changed files with 8 additions and 1 deletions

View File

@ -20,7 +20,11 @@
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{ {
#if defined (NEED_ATOMICS_GENERIC64)
return apr__atomic_generic64_init(p);
#else
return APR_SUCCESS; return APR_SUCCESS;
#endif
} }
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)

View File

@ -16,7 +16,7 @@
#include "apr_arch_atomic.h" #include "apr_arch_atomic.h"
#ifdef USE_ATOMICS_BUILTINS #if defined(USE_ATOMICS_BUILTINS) && ! defined(NEED_ATOMICS_GENERIC64)
APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem) APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
{ {

View File

@ -26,6 +26,9 @@
/* noop */ /* noop */
#elif HAVE_ATOMIC_BUILTINS #elif HAVE_ATOMIC_BUILTINS
# define USE_ATOMICS_BUILTINS # define USE_ATOMICS_BUILTINS
# if (__INTPTR_WIDTH__ == 32) && ( defined(__MIPSEL__) || defined(__powerpc__) ) || defined(__m68k__) || defined(__sh__)
# define NEED_ATOMICS_GENERIC64
# endif
#elif defined(SOLARIS2) && SOLARIS2 >= 10 #elif defined(SOLARIS2) && SOLARIS2 >= 10
# define USE_ATOMICS_SOLARIS # define USE_ATOMICS_SOLARIS
# define NEED_ATOMICS_GENERIC64 # define NEED_ATOMICS_GENERIC64