summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* * Ignore the echoargs test appHEADtrunkRuediger Pluem2023-05-100-0/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909719 13f79535-47bb-0310-9956-ffa450edef68
* * Add CHANGES entry for r1909474, r1909585, r1909586, r1909590Ruediger Pluem2023-05-081-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909677 13f79535-47bb-0310-9956-ffa450edef68
* * Wait for the mock memcached to shutdown the socketRuediger Pluem2023-05-031-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909590 13f79535-47bb-0310-9956-ffa450edef68
* * Add missing test/memcachedmock.cRuediger Pluem2023-05-031-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909586 13f79535-47bb-0310-9956-ffa450edef68
* Check sockets from connection pool before using them and try to reconnectRuediger Pluem2023-05-038-7/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | them if they are not usable any longer. * memcache/apr_memcache.c::ms_find_conn: Check if the socket returned from the connection pool is still readable. If not then invalidate the connection in the pool and request a new one from the connection pool. Repeat this until a valid socket is returned or this was done the maximum number of connections in the pool plus one. This ensures that at least one new socket was created. If a new socket does not work this indicates a broken backend and not just a restart in the past. In this case return an error like previously. * test/testmemcache.c: Add new test for connection validation. * test/memcachedmock.c: For the new test we need a memcached mock server that we control and can restart. * test/testmemcache.h: Shared defines between test/testmemcache.c and test/memcachedmock.c. * test/Makefile.in: * test/Makefile.win: * test/NWGNUmakefile: * test/NWGNUmemcachedmock: Needed changes to build test/memcachedmock.c on different platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909585 13f79535-47bb-0310-9956-ffa450edef68
* In case that we have threads store the apr_reslist parameters in theRuediger Pluem2023-04-282-0/+12
| | | | | | | | | | | | | apr_memcache_server_t struct for later usage. * include/apr_memcache.h::struct apr_memcache_server_t: Add missing fields to struct. * memcache/apr_memcache.c::apr_memcache_server_create: Init fields with given values. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909474 13f79535-47bb-0310-9956-ffa450edef68
* atomics: Follow up to r1909321: Windows does not use 64bit generic atomics.Yann Ylavic2023-04-211-4/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909324 13f79535-47bb-0310-9956-ffa450edef68
* atomics: Follow up to r1909321: remaining NEED_ATOMICS_GENERIC64.Yann Ylavic2023-04-211-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909323 13f79535-47bb-0310-9956-ffa450edef68
* atomics: Disentangle 32bit and 64bit atomics configuration.Yann Ylavic2023-04-2110-28/+37
| | | | | | | | | | | | | | | | Allow for --enable-nonportable-atomics=upto32bit to disable 64bit atomic builtins while still allowing for 32bit ones. yes/no still enables/disables both (if available in the first place..). By default (no --enable-nonportable-atomics setting), generic 64bit atomics are forced for 32bit CPUs/systems, until we figure out how to properly align apr_uint64_t (at least i[56]86 CPUs which could work with 64bit builtins actually don't if the data is not 64bit aligned, assuming the same for other 32bit CPUs is safer). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909321 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Fix apr_uint64_t format to APR_UINT64_T_FMT.Yann Ylavic2023-04-211-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909310 13f79535-47bb-0310-9956-ffa450edef68
* apr_base64: Don't fault with assert() when NDEBUG is defined, abort() directly.Yann Ylavic2023-04-131-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | Per Evgeny: """ 1) The debug implementation of an assert() may print a diagnostic message, for example to stderr. A caller of the library function may not be ready for this to happen when using a non-debug version of the library. 2) The actual destination of the message seems to be implementation-defined. For example, in Windows-based applications this may show a message box [1], which is probably even more unexpected for the user of the library. 3) Undefining NDEBUG before other headers may silently cause unexpected effects if any of those headers make some decisions based on the NDEBUG value, which isn't an entirely unreasonable thing to expect. """ We want to always fault on failure though, so define and use our own APR__ASSERT() macro which calls abort() directly when NDEBUG is defined. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909117 13f79535-47bb-0310-9956-ffa450edef68
* CHANGES: Drop my email from the changelog entries, for consistency.Evgeny Kotkov2023-04-121-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909091 13f79535-47bb-0310-9956-ffa450edef68
* CHANGES: Remove entries that were released in APR 1.7.3.Evgeny Kotkov2023-04-121-13/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909090 13f79535-47bb-0310-9956-ffa450edef68
* Add a regression test for the issue where appending to a buffered fileEvgeny Kotkov2023-04-121-0/+45
| | | | | | | | | | | | was causing the content to be written at offset 0, rather than appended (see r1909088). * test/testfile.c (test_append_buffered): New test. (testfile): Run the new test. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909089 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1808456 (Win32: Don't seek to the end when opening files withEvgeny Kotkov2023-04-123-54/+1
| | | | | | | | | | | | | | | | | | | | | | | | | APR_FOPEN_APPEND). While this change fixed an issue where Windows and Unix reported different offsets after opening files for append, it also caused a regression: for files opened with APR_FOPEN_APPEND | APR_FOPEN_BUFFERED, flushing their contents would cause the contents to be written at offset 0, rather than appended. This happens because flushes and regular writes use different code paths. And while regular writes guarantee that an append will happen to the end of the file, a buffer flush uses a regular WriteFile(), assuming the file pointer has been properly set before. To fix both issues, we'd probably need to rework this part and make all writes use the same approach. But for now let's revert this change to fix the regression, that was also reported in [1]. I'll add a regression test for this problem separately. [1] https://lists.apache.org/thread/56gnyc3tc0orjh5mfsqo9gpq1br59b01 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909088 13f79535-47bb-0310-9956-ffa450edef68
* Trigger ci?Yann Ylavic2023-04-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908887 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1908503: restore INCLUDES setting.Yann Ylavic2023-03-271-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908749 13f79535-47bb-0310-9956-ffa450edef68
* tests: Follow up to r1908616: Simplify epoll_wait() check.Yann Ylavic2023-03-211-10/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908618 13f79535-47bb-0310-9956-ffa450edef68
* tests: check whether epoll_wait() timeout is reliable and adjust justsleep().Yann Ylavic2023-03-212-9/+66
| | | | | | | | | | | | | * configure.in: Small epoll_wait() loop to check timeout reliability and set HAVE_EPOLL_WAIT_RELIABLE_TIMEOUT. * test/testpoll.c(justsleep): Allow some jiffy is !HAVE_EPOLL_WAIT_RELIABLE_TIMEOUT. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908616 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1897207: CHANGES entry.Yann Ylavic2023-03-201-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908592 13f79535-47bb-0310-9956-ffa450edef68
* Follow to r1908433: CHANGES entry.Yann Ylavic2023-03-201-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908588 13f79535-47bb-0310-9956-ffa450edef68
* crypto_openssl: Fix configure/detection of OPENSSL_init_crypto()Yann Ylavic2023-03-182-26/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908503 13f79535-47bb-0310-9956-ffa450edef68
* dbd_odbc: Fix SQL_INTEGER allocation size.Yann Ylavic2023-03-181-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908501 13f79535-47bb-0310-9956-ffa450edef68
* crypto: Follow up to r1908433: OPENSSL_API_COMPAT to 1.1.1.Yann Ylavic2023-03-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908455 13f79535-47bb-0310-9956-ffa450edef68
* crypto: Follow up to r1908433: streamline cleanups.Yann Ylavic2023-03-171-46/+62
| | | | | | | | | | | The crypto_*_init() functions can be called multiple times with the returned structure already allocated/initialized, or not. So rather than cleaning up after each operation (which was removed in r1908433 but is now leaky), let's instead either allocate+register or cleanup existing structure in _init(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908453 13f79535-47bb-0310-9956-ffa450edef68
* crypto: Follow up to r1908433: Fix EVP_MAC usage w/ openssl < 3.0.Yann Ylavic2023-03-171-0/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908448 13f79535-47bb-0310-9956-ffa450edef68
* configure: Follow up to r1906889: Run the test for pthread_setname_np().Yann Ylavic2023-03-161-4/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908438 13f79535-47bb-0310-9956-ffa450edef68
* ci: install to some writable directory.Yann Ylavic2023-03-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908437 13f79535-47bb-0310-9956-ffa450edef68
* ci: DSOs should be installed for apu_dso_load().Yann Ylavic2023-03-161-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908436 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1908434: --with-openssl too.Yann Ylavic2023-03-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908435 13f79535-47bb-0310-9956-ffa450edef68
* Test --with-crypto in ci.Yann Ylavic2023-03-161-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908434 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto_openssl: Compatibility with OpenSSL 3+Yann Ylavic2023-03-162-191/+319
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908433 13f79535-47bb-0310-9956-ffa450edef68
* apr_thread: Follow up to r1897207: apr_thread_current_create() is ENOTIMPL ↵Yann Ylavic2023-03-155-10/+20
| | | | | | | | | | w/o APR_HAS_THREAD_LOCAL. It's useless when !APR_HAS_THREAD_LOCAL since apr_thread_current() can't work. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908417 13f79535-47bb-0310-9956-ffa450edef68
* * Add CHANGES entry for r1908248 [skip ci]Ruediger Pluem2023-03-131-0/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908336 13f79535-47bb-0310-9956-ffa450edef68
* Fix crosscompiling detection in apr-1-configRuediger Pluem2023-03-102-7/+34
| | | | | | | | | | | | | | | | | | | Since r1872148 apr-1-config tries to detect if it runs in a crosscompile scenario. Fix the detection to correctly distinguish between crosscompiling and DESTDIR installations for packaging. * configure.in: Set APR_CROSS_COMPILING to 'no', 'yes' or 'maybe' based on possible --host and --build parameters given to configure to determine if configure was called for a crosscompiling scenario. This was inspired by how autoconf itself detects crosscompiling scenarios. * apr-config.in: Use the value from APR_CROSS_COMPILING to determine if we are in a crosscompiling scenario. Furthermore normalize the pathes we use for suffix matches by collapsing multiple consecutive '/' to one. PR: 66510 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908248 13f79535-47bb-0310-9956-ffa450edef68
* * Add changes entry for r1907566 [skip ci]Ruediger Pluem2023-03-071-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908170 13f79535-47bb-0310-9956-ffa450edef68
* configure: atomic builtins might be implemented for i586 and i686.Yann Ylavic2023-03-021-5/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907988 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1907986.Yann Ylavic2023-03-023-18/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907987 13f79535-47bb-0310-9956-ffa450edef68
* configure: atomic builtins might be implemented for i586 and i686.Yann Ylavic2023-03-023-8/+18
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907986 13f79535-47bb-0310-9956-ffa450edef68
* atomic: test 4-bytes aligned and/or cross-cacheline atomics (on 32bit systems).Yann Ylavic2023-03-021-19/+33
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907985 13f79535-47bb-0310-9956-ffa450edef68
* The 'flags' field in apr_pollset_private_t looks unused.Christophe Jaillet2023-02-191-1/+0
| | | | | | Remove it to save 8 bytes (on 64 bits arch) when such a struct is allocated. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907751 13f79535-47bb-0310-9956-ffa450edef68
* Re-order the fields of 'struct apr_finfo_t' to avoid a hole and some padding.Christophe Jaillet2023-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On x86_64, this shrinks the size of the struct from 120 to 112 bytes. Before the patch, pahole states that: struct apr_finfo_t { apr_pool_t * pool; /* 0 8 */ apr_int32_t valid; /* 8 4 */ apr_fileperms_t protection; /* 12 4 */ apr_filetype_e filetype; /* 16 4 */ apr_uid_t user; /* 20 4 */ apr_gid_t group; /* 24 4 */ /* XXX 4 bytes hole, try to pack */ apr_ino_t inode; /* 32 8 */ apr_dev_t device; /* 40 8 */ apr_int32_t nlink; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ apr_off_t size; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ apr_off_t csize; /* 64 8 */ apr_time_t atime; /* 72 8 */ apr_time_t mtime; /* 80 8 */ apr_time_t ctime; /* 88 8 */ const char * fname; /* 96 8 */ const char * name; /* 104 8 */ struct apr_file_t * filehand; /* 112 8 */ /* size: 120, cachelines: 2, members: 17 */ /* sum members: 112, holes: 2, sum holes: 8 */ /* last cacheline: 56 bytes */ }; git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907750 13f79535-47bb-0310-9956-ffa450edef68
* duplicate lineEric Covener2023-02-171-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907718 13f79535-47bb-0310-9956-ffa450edef68
* atomic64: Generic apr_atomic_read64() to always use a lock.Yann Ylavic2023-02-151-12/+0
| | | | | | | | | | | | | | | Don't play games with sizeof(void*) to determine whether a raw load intruction is atomic or not. Systems that fall back to the generic implementation are not eligible for the compiler builtins or CPU native atomic intructions already, and we don't want to reimplement that here (e.g. alignment, ordering guarantees, ...). * atomic/unix/mutex64.c(apr_atomic_read64): No #ifdefery, always take the lock. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907678 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: initialize in the test the globals used by it.Yann Ylavic2023-02-151-0/+3
| | | | | | | | | Just in case the test is later reordered (e.g. test_atomics_threaded64 and test_atomics_threaded_setread64 use the same atomic_ops64 variable). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907677 13f79535-47bb-0310-9956-ffa450edef68
* configure: Test apr_uint64_t alignment for 64bit atomic builtins usability.Yann Ylavic2023-02-141-25/+43
| | | | | | | | | | | | | | | | | | | | | | | On some systems the __atomic builtins may be available only through libatomic or fall back to libatomic when the atomic operations are not issued on a suitably aligned address (64bit atomics on 8-byte aligned addresses only for instance). Modify the tests for HAVE_ATOMIC_BUILTINS64 and HAVE__ATOMIC_BUILTINS64 such that the address for the atomic operations is not aligned (unless 64bit ints always have the suitable alignment, i.e. mainly 64bit systems..). Also, use the __atomic_always_lock_free() builtin to fail the test when the compiler already knows about the alignment issue (falling back to libatomic, which we don't require/want). With this, 64bit builtins should be selected only for platforms that can natively handle atomics on any apr_uin64_t (since the APR has no dedicated 8-byte aligned 64bit type for now), while the generic/mutex implementation is used for others. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907642 13f79535-47bb-0310-9956-ffa450edef68
* atomic: No raw 64bit load/store on 32bit systems or anything but x86_64 or ↵Yann Ylavic2023-02-142-8/+10
| | | | | | | | | | | | | | | | | | | s390x. Raw 64 bit load and store need two intructions on 32bit systems (tearing) so they are not atomic, and only x86(_64) and s390(x) have stong mempry ordering guarantees. Always use builtin functions for the cases where raw load/store don't work as expected. * atomic/unix/builtins.c, atomic/unix/builtins64.c: Use an accept-list rather than a reject-list to define WEAK_MEMORY_ORDERING. Test APR_SIZEOF_VOIDP < 8 to force usage of __sync builtins for _read{32,64} and _set{32,64} on 32bit systems when __atomic_{load,store} buitlins are not available. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907637 13f79535-47bb-0310-9956-ffa450edef68
* Re-order the fields of 'struct apr_bucket_file' to avoid a hole and some ↵Christophe Jaillet2023-02-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | padding. Before the patch, pahole states that: struct apr_bucket_file { apr_bucket_refcount refcount; /* 0 4 */ /* XXX 4 bytes hole, try to pack */ apr_file_t * fd; /* 8 8 */ apr_pool_t * readpool; /* 16 8 */ int can_mmap; /* 24 4 */ /* XXX 4 bytes hole, try to pack */ apr_size_t read_size; /* 32 8 */ /* size: 40, cachelines: 1, members: 5 */ /* sum members: 32, holes: 2, sum holes: 8 */ /* last cacheline: 40 bytes */ }; git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907634 13f79535-47bb-0310-9956-ffa450edef68
* * Since r1901037 Posix shared mem is prefered over SysV shared mem.Ruediger Pluem2023-02-101-0/+7
| | | | | | | Add an option to revert this choice on systems that provide both. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907566 13f79535-47bb-0310-9956-ffa450edef68
* apr_atomic: Generic apr_atomic_read64() needs a mutex on 32bit systems ↵Yann Ylavic2023-02-091-0/+19
| | | | | | | | | | | | | | | | (tearing). A 64bit load on a 32 bit CPU/system uses two instructions (tearing), so ensure atomicity with regard to other atomic functions by using the (same) lock. test_atomics_threaded_setread64() fails because of this on 32bit systems. PR 66457. * atomic/unix/mutex64.c(apr_atomic_read64): Use locking when APR_SIZEOF_VOIDP < 8 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907541 13f79535-47bb-0310-9956-ffa450edef68