| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/thread-name@1902353 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
support.
* threadproc/unix/thread.c
(apr_thread_name_set, apr_thread_name_get): Return APR_ENOTIMPL if not
HAVE_PTHREAD_SETNAME_NP.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/thread-name@1902352 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/thread-name@1902326 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
API to get/set thread name.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/thread-name@1902297 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/thread-name@1902296 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902295 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902294 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902293 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902292 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902286 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
(try 2).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902285 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902284 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
popup message box on Windows.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902283 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902282 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check that the given sources can be encoded without overflowing.
Return APR_EINVAL if the given "slen" is negative, APR_NOTFOUND if "dest" is
not NULL and "src" is NULL, or APR_ENOSPC if "dest" is NULL and the source
length (based on "slen" or APR_ENCODE_STRING) is too big to encode.
* include/private/apr_encode_private.h():
Rename ENCODE_TO_ASCII() and ENCODE_TO_NATIVE() to respectively TO_ASCII()
and TO_ENCODE(), and make them return an unsigned char.
* encoding/apr_escape.c():
Use the new TO_ASCII() and TO_NATIVE().
* encoding/apr_encode.c(apr_encode_*, apr_decode_*):
Forbid negative "slen" but APR_ENCODE_STRING, and use apr_size_t arithmetics
to check for overflows when encoding.
When "dest" is NULL, "src" can be NULL too.
Better check for trailing '='s or base16's APR_ENCODE_COLON ':' separators.
Rename ENCODE_TO_ASCII and ENCODE_TO_NATIVE to their new names, and remove
casts to (unsigned char) now unnecessary.
* include/apr_encode.h():
Update dox about acceptable inputs and returned errors.
* test/testencode.c():
Tests for error conditions.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902281 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
* CHANGES: Add changelog entry.
* threadproc/win32/thread.c
(apr_thread_create): Create suspended thread, initialize apr_thread_t->td
and only after that resume thread.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902277 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testshm.h():
Move (APR_INLINE) common msgput/msgwait() functions there.
* test/testshm.h(msgput, msgwait):
Use atomics (cas) to prevent producer and consumer from writing to
the same box.
* testshm.c, testshmconsumer.c, testshmproducer.c:
Use common helpers.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902267 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some 32bit platforms provide 32bit but not 64bit atomics, detect and
distinctly set/use HAVE_ATOMIC_BUILTINS/HAVE_ATOMIC_BUILTINS64 and
USE_ATOMICS_BUILTINS/USE_ATOMICS_BUILTINS64.
These platforms NEED_ATOMICS_GENERIC64 as 64bit implementation.
* configure.in():
Use stdint.h's uint{32,64}_t as atomic type for testing atomic builtins
when available, otherwise "unsigned int" for 32bit testing and
"unsigned long long" as 64bit.
* configure.in():
AC_TRY_RUN each 32bit and 64bit type separately, the former determining
HAVE_ATOMIC_BUILTINS and the latter HAVE_ATOMIC_BUILTINS64.
* include/arch/unix/apr_arch_atomic.h():
Define USE_ATOMICS_BUILTINS64 when HAVE_ATOMIC_BUILTINS64, otherise
define NEED_ATOMICS_GENERIC64
* include/arch/unix/apr_arch_atomic.h():
Check defined(__powerpc__) for USE_ATOMICS_PPC.
* atomic/unix/builtins64.c():
Implement for USE_ATOMICS_BUILTINS64 only.
BZ 63566.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902266 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Round to upper milliseconds when converting from microseconds.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902263 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Both 32 and 64 bit InterlockedCompareExchangePointer() seem to have the same
API, so be it..
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902259 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Don't convert timeout to milliseconds before potentially callig apr_sleep().
Tests for "poll() didn't sleep" now use the real timeout as lower limit.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902258 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* atomic/os390/atomic.c(apr_atomic_xchgptr):
Dereferencing without casting is fine/better.
* atomic/unix/mutex.c(apr_atomic_casptr, apr_atomic_xchgptr):
Dereferencing without casting is fine/better.
* atomic/win32/apr_atomic.c(apr_atomic_add32, apr_atomic_sub32,
apr_atomic_inc32, apr_atomic_dev32,
apr_atomic_set32, apr_atomic_cas32,
apr_atomic_xchg32):
Native Interlocked 32bit functions expect "long volatile *",
don't cast out volatility.
* atomic/win32/apr_atomic.c(apr_atomic_casptr):
32bit InterlockedCompareExchangePointer() expects "long volatile *",
don't cast to (void **).
* atomic/win32/apr_atomic.c(apr_atomic_xchgptr):
InterlockedExchangePointer() for both 32bit and 64bit expects
"void *volatile *", no need to cast.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902257 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
When converting appr_interval_time_t (usecs) to system call's msecs, round up.
apr_*poll() calls should wait *at least* the given timeout, not less.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902236 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atomic/unix/builtins.c:117:38: warning: passing 'void **' to parameter of type 'volatile void **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
__atomic_compare_exchange_n(mem, (void **)&cmp, ptr, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
^~~~~~~~~~~~~
This warning is weird, because 'volatile void **' is not a thing usually, it
happens on macos in apr-1.x, where apr_atomic_casptr() is (ill-)defined as:
APR_DECLARE(void*) apr_atomic_casptr(volatile void **mem, void *ptr, const void *cmp);
but not on trunk's:
APR_DECLARE(void*) apr_atomic_casptr(void *volatile *mem, void *ptr, const void *cmp);
The mark clearly indicates that (void **)&cmp is the culprit though (compiler bug?).
Let's see if using the generic (void *) cast helps, the goal of the (void **)
cast was to remove constantness only (__atomic_compare_exchange_n will modify
the pointer on stack, but not the pointed to value), (void *) will do that too
without any volatile qualifier issue possibly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902233 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902226 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
* json/apr_json_decode.c(apr_json_decode_array):
Return APR_ENOSPC should the int counter overflow.
Follow up to r1902196.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902207 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The (old) API of apr_base64 functions has always used int for representing
lengths and it does not return errors. Make sure to abort() if the provided
data don't fit.
* encoding/apr_base64.c():
#define APR_BASE64_ENCODE_MAX and APR_BASE64_DECODE_MAX as the hard length
limits for encoding and decoding respectively.
* encoding/apr_base64.c(apr_base64_encode_len, apr_base64_encode,
apr_base64_encode_binary, apr_pbase64_encode):
abort() if the given length is above APR_BASE64_ENCODE_MAX.
* encoding/apr_base64.c(apr_base64_decode_len, apr_base64_decode,
apr_base64_decode_binary, apr_pbase64_decode):
abort() if the given plain buffer length is above APR_BASE64_DECODE_MAX.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902206 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
By using the right numeric comparison assertions and some explicit casts.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902205 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testatomic.c(busyloop_dec32):
Use ABTS_UINT_EQUAL().
* test/testatomic.c(busyloop_dec64):
Use ABTS_ULLONG_EQUAL().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902204 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* test/testatomic.c():
Use ABTS_UINT_EQUAL() to compare apr_uint32_t atomics, and
ABTS_ULLONG_EQUAL() for apr_uint64_t ones.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902199 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* threadproc/win32/thread.c(dummy_worker):
First cast to apr_uinptr_t before conversion pointer to int.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902198 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* threadproc/win32/proc.c(apr_proc_create):
Don't assign const strings to "cmdline".
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902197 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* json/apr_json_decode.c(apr_json_decode_array):
apr_array_make() want an int.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902196 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* crypto/crypt_blowfish.c(BF_decode, BF_encode, _crypt_output_magic,
_crypt_blowfish_rn, _crypt_gensalt_blowfish_rn):
Use apr_size_t instead of int size.
* crypto/crypt_blowfish.c(_crypt_gensalt_blowfish_rn):
Fix conversion from 'unsigned long' to 'char'.
* crypto/crypt_blowfish.h():
Use apr_size_t instead of int size, and #include "apr.h".
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902195 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* buckets/apr_brigade.c(apr_brigade_split_boundary):
"ignore" and "inbytes" vars are size_t and used as such.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902194 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* memory/unix/apr_pools.c(apr_pool_initialize):
Use 1u for shifting to unsigned.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902193 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* test/abts.c(IMPL_abts_T_nequal):
Invert logic from IMPL_abts_T_equal (bad copypasta)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902192 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/abts.h():
Declare abts_{uint,long,ulong,llong,ullong}_{n,}equal() and the corresponding
ABTS_{UINT,LONG,ULONG,LLONG,ULLONG}_{N,}EQUAL() wrappers.
* test/abts.c():
Implement abts_{uint,long,ulong,llong,ullong}_{n,}equal() using a common macro.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902191 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902184 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* test/testmutexscope.c(test_mech_mode, eachThread):
Cast to apr_uintptr_t first before converting pointer to/from enum.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902182 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* test/testlock.c(thread_mutex_function,
thread_mutex_sleep_function):
Thread (APR_THREAD_FUNC) functions should return a pointer (NULL).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902181 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* test/testfile.c(test_datasync_on_stream):
Handle ENOTSUP on macos.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902180 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* poll/unix/kqueue.c(impl_pollset_add):
Cast to (void *) to "break" constantnes of descriptor.
Follow up to r1902178.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902178 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Closes #36
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902176 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* test/testfile.c(test_datasync_on_stream):
Let ABTS_INT_EQUAL show the actual errno.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902175 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902172 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows' Sleep() has millisecond granularity while the given apr_time_t to
sleep is in microseconds, so round up.
* time/win32/time.c(apr_sleep):
Round up given time to upper milliseconds.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902169 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
to 1.8.x branch.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902166 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902164 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
* test/sockperf.c: Use apr_size_t instead of int.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902157 13f79535-47bb-0310-9956-ffa450edef68
|