| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1872195 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
msgid: <CABw-3YcK0qbeYWDOwE684XtBj3rCT2CuVOBWWqda4gMtRyRJEw@mail.gmail.com>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1866019 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
only needed when APR_POOL_DEBUG is defined,
but can be aor should be called from app code.
Providing stubs allows the app code to stay the
same when running with or without debugging APR
lib (no need for app recompilation).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1863217 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
no useful (nor documented) semantic:
* include/apr_thread_proc.h (apr_thread_exit): Make void function;
mark with gcc noreturn attribute.
* threadproc/*/thread.c (apr_thread_exit): Update accordingly.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1862446 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_dir_pread.
* file_io/win32/dir.c, file_io/os2/dir.c (apr_dir_read): Duplicate the
returned filename so the call has no side-effects on apr_finfo_t
structures passed to previous invocations of the function.
* test/testdir.c (test_read_side_effects): Add test case for
side-effects of apr_dir_read.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1862435 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to read a directory with constant memory consumption:
* include/apr_file_info.h: Add warning on memory consumption for
apr_dir_read; declare apr_dir_pread.
* file_io/unix/dir.c (apr_dir_pread): Rename from apr_dir_read and
take pool argument. (apr_dir_read): Reimplement using it.
* file_io/win32/dir.c, file_io/os2/dir.c: Likewise, but untested.
* test/testdir.c (test_pread) [APR_POOL_DEBUG]: Add test case.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1862071 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Move OpenSSL initialisation back to apr_crypto_openssl, reinstate
DSO support.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861951 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Move NSS initialisation back to apr_crypto_nss, reinstate
DSO support.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861894 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Move commoncrypto initialisation back to
apr_crypto_commoncrypto module, reinstate DSO support.
Remove noop references to mscapi and mscng.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861892 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
(enum apr_oslevel_e): Add APR_WIN_7_SP1.
* misc/win32/misc.c
(apr_get_oslevel): Determine whether we are running on Windows 7 or on
Windows 7 SP1.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861061 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* include/arch/win32/apr_arch_misc.h
(enum apr_oslevel_e): Add APR_WIN_10.
* misc/win32/misc.c
(apr_get_oslevel): Return APR_WIN_10 when dwMajorVersion is greater than 6.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861054 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
(enum apr_oslevel_e): Add APR_WIN_8_1.
* misc/win32/misc.c
(apr_get_oslevel): Determine whether we are running on Windows 8 or
on Windows 8.1+.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1861053 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860984 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860783 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860777 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
(apr_dir_t): Remove union needed for ANSI support.
* file_io/win32/dir.c
(apr_dir_open, apr_dir_read): Update code to the changes above.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860748 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
implement timed unnested apr_thread_mutex_t.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860744 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object:
- NtWaitForSingleObject supports sub-milliseconds timeouts
- NtWaitForSingleObject supports timeouts more than 49 days
NtWaitForSingleObject is documented [1], but marked as 'deprecated' so we
still leave fallback code based on WaitForSingleObject().
[1] https://docs.microsoft.com/en-us/windows/desktop/api/winternl/nf-winternl-ntwaitforsingleobject
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860191 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* include/apr.hw
(APU_USE_EXPAT): Define to 0.
(APU_USE_XMLLITE): Define to 1.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860161 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860159 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
XmlLite [1].
Start using it by default if we weren't explicitly told to build with either
libxml2 or expat.
(This is a merge of the `xmllite` branch.)
Doing so reduces the amount of dependencies required for building and using
APR, which I believe to be a good thing in this particular case. And it also
means that by default we would be relying on the native component of the OS
rather than on a 3rd-party library.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860150 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function almost the same as WaitForSingleObject() except it accepts
timeout value in microseconds, instead of milliseconds.
* include/arch/win32/apr_arch_misc.h
* misc/win32/misc.c
(apr_wait_for_single_object): New. Factored out from thread_cond_timedwait().
* locks/win32/proc_mutex.c
* locks/win32/thread_cond.c
* locks/win32/thread_mutex.c
(apr_proc_mutex_timedlock, thread_cond_timedwait,
apr_thread_mutex_timedlock): Use apr_wait_for_single_object().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1860075 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
This fixes PR 45455 and 51360.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1859584 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
Windows.
This also fixes problem that apr_thread_once() may return before the other
read completes initialization on Windows.
[1] https://docs.microsoft.com/en-gb/windows/desktop/Sync/one-time-initialization
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1859517 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
is minimum supported Windows version.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1859513 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
since there always available on all supported platforms.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1859475 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ZwQueryInformationFile() to allocated size of file.
* file_io/win32/filestat.c
(more_finfo): Use GetFileInformationByHandleEx(FileAllocationInfo).
* include/arch/win32/apr_arch_misc.h
(IOSB, FSI, apr_winapi_ZwQueryInformationFile): Remove.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1858659 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1858596 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1856050 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1856046 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1856043 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Which should be the case on modern platforms, no change for others.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1856042 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Read the WIN32_FIND_DATA::dwReserved0 field to determine whether reparse point
is a "name surrogate".
It's probably more safe to bind to specifig tags. If provided structure
(wininfo) was not resulted from FindFile* call, then additional FindFirstFile
call is performed. However this may be unnecessary, because the alternate
GetFileInformation call is used in the case of an open file handle, and
APR_FINFO_LINK has no meaning when it comes to open files.
Submitted by: Oleg Liatte <olegliatte gmail.com>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1855949 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1855864 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
resolution of if_indextoname and if_nametoindex.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1855855 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
__APPLE__
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1855558 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1855049 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
No asm volatile is used there, so prefer native over mutexes.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1851542 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
The can't be two apr_atomic_init(), atomic/mutex64.c shouldn't implement one
since generic/mutex implementation may be used by several platforms.
So introduce private apr__atomic_generic64_init() and use it where needed.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1851541 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1850087 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1841078 13f79535-47bb-0310-9956-ffa450edef68
|