summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* testdir: Following up to r1877439, make sure that the test data getsbrane2020-05-061-19/+26
| | | | | | | populated correctly when threads are disabled. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1877443 13f79535-47bb-0310-9956-ffa450edef68
* testfile: silence -Wstring-plus-int warnings.brane2020-05-061-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1877442 13f79535-47bb-0310-9956-ffa450edef68
* Added support for recording skipped test cases.brane2020-05-064-11/+71
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1877441 13f79535-47bb-0310-9956-ffa450edef68
* Make test work with thread support disabled.brane2020-05-062-0/+14
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1877439 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto_prng: delacre cprng_stream_ctx_free() static.ylavic2020-04-303-3/+3
| | | | | | | It's local only (a function pointer for apr_crypto_driver_t). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1877190 13f79535-47bb-0310-9956-ffa450edef68
* apr_jose: Fix a the case where existing memory buffers were used, but theyminfrin2020-03-161-40/+20
| | | | | | | were not initialised. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875220 13f79535-47bb-0310-9956-ffa450edef68
* Add APU_CRYPTO_PRNG_RECOMMENDED_DRIVER to make it easier to choose theminfrin2020-03-141-1/+12
| | | | | | | correct driver on a platform. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875186 13f79535-47bb-0310-9956-ffa450edef68
* Support both NID_chacha20 and NID_aes_256_ctr, not one or the other.minfrin2020-03-141-10/+20
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875184 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_brigade.c (apr_brigade_cleanup): Non-debug builds shouldjorton2020-03-111-3/+11
| | | | | | | | | not check for brigade memory corruption; debug builds should abort rather than fail silently (since all callers ignore the rv) if corruption is detected. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875098 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_buckets.h: Ensure macro argument is only expandedjorton2020-03-111-4/+6
| | | | | | | once for apr_bucket_delete and apr_bucket_destroy. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875097 13f79535-47bb-0310-9956-ffa450edef68
* APR's configure script uses AC_TRY_RUN to detect whether the return typeminfrin2020-03-102-7/+11
| | | | | | | | | | of strerror_r is int. When cross-compiling this defaults to no. This commit adds an AC_CACHE_CHECK so users who cross-compile APR may influence the outcome with a configure variable. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875065 13f79535-47bb-0310-9956-ffa450edef68
* Add a cache check with which users who cross-compile APRminfrin2020-03-102-7/+9
| | | | | | | | can influence the outcome of the /dev/zero test by setting the variable ac_cv_mmap__dev_zero=yes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1875062 13f79535-47bb-0310-9956-ffa450edef68
* Don't try to use PROC_PTHREAD by default when cross compiling.minfrin2020-02-051-2/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1873593 13f79535-47bb-0310-9956-ffa450edef68
* Be more forceful in identifying EBADPATHwrowe2020-01-161-2/+4
| | | | | | Even when the path is first identified as a wildcard path. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872893 13f79535-47bb-0310-9956-ffa450edef68
* * Add to correct include variablerpluem2020-01-101-1/+1
| | | | | | | | There is no APRUTIL_PRIV_INCLUDES in APR trunk. Add to INCLUDES instead like several lines below. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872587 13f79535-47bb-0310-9956-ffa450edef68
* Update config.guess and config.sub fromrjung2020-01-012-10/+15
| | | | | | | https://git.savannah.gnu.org/cgit/config.git. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872203 13f79535-47bb-0310-9956-ffa450edef68
* Happy New Year 2020rjung2020-01-012-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872195 13f79535-47bb-0310-9956-ffa450edef68
* Fix the name of libtool when cross compiling.minfrin2020-01-011-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872164 13f79535-47bb-0310-9956-ffa450edef68
* Add the ability to cross compile APR.minfrin2019-12-311-0/+22
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872146 13f79535-47bb-0310-9956-ffa450edef68
* Teach configure how to find and build against MariaDB 10.2. PR 61517minfrin2019-12-282-23/+35
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872060 13f79535-47bb-0310-9956-ffa450edef68
* Avoid an overflow on 32 bit platforms.minfrin2019-12-271-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872034 13f79535-47bb-0310-9956-ffa450edef68
* Submitted by: Hongxu Jia <hongxu.jia@windriver.com>minfrin2019-12-265-8/+138
| | | | | | | | | | | | | | | https://patch-diff.githubusercontent.com/raw/apache/apr/pull/8.patch While cross-compiling, the tools/gen_test_char could not be executed at build time, use AX_PROG_CC_FOR_BUILD to build native tools/gen_test_char Support explicit libtool by variable assigning before buildcheck.sh, it is helpful for cross-compiling (such as libtool=aarch64-linux-libtool) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1871998 13f79535-47bb-0310-9956-ffa450edef68
* Use AC_CHECK_SIZEOF, so as to support cross compiling. PR 56053.minfrin2019-12-262-44/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1871980 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1871082: Actually use api-ms-win-downlevel-shell32-l1-1-0.dllivan2019-12-231-4/+4
| | | | | | | | | | API Set. * include/arch/win32/apr_arch_misc.h (CommandLineToArgvW): Use DLL_API_MS_WIN_DOWNLEVEL_SHELL32_L1_1_0 instead of DLL_SHSTDAPI. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1871926 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1871447.ivan2019-12-231-3/+4
| | | | | | | | | * include/arch/win32/apr_arch_misc.h (APR_DECLARE_LATE_DLL_FUNC): Use direct memory write instead of InterlockedExchangePointer() since pointer-sized writes are atomic on Windows. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1871925 13f79535-47bb-0310-9956-ffa450edef68
* win32: Rewrite late linking code (again) without using INIT_ONCE as groundworkivan2019-12-142-48/+50
| | | | | | | | | | | | | | | | | | | | | | | to backport r1866562 and 1859477 to APR 1.6.x and APR 1.7.x. It also slightly improves performance and reduce lock contention. * include/arch/win32/apr_arch_misc.h (apr_winapi_fpt_##fn): Declare as volatile and initialize to (ULONG_PTR) -1. (apr_winapi_ctrl_##fn, apr_winapi_init_once_##fn): Remove. (apr_winapi_ld_##fn): Concurrently invoke apr_load_dll_func() if apr_winapi_fpt_##fn == -1. * misc/win32/misc.c (win32_late_dll_t.control): Remove. (win32_late_dll_t.dll_handle): Declare as volatile. (late_dll): Initialize dll_handle to INVALID_HANDLE_VALUE (assume that is invalid module handle). (apr_load_dll_func): Concurrently load library if dll_handle == INVALID_HANDLE_VALUE. Then perform CAS and then free library if other thread performed initialization before. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1871447 13f79535-47bb-0310-9956-ffa450edef68
* win32: Try to avoid loading shell32.dll whenever possible:ivan2019-12-093-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. shell32.dll has about 19 dependencies. 2. shell32.dll depends on user32/gdi32.dll and loading them makes the process a "GUI" process: - this slows down process initialization and shutdown [1] - doesn't allow enabling mitigation to block win32k.sys for process using APR. 3. shell32.dll is not available on Windows Nano Server The only used function from shell32.dll is CommandLineToArgW. It is used to parse command-line arguments in apr_app_initialize(). The solution is twofold: 1. Delay loading shell32.dll. 2. Prefer to use api-ms-win-downlevel-shell32-l1-1-0.dll API Set instead of shell32.dll (Windows 8+) * include/arch/win32/apr_arch_misc.h (apr_dlltoken_e): Add DLL_API_MS_WIN_DOWNLEVEL_SHELL32_L1_1_0. (CommandLineToArgvW): Add late late dll func for CommandLineToArgvW. * misc/win32/misc.c (load_dll_callback): Support API Sets. * misc/win32/start.c (apr_app_initialize): Use apr_winapi_CommandLineToArgvW() instead of CommandLineToArgvW(). [1] https://randomascii.wordpress.com/2018/12/03/a-not-called-function-can-cause-a-5x-slowdown/ git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1871082 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto_commoncrypto: Remove stray reference to -lcrypto thatminfrin2019-11-062-2/+5
| | | | | | | prevented commoncrypto being enabled. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1869486 13f79535-47bb-0310-9956-ffa450edef68
* ucs2 is a legacy name, the correct encoding nameswrowe2019-10-2910-104/+103
| | | | | | | | | | | | | | | | are now utf-8, utf-16, and utf-32, so we rename; apr_conv_utf8_to_ucs2 -> apr_conv_utf8_to_utf16 apr_conv_ucs2_to_utf8 -> apr_conv_utf16_to_utf8 This patch notices an error message printing of an internal password, which will no longer be echoed to the error stream. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1869127 13f79535-47bb-0310-9956-ffa450edef68
* * threadproc/win32/thread.civan2019-10-221-10/+1
| | | | | | | (apr_thread_yield): Remove Windows CE and Win9x compatibility code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868774 13f79535-47bb-0310-9956-ffa450edef68
* * atomic/win32/apr_atomic64.civan2019-10-161-0/+7
| | | | | | | | | | | (apr_atomic_read64): Use direct memory read when compiled for x86_x64, since 64-bit reads are atomic in 64-bit Windows [1]. Suggested by: Yann Ylavic [1] https://docs.microsoft.com/en-us/windows/win32/sync/interlocked-variable-access git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868502 13f79535-47bb-0310-9956-ffa450edef68
* CHANGES: Link to APR 1.7.x and APR-util 1.7.x changelog.ivan2019-10-151-0/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868478 13f79535-47bb-0310-9956-ffa450edef68
* apr_proc_create(): Properly escape arguments containing whitespace charactersivan2019-10-155-6/+203
| | | | | | | | | | | | | | | | | | | | on Windows. * CMakeLists.txt (single_source_programs): Add test/echoargs.c. * test/echoargs.c: New test app for test_proc_args test. * test/testproc.c (test_proc_args): New test. (testproc): Add test_proc_args to test list. * threadproc/win32/proc.c (quote_arg): New. Helper for apr_proc_create(). (apr_proc_create): Use quote_arg() helper to escape arguments in command line. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868477 13f79535-47bb-0310-9956-ffa450edef68
* Refactoring. No functional changes intended.ivan2019-10-151-15/+35
| | | | | | | | | * threadproc/win32/proc.c (apr_proc_create): Do not share code to build CMDLINE in different situations. SHELLCMD, .bat and regular executables have different rules for cmdline escaping. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868469 13f79535-47bb-0310-9956-ffa450edef68
* apr_atomic_read64(): Fix non-atomic read on 32-bit Windows.ivan2019-10-083-1/+43
| | | | | | | | | | | | | | * atomic/win32/apr_atomic64.c (apr_atomic_read64): Use InterlockedCompareExchange64() instead of direct memory read. * test/testatomic.c (test_atomics_threaded_setread64): New test. (test_func_set64): Helepr for test_atomics_threaded_setread64 test. * CHANGES: Add changelog entry. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868129 13f79535-47bb-0310-9956-ffa450edef68
* Add APR_DECLARE() to apr_json_*() and apr_jose_*() functions declaration toivan2019-10-085-36/+49
| | | | | | fix 32-bit Windows build. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1868125 13f79535-47bb-0310-9956-ffa450edef68
* Remove the APR_SENDFILE_DISCONNECT_SOCKET flag.ivan2019-09-203-40/+16
| | | | | | | | | | | | | | | | | | There are several problems with this flag: 1. The TCP socket may be subject to the TCP TIME_WAIT state. That means apr_sock_sendfile() could occupy worker thread for significant time (30 seconds) 2. With this flag specified, the socket descriptor is removed from the apr_socket_t and the caller caller is expected to maintain the descriptor and release it manually, which is particularly error-prone. See also: https://lists.apache.org/thread.html/a3c4a03961a4b5842e7f657a15fe777edf5949b768a2807619a104b1@%3Cdev.apr.apache.org%3E git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1867226 13f79535-47bb-0310-9956-ffa450edef68
* win32: Use TF_USE_KERNEL_APC for TransmitFile(). According to theivan2019-09-141-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | documentation [1] TF_USE_KERNEL_APC is the most performant option: [[[ Directs the driver to use kernel asynchronous procedure calls (APCs) instead of worker threads to process long TransmitFile requests. Long TransmitFile requests are defined as requests that require more than a single read from the file or a cache; the request therefore depends on the size of the file and the specified length of the send packet. Use of TF_USE_KERNEL_APC can deliver significant performance benefits. It is possible (though unlikely), however, that the thread in which context TransmitFile is initiated is being used for heavy computations; this situation may prevent APCs from launching. ]]] The downside is not applicable for our use case since calling thread is not busy and waiting for operation completion. [1] https://docs.microsoft.com/en-gb/windows/win32/api/mswsock/nf-mswsock-transmitfile git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866934 13f79535-47bb-0310-9956-ffa450edef68
* win32: Do not use TransmitFile directly. According to documentationivan2019-09-142-8/+25
| | | | | | | | | | | | | | TransmitFile() should not be used directly and pointer to function should retrieved using WSAIoctl: https://docs.microsoft.com/en-gb/windows/win32/api/mswsock/nf-mswsock-transmitfile#remarks * network_io/win32/sendrecv.c (apr_socket_sendfile): Retrieve pointer to TransmitFile using WSAIoctl. * CMakeLists.txt (APR_SYSTEM_LIBS): Remove reference to mswsock.lib. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866932 13f79535-47bb-0310-9956-ffa450edef68
* * network_io/win32/sendrecv.civan2019-09-141-4/+0
| | | | | | | (apr_socket_sendfile): Remove Windows 95 compatibility code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866928 13f79535-47bb-0310-9956-ffa450edef68
* * threadproc/win32/proc.civan2019-09-091-7/+5
| | | | | | (apr_proc_create): Remove Windows 98 compatibility code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866714 13f79535-47bb-0310-9956-ffa450edef68
* * threadproc/win32/proc.civan2019-09-091-35/+18
| | | | | | | (apr_proc_create): Remove compatibility code for command.com which is only available on Windows 98 and bellow. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866713 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1866300: Add missing return value in test function.ivan2019-09-091-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866712 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1860075: Remove unused local variable.ivan2019-09-081-1/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866619 13f79535-47bb-0310-9956-ffa450edef68
* win32: Remove unused code.ivan2019-09-071-27/+0
| | | | | | | | | * include/arch/win32/apr_arch_misc.h (PBI, apr_winapi_NtQueryInformationProcess, apr_winapi_NtQueryObject): Remove. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866564 13f79535-47bb-0310-9956-ffa450edef68
* win32: Fix very unlikely race condition in late linking code.ivan2019-09-071-6/+11
| | | | | | | | * include/arch/win32/apr_arch_misc.h (APR_DECLARE_LATE_DLL_FUNC): Use INIT_ONCE to wait for concurrent DLL loading if any. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866562 13f79535-47bb-0310-9956-ffa450edef68
* Refactor win32 thread_mutex code. No functional changes intended.ivan2019-09-031-12/+29
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866302 13f79535-47bb-0310-9956-ffa450edef68
* Add test for WAIT_ABANDONED handling for win32 mutexes. Code works asivan2019-09-031-0/+42
| | | | | | expected. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866300 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_buckets_refcount.c (apr_bucket_shared_copy):jorton2019-08-291-2/+1
| | | | | | | Simplify code, allowing tail-call optimization, no functional change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866064 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1862435, r1862071 per veto from ivanjorton2019-08-286-127/+11
| | | | | | | msgid: <CABw-3YcK0qbeYWDOwE684XtBj3rCT2CuVOBWWqda4gMtRyRJEw@mail.gmail.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866019 13f79535-47bb-0310-9956-ffa450edef68