diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-06-07 12:12:54 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-06-07 12:12:54 +0000 |
commit | f228e17c9647d9c6b27593169643127efdcf3253 (patch) | |
tree | 07485245ed01295e15ff3013529f341b204f7c55 /file_io | |
parent | be81d32ebf4ab1c7c263500180b240036e48102e (diff) | |
download | apr-f228e17c9647d9c6b27593169643127efdcf3253.tar.gz |
* include/arch/win32/apr_arch_file_io.h
(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: https://svn.apache.org/repos/asf/apr/apr/trunk@1860748 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/dir.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/file_io/win32/dir.c b/file_io/win32/dir.c index 6ddcfe64b..e97447cd6 100644 --- a/file_io/win32/dir.c +++ b/file_io/win32/dir.c @@ -65,7 +65,7 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname, /* Create a buffer for the longest file name we will ever see */ - (*new)->w.entry = apr_pcalloc(pool, sizeof(WIN32_FIND_DATAW)); + (*new)->entry = apr_pcalloc(pool, sizeof(WIN32_FIND_DATAW)); (*new)->name = apr_pcalloc(pool, APR_FILE_MAX * 3 + 1); (*new)->rootlen = len - 1; (*new)->pool = pool; @@ -126,7 +126,7 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, } thedir->dirhand = FindFirstFileExW(wdirname, info_level, - thedir->w.entry, + thedir->entry, FindExSearchNameMatch, NULL, 0); eos[0] = '\0'; @@ -143,23 +143,23 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, */ thedir->bof = 0; } - else if (!FindNextFileW(thedir->dirhand, thedir->w.entry)) { + else if (!FindNextFileW(thedir->dirhand, thedir->entry)) { return apr_get_os_error(); } while (thedir->rootlen && - thedir->rootlen + wcslen(thedir->w.entry->cFileName) >= APR_PATH_MAX) + thedir->rootlen + wcslen(thedir->entry->cFileName) >= APR_PATH_MAX) { - if (!FindNextFileW(thedir->dirhand, thedir->w.entry)) { + if (!FindNextFileW(thedir->dirhand, thedir->entry)) { return apr_get_os_error(); } } if ((rv = unicode_to_utf8_path(thedir->name, APR_FILE_MAX * 3 + 1, - thedir->w.entry->cFileName))) + thedir->entry->cFileName))) return rv; fname = thedir->name; - fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) thedir->w.entry, + fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) thedir->entry, 0, 1, fname, wanted); finfo->pool = thedir->pool; @@ -184,7 +184,7 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, eos = wcschr(wdirname, '\0'); } - wcscpy(eos, thedir->w.entry->cFileName); + wcscpy(eos, thedir->entry->cFileName); rv = more_finfo(finfo, wdirname, wanted, MORE_OF_WFSPEC); eos[0] = '\0'; return rv; |