summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* On 'xmllite' branch: Merge changes from trunk.xmlliteIvan Zhakov2019-05-2710-104/+102
|\ | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1860149 13f79535-47bb-0310-9956-ffa450edef68
| * Use manual reset events for OVERLAPPED I/O on Windows: I/O operations resetIvan Zhakov2019-05-272-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provided event to non-signaled state automatically [1]. Using automatic reset events is not recommended: [[[ Functions such as ReadFile and WriteFile set this handle to the nonsignaled state before they begin an I/O operation. When the operation has completed, the handle is set to the signaled state. Functions such as GetOverlappedResult and the synchronization wait functions reset auto-reset events to the nonsignaled state. Therefore, you should use a manual reset event; if you use an auto-reset event, your application can stop responding if you wait for the operation to complete and then call GetOverlappedResult with the bWait parameter set to TRUE. ]]] [1] https://docs.microsoft.com/en-gb/windows/desktop/api/minwinbase/ns-minwinbase-_overlapped git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860110 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/open.cIvan Zhakov2019-05-271-1/+2
| | | | | | | | | | | | (read_with_timeout): Reduce local variable scope. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860109 13f79535-47bb-0310-9956-ffa450edef68
| * Optimize overlapped I/O for files and pipes on Windows.Ivan Zhakov2019-05-271-10/+30
| | | | | | | | | | | | | | | | | | * file_io/win32/open.c (read_with_timeout, apr_file_write): Check that overlapped I/O operation already completed by macro HasOverlappedIoCompleted() before calling kernel via WaitForSingleObject(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860108 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/readwrite.cIvan Zhakov2019-05-271-8/+6
| | | | | | | | | | | | | | | | | | | | | | (read_with_timeout): We do not handle WAIT_ABANDONED here because they can be returned only when waiting for mutex [1], but not for events. [1] https://docs.microsoft.com/en-us/windows/desktop/api/synchapi/nf-synchapi-waitforsingleobject#return-value git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860107 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/open.cIvan Zhakov2019-05-271-5/+2
| | | | | | | | | | | | (make_sparse_file): Use apr_wait_for_single_object() helper. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860106 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/readwrite.cIvan Zhakov2019-05-271-18/+5
| | | | | | | | | | | | (read_with_timeout, apr_file_write): Use apr_wait_for_single_object() helper. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860105 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Factor out common code to private function apr_wait_for_single_object().Ivan Zhakov2019-05-265-62/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@1860075 13f79535-47bb-0310-9956-ffa450edef68
| * Fix handle leak in the Win32 apr_uid_current implementation.Ivan Zhakov2019-05-262-8/+22
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860057 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Update CHANGES file.Ivan Zhakov2019-05-271-0/+3
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1860148 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Fix indentation.Ivan Zhakov2019-05-261-4/+2
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1860056 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Increase chunk size for CDATA processing.Ivan Zhakov2019-05-261-1/+1
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1860055 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Merge changes from trunk.Ivan Zhakov2019-05-269-185/+109
|\ \ | |/ | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1860054 13f79535-47bb-0310-9956-ffa450edef68
| * Follow-up to r1859519.Ivan Zhakov2019-05-261-1/+1
| | | | | | | | | | | | | | | | * dso/win32/dso.c (apr_dso_load): Use DWORD instead of UINT for old error mode. The have same size, but it's better to use same type as API function (SetThreadErrorMode) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860052 13f79535-47bb-0310-9956-ffa450edef68
| * Follow-up to r1860045: Fix condition.Ivan Zhakov2019-05-261-1/+1
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860050 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/filestat.cIvan Zhakov2019-05-261-3/+2
| | | | | | | | | | | | (apr_file_attrs_set): Refactoring: do not assign BOOL to apr_status_t. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860046 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/filestat.cIvan Zhakov2019-05-261-8/+15
| | | | | | | | | | | | | | (apr_file_attrs_set): Don't do anything if we are not going to change attributes. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860045 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Remove ANSI codepath from apr_file_attrs_set().Ivan Zhakov2019-05-261-30/+6
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860044 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Correctly cancel write operation on timeout.Ivan Zhakov2019-05-261-19/+31
| | | | | | | | | | | | | | | | | | | | * file_io/win32/readwrite.c (apr_file_write): Get operation result after we cancelled I/O operation: operation may be finished after we got timeout, but before CancelIoEx() call. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860042 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/readwrite.cIvan Zhakov2019-05-262-3/+3
| | | | | | | | | | | | | | | | (apr_file_write): Use CancelIoEx() instead of CancelIo() to protect from potential race condition. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860038 13f79535-47bb-0310-9956-ffa450edef68
| * * file_io/win32/readwrite.cIvan Zhakov2019-05-261-2/+1
| | | | | | | | | | | | | | | | (apr_file_write): Remove check for apr_os_level >= APR_WIN_98 before CancelIo() call. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860035 13f79535-47bb-0310-9956-ffa450edef68
| * apr_generate_random_bytes: Use BCryptGenRandom() instead of CryptGenRandom()Ivan Zhakov2019-05-212-18/+13
| | | | | | | | | | | | | | on Windows. BCryptGenRandom() is significantly faster since it doesn't require to load crypto provider on every invocation. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859608 13f79535-47bb-0310-9956-ffa450edef68
| * Use native Slim Reader/Writer (SRW) locks on Windows for apr_rwlock_t.Ivan Zhakov2019-05-203-108/+44
| | | | | | | | | | | | This fixes PR 45455 and PR 51360. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859584 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Fix indentation.Ivan Zhakov2019-05-261-2/+1
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1860053 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Merge changes from trunk.Ivan Zhakov2019-05-2015-148/+151
|\ \ | |/ | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1859568 13f79535-47bb-0310-9956-ffa450edef68
| * * dso/win32/dso.cIvan Zhakov2019-05-191-2/+5
| | | | | | | | | | | | | | (apr_dso_load): Use SetThreadErrorMode() instead of SetErrorMode(), because SetErrorMode() is not thread-safe. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859519 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Remove non-unicode codepath from apr_dso_load().Ivan Zhakov2019-05-191-52/+21
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859518 13f79535-47bb-0310-9956-ffa450edef68
| * Use native one-time initialization [1] to implement apr_thread_once_t onIvan Zhakov2019-05-193-5/+28
| | | | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@1859517 13f79535-47bb-0310-9956-ffa450edef68
| * * CMakeLists.txt: Error if MIN_WINDOWS_VER set to Vista.Ivan Zhakov2019-05-191-1/+1
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859516 13f79535-47bb-0310-9956-ffa450edef68
| * * CMakeLists.txt: Set MIN_WINDOWS_VER to Windows 7 by default.Ivan Zhakov2019-05-191-1/+1
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859515 13f79535-47bb-0310-9956-ffa450edef68
| * * CMakeLists.txt: Define _WIN32_WINNT to 0x0601 by default, since Windows 7Ivan Zhakov2019-05-191-1/+1
| | | | | | | | | | | | | | is minimum supported Windows version. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859514 13f79535-47bb-0310-9956-ffa450edef68
| * * include/apr.hw: Define _WIN32_WINNT to 0x0601 by default, since Windows 7Ivan Zhakov2019-05-191-1/+1
| | | | | | | | | | | | | | is minimum supported Windows version. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859513 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Use INIT_ONCE to prevent loading delayed libraries multiple times.Ivan Zhakov2019-05-181-16/+29
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859477 13f79535-47bb-0310-9956-ffa450edef68
| * Follow-up to r1859473: Fix stupid typo: use *OFFSET instead of OFFSET inIvan Zhakov2019-05-181-1/+1
| | | | | | | | | | | | apr_file_seek() on Windows. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859476 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Do not use delay load for GetCompressedFileSize() and SetDllDirectoryW()Ivan Zhakov2019-05-181-29/+0
| | | | | | | | | | | | since there always available on all supported platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859475 13f79535-47bb-0310-9956-ffa450edef68
| * The minimum supported Windows OS versions are now Windows 7 / Windows ServerIvan Zhakov2019-05-181-0/+3
| | | | | | | | | | | | | | | | | | 2008 R2. See also: https://lists.apache.org/thread.html/de5af5247324db3e0636a654f2c23d3ff3a94a91f9d35adf5402b927@%3Cdev.apr.apache.org%3E git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859474 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Use SetFilePointerEx() instead of SetFilePointer().Ivan Zhakov2019-05-181-26/+21
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859473 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Use LoadLibraryW() instead of LoadLibraryA() to late load libraries.Ivan Zhakov2019-05-161-9/+9
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859405 13f79535-47bb-0310-9956-ffa450edef68
| * Refactoring: Combine lateDllName and lateDllHandle arrays to one array ofIvan Zhakov2019-05-161-15/+23
| | | | | | | | | | | | structures. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859404 13f79535-47bb-0310-9956-ffa450edef68
| * Fix issue 61109: Use LocalFree() instead of GlobalFree() to free result ofIvan Zhakov2019-05-161-1/+1
| | | | | | | | | | | | CommandLineToArgvW(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859402 13f79535-47bb-0310-9956-ffa450edef68
| * * test/testbuckest.c (flatten_match): Fix error message (thanks to gcc warning).Joe Orton2019-05-161-1/+1
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859391 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Check return value from apr_generate_random_bytes() inIvan Zhakov2019-05-161-2/+8
| | | | | | | | | | | | file_pipe_create(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859356 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Fix handle leak apr_shm_create() implementation.Ivan Zhakov2019-05-151-2/+6
| | | | | | | | | | | | | | | | | | * shmem/win32/shm.c (can_create_global_maps): Close thread/process token after checking for privilege. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859270 13f79535-47bb-0310-9956-ffa450edef68
| * win32: Use LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR flag for LoadLibraryExW inIvan Zhakov2019-05-151-10/+4
| | | | | | | | | | | | | | apr_dso() instead of calling SetDllDirectory(). SetDllDirectory() changes global state and using it may lead to security issues on race conditions. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859265 13f79535-47bb-0310-9956-ffa450edef68
| * apr_dir_read: Do not request short file names on Windows 7 and later. ThisIvan Zhakov2019-05-131-1/+15
| | | | | | | | | | | | | | significantly improves directory listing performance on volumes with 8.3 filenames enabled (default for system volume). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859174 13f79535-47bb-0310-9956-ffa450edef68
| * Use API constant instead of magic number.Ivan Zhakov2019-05-131-1/+1
| | | | | | | | | | | | | | | | * threadproc/win32/threadpriv.c (apr_threadkey_private_create): Use TLS_OUT_OF_INDEXES instead of hardcoded 0xFFFFFFFF. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859171 13f79535-47bb-0310-9956-ffa450edef68
* | On 'xmllite' branch: Merge changes from trunk.Ivan Zhakov2019-05-121-0/+87
|\ \ | |/ | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/xmllite@1859155 13f79535-47bb-0310-9956-ffa450edef68
| * Add simple tests for apr_xml_parser_geterror().Ivan Zhakov2019-05-121-0/+51
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859154 13f79535-47bb-0310-9956-ffa450edef68
| * Add more XML tests.Ivan Zhakov2019-05-121-0/+34
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859153 13f79535-47bb-0310-9956-ffa450edef68
| * Call apr_xml_quote_elem() before apr_xml_to_text() in round-trip XML tests.Ivan Zhakov2019-05-121-0/+2
| | | | | | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859152 13f79535-47bb-0310-9956-ffa450edef68