[Core] Fix Windows build after apr-util removal

This commit is contained in:
Andrey Volk
2022-08-19 02:51:59 +03:00
parent 85d25e269b
commit dd3075a203
12 changed files with 86 additions and 1524 deletions
+10 -10
View File
@@ -63,7 +63,7 @@
#include <glob.h>
#else /* we're on windoze :( */
/* glob functions at end of this file */
#include <apr_file_io.h>
#include <fspr_file_io.h>
typedef struct {
size_t gl_pathc; /* Count of total paths so far. */
@@ -3626,19 +3626,19 @@ static int glob2(char *pathbuf, char *pathend, char *pathend_last, char *pattern
static int glob3(char *pathbuf, char *pathend, char *pathend_last, char *pattern, char *restpattern, glob_t *pglob, size_t *limit)
{
int err;
apr_dir_t *dirp;
apr_pool_t *pool;
fspr_dir_t *dirp;
fspr_pool_t *pool;
apr_pool_create(&pool, NULL);
fspr_pool_create(&pool, NULL);
if (pathend > pathend_last)
return (GLOB_ABORTED);
*pathend = EOS;
errno = 0;
if (apr_dir_open(&dirp, pathbuf, pool) != APR_SUCCESS) {
if (fspr_dir_open(&dirp, pathbuf, pool) != APR_SUCCESS) {
/* TODO: don't call for ENOENT or ENOTDIR? */
apr_pool_destroy(pool);
fspr_pool_destroy(pool);
if (pglob->gl_errfunc) {
if (pglob->gl_errfunc(pathbuf, errno) || pglob->gl_flags & GLOB_ERR)
return (GLOB_ABORTED);
@@ -3650,11 +3650,11 @@ static int glob3(char *pathbuf, char *pathend, char *pathend_last, char *pattern
/* Search directory for matching names. */
while (dirp) {
apr_finfo_t dp;
fspr_finfo_t dp;
unsigned char *sc;
char *dc;
if (apr_dir_read(&dp, APR_FINFO_NAME, dirp) != APR_SUCCESS)
if (fspr_dir_read(&dp, APR_FINFO_NAME, dirp) != APR_SUCCESS)
break;
if (!(dp.valid & APR_FINFO_NAME) || !(dp.name) || !strlen(dp.name))
break;
@@ -3677,8 +3677,8 @@ static int glob3(char *pathbuf, char *pathend, char *pathend_last, char *pattern
}
if (dirp)
apr_dir_close(dirp);
apr_pool_destroy(pool);
fspr_dir_close(dirp);
fspr_pool_destroy(pool);
return (err);
}