summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apr.dsp4
-rw-r--r--aprlib.def18
-rw-r--r--aprlib.dsp4
-rw-r--r--file_io/os2/dir.c7
-rw-r--r--file_io/os2/fileio.h3
-rw-r--r--file_io/os2/filestat.c11
-rw-r--r--file_io/os2/readwrite.c2
-rw-r--r--file_io/unix/dir.c4
-rw-r--r--file_io/unix/filestat.c22
-rw-r--r--file_io/unix/readwrite.c4
-rw-r--r--file_io/win32/dir.c2
-rw-r--r--file_io/win32/fileio.h12
-rw-r--r--file_io/win32/filestat.c8
-rw-r--r--file_io/win32/open.c4
-rw-r--r--file_io/win32/pipe.c14
-rw-r--r--i18n/unix/xlate.c24
-rw-r--r--include/apr.h.in8
-rw-r--r--include/apr.hw4
-rw-r--r--include/apr_compat.h37
-rw-r--r--include/apr_file_io.h8
-rw-r--r--include/apr_getopt.h10
-rw-r--r--include/apr_hash.h6
-rw-r--r--include/apr_lib.h38
-rw-r--r--include/apr_md5.h27
-rw-r--r--include/apr_network_io.h10
-rw-r--r--include/apr_pools.h40
-rw-r--r--include/apr_portable.h24
-rw-r--r--include/apr_tables.h12
-rw-r--r--include/apr_thread_proc.h4
-rw-r--r--include/apr_time.h28
-rw-r--r--include/apr_xlate.h46
-rw-r--r--include/arch/os2/fileio.h3
-rw-r--r--include/arch/unix/misc.h37
-rw-r--r--include/arch/win32/fileio.h12
-rw-r--r--include/arch/win32/misc.h37
-rw-r--r--lib/apr_pools.c14
-rw-r--r--lib/apr_signal.c2
-rw-r--r--libapr.def18
-rw-r--r--locks/beos/crossproc.c2
-rw-r--r--locks/beos/intraproc.c2
-rw-r--r--memory/unix/apr_pools.c14
-rw-r--r--misc/unix/errorcodes.c4
-rw-r--r--misc/unix/getopt.c64
-rw-r--r--misc/unix/misc.h37
-rw-r--r--misc/win32/misc.c4
-rw-r--r--misc/win32/names.c6
-rw-r--r--network_io/beos/poll.c4
-rw-r--r--network_io/beos/sendrecv.c4
-rw-r--r--network_io/beos/sockets.c2
-rw-r--r--network_io/os2/poll.c2
-rw-r--r--network_io/os2/sockets.c2
-rw-r--r--network_io/unix/poll.c4
-rw-r--r--network_io/unix/sendrecv.c4
-rw-r--r--network_io/unix/sockets.c2
-rw-r--r--network_io/win32/poll.c4
-rw-r--r--network_io/win32/sockets.c2
-rw-r--r--passwd/apr_md5.c32
-rw-r--r--strings/apr_cpystrn.c12
-rw-r--r--strings/apr_fnmatch.c8
-rw-r--r--strings/apr_snprintf.c43
-rw-r--r--tables/apr_hash.c36
-rw-r--r--tables/apr_tables.c36
-rw-r--r--test/client.c2
-rw-r--r--test/testargs.c6
-rw-r--r--test/testfile.c2
-rw-r--r--test/testmd5.c8
-rw-r--r--test/testpipe.c2
-rw-r--r--test/testsf.c2
-rw-r--r--test/testtime.c2
-rw-r--r--threadproc/beos/proc.c2
-rw-r--r--threadproc/os2/proc.c4
-rw-r--r--threadproc/os2/thread.c8
-rw-r--r--threadproc/unix/proc.c2
-rw-r--r--threadproc/win32/proc.c23
-rw-r--r--threadproc/win32/signals.c2
-rw-r--r--time/unix/time.c50
-rw-r--r--time/unix/timestr.c18
-rw-r--r--time/win32/access.c30
-rw-r--r--time/win32/time.c27
-rw-r--r--time/win32/timestr.c18
80 files changed, 588 insertions, 518 deletions
diff --git a/apr.dsp b/apr.dsp
index fd30b5d35..a56676897 100644
--- a/apr.dsp
+++ b/apr.dsp
@@ -364,6 +364,10 @@ InputPath=.\include\apr.hw
# End Source File
# Begin Source File
+SOURCE=.\include\apr_compat.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\apr_dso.h
# End Source File
# Begin Source File
diff --git a/aprlib.def b/aprlib.def
index dbf1cdb1d..118cd997d 100644
--- a/aprlib.def
+++ b/aprlib.def
@@ -118,7 +118,7 @@ EXPORTS
; apr_get_os_proc @109
apr_get_os_thread @110
apr_get_os_threadkey @111
- ap_os_systemcase_filename @112
+ apr_os_systemcase_filename @112
canonical_filename @113
apr_create_pool @114
apr_clear_pool @115
@@ -128,13 +128,13 @@ EXPORTS
apr_set_userdata @119
apr_initialize @120
apr_getopt @121
- ap_opterr @122 DATA
- ap_optind @123 DATA
- ap_optopt @124 DATA
- ap_optreset @125 DATA
- ap_optarg @126 DATA
+ apr_opterr @122 DATA
+ apr_optind @123 DATA
+ apr_optopt @124 DATA
+ apr_optreset @125 DATA
+ apr_optarg @126 DATA
; apr_make_time @127
- apr_ansi_time_to_ap_time @127
+ apr_ansi_time_to_apr_time @127
; apr_current_time @128
apr_now @128
; apr_explode_time @129
@@ -242,8 +242,8 @@ EXPORTS
apr_dso_sym @221
; apr_dso_init @222
apr_collapse_spaces @223
- ap_month_snames @224
- ap_day_snames @225
+ apr_month_snames @224
+ apr_day_snames @225
apr_canonical_error @226
apr_strerror @227
apr_generate_random_bytes @228
diff --git a/aprlib.dsp b/aprlib.dsp
index fd30b5d35..a56676897 100644
--- a/aprlib.dsp
+++ b/aprlib.dsp
@@ -364,6 +364,10 @@ InputPath=.\include\apr.hw
# End Source File
# Begin Source File
+SOURCE=.\include\apr_compat.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\apr_dso.h
# End Source File
# Begin Source File
diff --git a/file_io/os2/dir.c b/file_io/os2/dir.c
index 05674c69e..84529ba9e 100644
--- a/file_io/os2/dir.c
+++ b/file_io/os2/dir.c
@@ -172,7 +172,8 @@ apr_status_t apr_dir_entry_size(apr_ssize_t *size, apr_dir_t *thedir)
apr_status_t apr_dir_entry_mtime(apr_time_t *time, apr_dir_t *thedir)
{
if (thedir->validentry) {
- ap_os2_time_to_ap_time(time, thedir->entry.fdateLastWrite, thedir->entry.ftimeLastWrite);
+ apr_os2_time_to_apr_time(time, thedir->entry.fdateLastWrite,
+ thedir->entry.ftimeLastWrite);
return APR_SUCCESS;
}
@@ -181,12 +182,12 @@ apr_status_t apr_dir_entry_mtime(apr_time_t *time, apr_dir_t *thedir)
-apr_status_t apr_dir_entry_ftype(ap_filetype_e *type, apr_dir_t *thedir)
+apr_status_t apr_dir_entry_ftype(apr_filetype_e *type, apr_dir_t *thedir)
{
int rc;
HFILE hFile;
ULONG action, Type, Attr;
- ap_filetype_e typemap[8] = { APR_REG, APR_CHR, APR_PIPE };
+ apr_filetype_e typemap[8] = { APR_REG, APR_CHR, APR_PIPE };
if (thedir->validentry) {
if (thedir->entry.attrFile & FILE_DIRECTORY) {
diff --git a/file_io/os2/fileio.h b/file_io/os2/fileio.h
index 6aa1be1c5..5051cacc9 100644
--- a/file_io/os2/fileio.h
+++ b/file_io/os2/fileio.h
@@ -97,7 +97,8 @@ struct apr_dir_t {
};
apr_status_t apr_file_cleanup(void *);
-apr_status_t ap_os2_time_to_ap_time(apr_time_t *result, FDATE os2date, FTIME os2time);
+apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date,
+ FTIME os2time);
#endif /* ! FILE_IO_H */
diff --git a/file_io/os2/filestat.c b/file_io/os2/filestat.c
index 43dc3f152..544f95ad4 100644
--- a/file_io/os2/filestat.c
+++ b/file_io/os2/filestat.c
@@ -75,14 +75,17 @@ static void FS3_to_finfo(apr_finfo_t *finfo, FILESTATUS3 *fstatus)
finfo->inode = 0;
finfo->device = 0;
finfo->size = fstatus->cbFile;
- ap_os2_time_to_ap_time(&finfo->atime, fstatus->fdateLastAccess, fstatus->ftimeLastAccess );
- ap_os2_time_to_ap_time(&finfo->mtime, fstatus->fdateLastWrite, fstatus->ftimeLastWrite );
- ap_os2_time_to_ap_time(&finfo->ctime, fstatus->fdateCreation, fstatus->ftimeCreation );
+ apr_os2_time_to_apr_time(&finfo->atime, fstatus->fdateLastAccess,
+ fstatus->ftimeLastAccess );
+ apr_os2_time_to_apr_time(&finfo->mtime, fstatus->fdateLastWrite,
+ fstatus->ftimeLastWrite );
+ apr_os2_time_to_apr_time(&finfo->ctime, fstatus->fdateCreation,
+ fstatus->ftimeCreation );
}
-static apr_status_t handle_type(ap_filetype_e *ftype, HFILE file)
+static apr_status_t handle_type(apr_filetype_e *ftype, HFILE file)
{
ULONG filetype, fileattr, rc;
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index 5bf040ac3..310e2df9a 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -346,7 +346,7 @@ APR_EXPORT(int) apr_fprintf(apr_file_t *fptr, const char *format, ...)
-apr_status_t ap_file_check_read(apr_file_t *fd)
+apr_status_t apr_file_check_read(apr_file_t *fd)
{
int rc;
diff --git a/file_io/unix/dir.c b/file_io/unix/dir.c
index 2bddb4a31..bfbf85ab3 100644
--- a/file_io/unix/dir.c
+++ b/file_io/unix/dir.c
@@ -200,11 +200,11 @@ apr_status_t apr_dir_entry_mtime(apr_time_t *mtime, apr_dir_t *thedir)
return errno;
}
- apr_ansi_time_to_ap_time(mtime, filestat.st_mtime);
+ apr_ansi_time_to_apr_time(mtime, filestat.st_mtime);
return APR_SUCCESS;
}
-apr_status_t apr_dir_entry_ftype(ap_filetype_e *type, apr_dir_t *thedir)
+apr_status_t apr_dir_entry_ftype(apr_filetype_e *type, apr_dir_t *thedir)
{
struct stat filestat;
char *fname = NULL;
diff --git a/file_io/unix/filestat.c b/file_io/unix/filestat.c
index 07fc4281f..0e14fdafd 100644
--- a/file_io/unix/filestat.c
+++ b/file_io/unix/filestat.c
@@ -57,9 +57,9 @@
#include "apr_general.h"
#include "apr_errno.h"
-static ap_filetype_e filetype_from_mode(int mode)
+static apr_filetype_e filetype_from_mode(int mode)
{
- ap_filetype_e type = APR_NOFILE;
+ apr_filetype_e type = APR_NOFILE;
if (S_ISREG(mode))
type = APR_REG;
@@ -92,9 +92,9 @@ apr_status_t apr_getfileinfo(apr_finfo_t *finfo, apr_file_t *thefile)
finfo->size = info.st_size;
finfo->inode = info.st_ino;
finfo->device = info.st_dev;
- apr_ansi_time_to_ap_time(&finfo->atime, info.st_atime);
- apr_ansi_time_to_ap_time(&finfo->mtime, info.st_mtime);
- apr_ansi_time_to_ap_time(&finfo->ctime, info.st_ctime);
+ apr_ansi_time_to_apr_time(&finfo->atime, info.st_atime);
+ apr_ansi_time_to_apr_time(&finfo->mtime, info.st_mtime);
+ apr_ansi_time_to_apr_time(&finfo->ctime, info.st_ctime);
return APR_SUCCESS;
}
else {
@@ -123,9 +123,9 @@ apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname, apr_pool_t *cont)
finfo->size = info.st_size;
finfo->inode = info.st_ino;
finfo->device = info.st_dev;
- apr_ansi_time_to_ap_time(&finfo->atime, info.st_atime);
- apr_ansi_time_to_ap_time(&finfo->mtime, info.st_mtime);
- apr_ansi_time_to_ap_time(&finfo->ctime, info.st_ctime);
+ apr_ansi_time_to_apr_time(&finfo->atime, info.st_atime);
+ apr_ansi_time_to_apr_time(&finfo->mtime, info.st_mtime);
+ apr_ansi_time_to_apr_time(&finfo->ctime, info.st_ctime);
return APR_SUCCESS;
}
else {
@@ -145,9 +145,9 @@ apr_status_t apr_lstat(apr_finfo_t *finfo, const char *fname, apr_pool_t *cont)
finfo->size = info.st_size;
finfo->inode = info.st_ino;
finfo->device = info.st_dev;
- apr_ansi_time_to_ap_time(&finfo->atime, info.st_atime);
- apr_ansi_time_to_ap_time(&finfo->mtime, info.st_mtime);
- apr_ansi_time_to_ap_time(&finfo->ctime, info.st_ctime);
+ apr_ansi_time_to_apr_time(&finfo->atime, info.st_atime);
+ apr_ansi_time_to_apr_time(&finfo->mtime, info.st_mtime);
+ apr_ansi_time_to_apr_time(&finfo->ctime, info.st_ctime);
return APR_SUCCESS;
}
else {
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 6fdb136c2..f013f0f89 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -74,8 +74,8 @@ static apr_status_t wait_for_io_or_timeout(apr_file_t *file, int for_read)
FD_ZERO(&fdset);
FD_SET(file->filedes, &fdset);
if (file->timeout >= 0) {
- tv.tv_sec = file->timeout / AP_USEC_PER_SEC;
- tv.tv_usec = file->timeout % AP_USEC_PER_SEC;
+ tv.tv_sec = file->timeout / APR_USEC_PER_SEC;
+ tv.tv_usec = file->timeout % APR_USEC_PER_SEC;
tvptr = &tv;
}
else {
diff --git a/file_io/win32/dir.c b/file_io/win32/dir.c
index a9ce5d3fa..2d0d6accb 100644
--- a/file_io/win32/dir.c
+++ b/file_io/win32/dir.c
@@ -179,7 +179,7 @@ apr_status_t apr_dir_entry_mtime(apr_time_t *time, apr_dir_t *thedir)
return APR_SUCCESS;
}
-apr_status_t apr_dir_entry_ftype(ap_filetype_e *type, apr_dir_t *thedir)
+apr_status_t apr_dir_entry_ftype(apr_filetype_e *type, apr_dir_t *thedir)
{
switch(thedir->entry->dwFileAttributes) {
case FILE_ATTRIBUTE_DIRECTORY: {
diff --git a/file_io/win32/fileio.h b/file_io/win32/fileio.h
index bfdda7421..661154ead 100644
--- a/file_io/win32/fileio.h
+++ b/file_io/win32/fileio.h
@@ -92,7 +92,7 @@
* fname -- the filename as passed to the open call.
* dwFileAttricutes -- Attributes used to open the file.
* demonfname -- the canonicalized filename. Used to store the result from
- * ap_os_canonicalize_filename.
+ * apr_os_canonicalize_filename.
* lowerdemonfname -- inserted at Ken Parzygnat's request, because of the
* ugly way windows deals with case in the filesystem.
* append -- Windows doesn't support the append concept when opening files.
@@ -143,12 +143,12 @@ struct apr_dir_t {
apr_status_t file_cleanup(void *);
/*mode_t get_fileperms(apr_fileperms_t);
*/
-APR_EXPORT(char *) ap_os_systemcase_filename(struct apr_pool_t *pCont,
- const char *szFile);
+APR_EXPORT(char *) apr_os_systemcase_filename(struct apr_pool_t *pCont,
+ const char *szFile);
char * canonical_filename(struct apr_pool_t *pCont, const char *szFile);
-apr_status_t ap_create_nt_pipe(apr_file_t **in, apr_file_t **out,
- BOOLEAN bAsyncRead, BOOLEAN bAsyncWrite,
- apr_pool_t *p);
+apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
+ BOOLEAN bAsyncRead, BOOLEAN bAsyncWrite,
+ apr_pool_t *p);
#endif /* ! FILE_IO_H */
diff --git a/file_io/win32/filestat.c b/file_io/win32/filestat.c
index 05082aacd..2477cf94d 100644
--- a/file_io/win32/filestat.c
+++ b/file_io/win32/filestat.c
@@ -66,9 +66,9 @@
#define S_ISREG(m) (((m) & (S_IFMT)) == S_IFREG)
#define S_ISDIR(m) (((m) & (S_IFDIR)) == S_IFDIR)
-static ap_filetype_e filetype_from_mode(int mode)
+static apr_filetype_e filetype_from_mode(int mode)
{
- ap_filetype_e type = APR_NOFILE;
+ apr_filetype_e type = APR_NOFILE;
if (S_ISREG(mode))
type = APR_REG;
@@ -194,7 +194,7 @@ apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname, apr_pool_t *cont)
*/
WIN32_FIND_DATA FileInformation;
HANDLE hFind;
- ap_oslevel_e os_level;
+ apr_oslevel_e os_level;
apr_status_t rv = APR_SUCCESS;
memset(finfo,'\0', sizeof(*finfo));
@@ -208,7 +208,7 @@ apr_status_t apr_stat(apr_finfo_t *finfo, const char *fname, apr_pool_t *cont)
if (strlen(fname) >= MAX_PATH) {
rv = ERROR_FILENAME_EXCED_RANGE;
}
- else if (!ap_get_oslevel(cont, &os_level) && os_level >= APR_WIN_98) {
+ else if (!apr_get_oslevel(cont, &os_level) && os_level >= APR_WIN_98) {
if (!GetFileAttributesEx(fname, GetFileExInfoStandard,
(WIN32_FILE_ATTRIBUTE_DATA*) &FileInformation)) {
rv = GetLastError();
diff --git a/file_io/win32/open.c b/file_io/win32/open.c
index 689453a0b..b303465b5 100644
--- a/file_io/win32/open.c
+++ b/file_io/win32/open.c
@@ -82,7 +82,7 @@ apr_status_t apr_open(apr_file_t **new, const char *fname,
DWORD createflags = 0;
DWORD attributes = 0;
DWORD sharemode = FILE_SHARE_READ | FILE_SHARE_WRITE;
- ap_oslevel_e level;
+ apr_oslevel_e level;
apr_status_t rv;
if ((*new) == NULL) {
@@ -117,7 +117,7 @@ apr_status_t apr_open(apr_file_t **new, const char *fname,
(*new)->demonfname = canonical_filename((*new)->cntxt, fname);
(*new)->lowerdemonfname = strlwr((*new)->demonfname);
- if (ap_get_oslevel(cont, &level) == APR_SUCCESS && level >= APR_WIN_NT) {
+ if (apr_get_oslevel(cont, &level) == APR_SUCCESS && level >= APR_WIN_NT) {
sharemode |= FILE_SHARE_DELETE;
}
diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c
index 732ba577f..19c9e557b 100644
--- a/file_io/win32/pipe.c
+++ b/file_io/win32/pipe.c
@@ -108,10 +108,10 @@ apr_status_t apr_create_pipe(apr_file_t **in, apr_file_t **out, apr_pool_t *p)
return APR_SUCCESS;
}
-/* ap_create_nt_pipe()
+/* apr_create_nt_pipe()
* An internal (for now) APR function created for use by apr_create_process()
* when setting up pipes to communicate with the child process.
- * ap_create_nt_pipe() allows setting the blocking mode of each end of
+ * apr_create_nt_pipe() allows setting the blocking mode of each end of
* the pipe when the pipe is created (rather than after the pipe is created).
* A pipe handle must be opened in full async i/o mode in order to
* emulate Unix non-blocking pipes with timeouts.
@@ -128,11 +128,11 @@ apr_status_t apr_create_pipe(apr_file_t **in, apr_file_t **out, apr_pool_t *p)
*
* wgs
*/
-apr_status_t ap_create_nt_pipe(apr_file_t **in, apr_file_t **out,
- BOOLEAN bAsyncRead, BOOLEAN bAsyncWrite,
- apr_pool_t *p)
+apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
+ BOOLEAN bAsyncRead, BOOLEAN bAsyncWrite,
+ apr_pool_t *p)
{
- ap_oslevel_e level;
+ apr_oslevel_e level;
SECURITY_ATTRIBUTES sa;
static unsigned long id = 0;
DWORD dwPipeMode;
@@ -169,7 +169,7 @@ apr_status_t ap_create_nt_pipe(apr_file_t **in, apr_file_t **out,
(*out)->direction = 0;
(*out)->pOverlapped = NULL;
- if (ap_get_oslevel(p, &level) == APR_SUCCESS && level >= APR_WIN_NT) {
+ if (apr_get_oslevel(p, &level) == APR_SUCCESS && level >= APR_WIN_NT) {
/* Create the read end of the pipe */
dwOpenMode = PIPE_ACCESS_INBOUND;
if (bAsyncRead) {
diff --git a/i18n/unix/xlate.c b/i18n/unix/xlate.c
index 8af33873e..acd2e58c1 100644
--- a/i18n/unix/xlate.c
+++ b/i18n/unix/xlate.c
@@ -156,7 +156,7 @@ static const char *handle_special_names(const char *page)
}
}
-static apr_status_t ap_xlate_cleanup(void *convset)
+static apr_status_t apr_xlate_cleanup(void *convset)
{
#ifdef HAVE_ICONV
apr_xlate_t *old = convset;
@@ -203,8 +203,8 @@ static void check_sbcs(apr_xlate_t *convset)
}
#endif /* HAVE_ICONV */
-apr_status_t ap_xlate_open(apr_xlate_t **convset, const char *topage,
- const char *frompage, apr_pool_t *pool)
+apr_status_t apr_xlate_open(apr_xlate_t **convset, const char *topage,
+ const char *frompage, apr_pool_t *pool)
{
apr_status_t status;
apr_xlate_t *new;
@@ -248,7 +248,7 @@ apr_status_t ap_xlate_open(apr_xlate_t **convset, const char *topage,
if (found) {
*convset = new;
- apr_register_cleanup(pool, (void *)new, ap_xlate_cleanup,
+ apr_register_cleanup(pool, (void *)new, apr_xlate_cleanup,
apr_null_cleanup);
status = APR_SUCCESS;
}
@@ -260,15 +260,15 @@ apr_status_t ap_xlate_open(apr_xlate_t **convset, const char *topage,
return status;
}
-apr_status_t ap_xlate_get_sb(apr_xlate_t *convset, int *onoff)
+apr_status_t apr_xlate_get_sb(apr_xlate_t *convset, int *onoff)
{
*onoff = convset->sbcs_table != NULL;
return APR_SUCCESS;
}
-apr_status_t ap_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
- apr_size_t *inbytes_left, char *outbuf,
- apr_size_t *outbytes_left)
+apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
+ apr_size_t *inbytes_left, char *outbuf,
+ apr_size_t *outbytes_left)
{
apr_status_t status = APR_SUCCESS;
#ifdef HAVE_ICONV
@@ -329,7 +329,7 @@ apr_status_t ap_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
return status;
}
-apr_int32_t ap_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar)
+apr_int32_t apr_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar)
{
if (convset->sbcs_table) {
return convset->sbcs_table[inchar];
@@ -339,12 +339,12 @@ apr_int32_t ap_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar)
}
}
-apr_status_t ap_xlate_close(apr_xlate_t *convset)
+apr_status_t apr_xlate_close(apr_xlate_t *convset)
{
apr_status_t status;
- if ((status = ap_xlate_cleanup(convset)) == APR_SUCCESS) {
- apr_kill_cleanup(convset->pool, convset, ap_xlate_cleanup);
+ if ((status = apr_xlate_cleanup(convset)) == APR_SUCCESS) {
+ apr_kill_cleanup(convset->pool, convset, apr_xlate_cleanup);
}
return status;
diff --git a/include/apr.h.in b/include/apr.h.in
index 8f903fd2a..42e853b9d 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -15,11 +15,11 @@
#if !defined(__GNUC__) || __GNUC__ < 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
defined(NEXT)
-#define ap_inline
+#define apr_inline
#define __attribute__(__x)
#define ENUM_BITFIELD(e,n,w) signed int n : w
#else
-#define ap_inline __inline__
+#define apr_inline __inline__
#define USE_GNU_INLINE
#define ENUM_BITFIELD(e,n,w) e n : w
#endif
@@ -158,12 +158,12 @@ Sigfunc *apr_signal(int signo, Sigfunc * func);
#include <sys/wait.h>
#ifdef WEXITSTATUS
-#define ap_wait_t int
+#define apr_wait_t int
#else
/* We don't have a POSIX wait interface. Assume we have the old-style. Is this
* a bad assumption? */
/* Yessiree bob, it was... but will this work instead? */
-#define ap_wait_t union wait
+#define apr_wait_t union wait
#define WEXITSTATUS(status) (int)((status).w_retcode)
#define WTERMSIG(status) (int)((status).w_termsig)
#endif /* !WEXITSTATUS */
diff --git a/include/apr.hw b/include/apr.hw
index 1f6f31843..2e151108b 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -109,7 +109,7 @@
#include <signal.h>
#include <stdlib.h>
-#define ap_inline
+#define apr_inline
#define __attribute__(__x)
#define ENUM_BITFIELD(e,n,w) signed int n : w
@@ -199,7 +199,7 @@ typedef int gid_t;
#define apr_signal(a,b) signal(a,b)
-typedef int ap_wait_t;
+typedef int apr_wait_t;
/* struct iovec is needed to emulate Unix writev */
struct iovec {
diff --git a/include/apr_compat.h b/include/apr_compat.h
index 31a99e466..e291a325f 100644
--- a/include/apr_compat.h
+++ b/include/apr_compat.h
@@ -3,12 +3,16 @@
/* redefine 1.3.x symbols to those that now live in libapr */
+#define ap_inline apr_inline
+
+#define ap_md5_ctx_t apr_md5_ctx_t
#define ap_MD5Encode apr_MD5Encode
#define ap_MD5Final apr_MD5Final
#define ap_MD5Init apr_MD5Init
#define ap_MD5Update apr_MD5Update
#define ap_append_arrays apr_append_arrays
#define ap_array_cat apr_array_cat
+#define ap_array_header_t apr_array_header_t
#define ap_array_pstrcat apr_array_pstrcat
#define ap_bytes_in_free_blocks apr_bytes_in_free_blocks
#define ap_bytes_in_pool apr_bytes_in_pool
@@ -19,20 +23,31 @@
#define ap_copy_array_hdr apr_copy_array_hdr
#define ap_copy_table apr_copy_table
#define ap_cpystrn apr_cpystrn
+#define ap_day_snames apr_day_snames
#define ap_destroy_pool apr_destroy_pool
+#define ap_exploded_time_t apr_exploded_time_t
#define ap_fnmatch apr_fnmatch
+#define ap_inet_addr apr_inet_addr
#define ap_init_alloc apr_init_alloc
+#define ap_is_empty_table apr_is_empty_table
#define ap_is_fnmatch apr_is_fnmatch
#define ap_kill_cleanup apr_kill_cleanup
#define ap_make_array apr_make_array
#define ap_make_sub_pool apr_make_sub_pool
#define ap_make_table apr_make_table
+#define ap_month_snames apr_month_snames
#define ap_note_subprocess apr_note_subprocess
#define ap_null_cleanup apr_null_cleanup
+#define ap_optarg apr_optarg
+#define ap_opterr apr_opterr
+#define ap_optind apr_optind
+#define ap_optopt apr_optopt
+#define ap_optreset apr_optreset
#define ap_overlap_tables apr_overlap_tables
#define ap_overlay_tables apr_overlay_tables
#define ap_palloc apr_palloc
#define ap_pcalloc apr_pcalloc
+#define ap_pool_join apr_pool_join
#define ap_psprintf apr_psprintf
#define ap_pstrcat apr_pstrcat
#define ap_pstrdup apr_pstrdup
@@ -47,6 +62,7 @@
#define ap_table_add apr_table_add
#define ap_table_addn apr_table_addn
#define ap_table_do apr_table_do
+#define ap_table_elts apr_table_elts
#define ap_table_get apr_table_get
#define ap_table_merge apr_table_merge
#define ap_table_mergen apr_table_mergen
@@ -57,5 +73,26 @@
#define ap_validate_password apr_validate_password
#define ap_vformatter apr_vformatter
#define ap_vsnprintf apr_vsnprintf
+#define ap_wait_t apr_wait_t
+
+#define ap_isalnum apr_isalnum
+#define ap_isalpha apr_isalpha
+#define ap_iscntrl apr_iscntrl
+#define ap_isdigit apr_isdigit
+#define ap_isgraph apr_isgraph
+#define ap_islower apr_islower
+#define ap_isascii apr_isascii
+#define ap_isprint apr_isprint
+#define ap_ispunct apr_ispunct
+#define ap_isspace apr_isspace
+#define ap_isupper apr_isupper
+#define ap_isxdigit apr_isxdigit
+#define ap_tolower apr_tolower
+#define ap_toupper apr_toupper
+
+#define AP_USEC_PER_SEC APR_USEC_PER_SEC
+#define AP_RFC822_DATE_LEN APR_RFC822_DATE_LEN
+#define AP_OVERLAP_TABLES_MERGE APR_OVERLAP_TABLES_MERGE
+#define AP_OVERLAP_TABLES_SET APR_OVERLAP_TABLES_SET
#endif /* APR_COMPAT_H */
diff --git a/include/apr_file_io.h b/include/apr_file_io.h
index 984c0ab73..eb31de3a0 100644
--- a/include/apr_file_io.h
+++ b/include/apr_file_io.h
@@ -71,7 +71,7 @@ extern "C" {
*/
typedef enum {APR_NOFILE, APR_REG, APR_DIR, APR_CHR, APR_BLK, APR_PIPE, APR_LNK,
- APR_SOCK} ap_filetype_e;
+ APR_SOCK} apr_filetype_e;
/* Flags for apr_open */
#define APR_READ 1 /* Open the file for reading */
@@ -129,7 +129,7 @@ struct apr_finfo_t {
/** The type of file. One of APR_NOFILE, APR_REG, APR_DIR, APR_CHR,
* APR_BLK, APR_PIPE, APR_LNK, APR_SOCK
*/
- ap_filetype_e filetype;
+ apr_filetype_e filetype;
/** The user id that owns the file */
apr_uid_t user;
/** The group id that owns the file */
@@ -261,7 +261,7 @@ apr_status_t apr_write(apr_file_t *thefile, const void *buf, apr_ssize_t *nbytes
* @param thefile The file descriptor to write to.
* @param vec The array from which to get the data to write to the file.
* @param nvec The number of elements in the struct iovec array. This must
- * be smaller than AP_MAX_IOVEC_SIZE. If it isn't, the function
+ * be smaller than APR_MAX_IOVEC_SIZE. If it isn't, the function
* will fail with APR_EINVAL.
* @param nbytes The number of bytes written.
* @tip It is possible for both bytes to be written and an error to be returned.
@@ -536,7 +536,7 @@ apr_status_t apr_dir_entry_mtime(apr_time_t *mtime, apr_dir_t *thedir);
* @param type the file type of the directory entry.
* @param thedir the currently open directory.
*/
-apr_status_t apr_dir_entry_ftype(ap_filetype_e *type, apr_dir_t *thedir);
+apr_status_t apr_dir_entry_ftype(apr_filetype_e *type, apr_dir_t *thedir);
/**
* Write a string to a file using a printf format.
diff --git a/include/apr_getopt.h b/include/apr_getopt.h
index 55266153a..0abb57865 100644
--- a/include/apr_getopt.h
+++ b/include/apr_getopt.h
@@ -56,12 +56,12 @@
#define APR_GETOPT_H
APR_VAR_IMPORT int
- ap_opterr, /* if error message should be printed */
- ap_optind, /* index into parent argv vector */
- ap_optopt, /* character checked for validity */
- ap_optreset; /* reset getopt */
+ apr_opterr, /* if error message should be printed */
+ apr_optind, /* index into parent argv vector */
+ apr_optopt, /* character checked for validity */
+ apr_optreset; /* reset getopt */
APR_VAR_IMPORT char *
- ap_optarg; /* argument associated with option */
+ apr_optarg; /* argument associated with option */
/**
* Parse the command line options passed to the program.
diff --git a/include/apr_hash.h b/include/apr_hash.h
index bab59807b..5bb50c0f2 100644
--- a/include/apr_hash.h
+++ b/include/apr_hash.h
@@ -56,8 +56,8 @@
* University of Illinois, Urbana-Champaign.
*/
-#ifndef ap_HASH_H
-#define ap_HASH_H
+#ifndef APR_HASH_H
+#define APR_HASH_H
#ifdef __cplusplus
extern "C" {
@@ -164,4 +164,4 @@ APR_EXPORT(void) apr_hash_this(apr_hash_index_t *hi, const void **key,
}
#endif
-#endif /* !ap_HASH_H */
+#endif /* !APR_HASH_H */
diff --git a/include/apr_lib.h b/include/apr_lib.h
index 3e4c84bd5..7b5f36214 100644
--- a/include/apr_lib.h
+++ b/include/apr_lib.h
@@ -114,20 +114,20 @@ APR_EXPORT(const char *) apr_filename_of_pathname(const char *pathname);
* that's legacy libc for ya. These new macros do not support EOF like
* the standard macros do. Tough.
*/
-#define ap_isalnum(c) (isalnum(((unsigned char)(c))))
-#define ap_isalpha(c) (isalpha(((unsigned char)(c))))
-#define ap_iscntrl(c) (iscntrl(((unsigned char)(c))))
-#define ap_isdigit(c) (isdigit(((unsigned char)(c))))
-#define ap_isgraph(c) (isgraph(((unsigned char)(c))))
-#define ap_islower(c) (islower(((unsigned char)(c))))
-#define ap_isascii(c) (isascii(((unsigned char)(c))))
-#define ap_isprint(c) (isprint(((unsigned char)(c))))
-#define ap_ispunct(c) (ispunct(((unsigned char)(c))))
-#define ap_isspace(c) (isspace(((unsigned char)(c))))
-#define ap_isupper(c) (isupper(((unsigned char)(c))))
-#define ap_isxdigit(c) (isxdigit(((unsigned char)(c))))
-#define ap_tolower(c) (tolower(((unsigned char)(c))))
-#define ap_toupper(c) (toupper(((unsigned char)(c))))
+#define apr_isalnum(c) (isalnum(((unsigned char)(c))))
+#define apr_isalpha(c) (isalpha(((unsigned char)(c))))
+#define apr_iscntrl(c) (iscntrl(((unsigned char)(c))))
+#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
+#define apr_isgraph(c) (isgraph(((unsigned char)(c))))
+#define apr_islower(c) (islower(((unsigned char)(c))))
+#define apr_isascii(c) (isascii(((unsigned char)(c))))
+#define apr_isprint(c) (isprint(((unsigned char)(c))))
+#define apr_ispunct(c) (ispunct(((unsigned char)(c))))
+#define apr_isspace(c) (isspace(((unsigned char)(c))))
+#define apr_isupper(c) (isupper(((unsigned char)(c))))
+#define apr_isxdigit(c) (isxdigit(((unsigned char)(c))))
+#define apr_tolower(c) (tolower(((unsigned char)(c))))
+#define apr_toupper(c) (toupper(((unsigned char)(c))))
/*
* Small utility macros to make things easier to read. Not usually a
@@ -135,12 +135,12 @@ APR_EXPORT(const char *) apr_filename_of_pathname(const char *pathname);
*/
#ifdef WIN32
-#define ap_killpg(x, y)
+#define apr_killpg(x, y)
#else /* WIN32 */
#ifdef NO_KILLPG
-#define ap_killpg(x, y) (kill (-(x), (y)))
+#define apr_killpg(x, y) (kill (-(x), (y)))
#else /* NO_KILLPG */
-#define ap_killpg(x, y) (killpg ((x), (y)))
+#define apr_killpg(x, y) (killpg ((x), (y)))
#endif /* NO_KILLPG */
#endif /* WIN32 */
@@ -166,9 +166,9 @@ APR_EXPORT(const char *) apr_filename_of_pathname(const char *pathname);
* for the increased robustness of having printf-warnings work.
*
* Additionally, apr_vformatter allows for arbitrary output methods
- * using the ap_vformatter_buff and flush_func.
+ * using the apr_vformatter_buff and flush_func.
*
- * The ap_vformatter_buff has two elements curpos and endpos.
+ * The apr_vformatter_buff has two elements curpos and endpos.
* curpos is where apr_vformatter will write the next byte of output.
* It proceeds writing output to curpos, and updating curpos, until
* either the end of output is reached, or curpos == endpos (i.e. the
diff --git a/include/apr_md5.h b/include/apr_md5.h
index d62eb0374..54b48438d 100644
--- a/include/apr_md5.h
+++ b/include/apr_md5.h
@@ -100,10 +100,10 @@ extern "C" {
/* UINT4 defines a four byte word */
typedef unsigned int UINT4;
-typedef struct ap_md5_ctx_t ap_md5_ctx_t;
+typedef struct apr_md5_ctx_t apr_md5_ctx_t;
/** MD5 context. */
-struct ap_md5_ctx_t {
+struct apr_md5_ctx_t {
/** state (ABCD) */
UINT4 state[4];
/** number of bits, modulo 2^64 (lsb first) */
@@ -119,21 +119,22 @@ struct ap_md5_ctx_t {
/**
* MD5 Initialize. Begins an MD5 operation, writing a new context.
* @param context The MD5 context to initialize.
- * @deffunc apr_status_t apr_MD5Init(ap_md5_ctx_t *context)
+ * @deffunc apr_status_t apr_MD5Init(apr_md5_ctx_t *context)
*/
-APR_EXPORT(apr_status_t) apr_MD5Init(ap_md5_ctx_t *context);
+APR_EXPORT(apr_status_t) apr_MD5Init(apr_md5_ctx_t *context);
/**
* MD5 translation setup. Provides the APR translation handle to be used
* for translating the content before calculating the digest.
* @param context The MD5 content to set the translation for.
* @param xlate The translation handle to use for this MD5 context
- * @deffunc apr_status_t ap_MD5SetXlate(ap_md5_ctx_t *context, apr_xlate_t *xlate)
+ * @deffunc apr_status_t apr_MD5SetXlate(apr_md5_ctx_t *context, apr_xlate_t *xlate)
*/
#if APR_HAS_XLATE
-APR_EXPORT(apr_status_t) ap_MD5SetXlate(ap_md5_ctx_t *context, apr_xlate_t *xlate);
+APR_EXPORT(apr_status_t) apr_MD5SetXlate(apr_md5_ctx_t *context,
+ apr_xlate_t *xlate);
#else
-#define ap_MD5SetXlate(context, xlate) APR_ENOTIMPL
+#define apr_MD5SetXlate(context, xlate) APR_ENOTIMPL
#endif
/**
@@ -142,21 +143,21 @@ APR_EXPORT(apr_status_t) ap_MD5SetXlate(ap_md5_ctx_t *context, apr_xlate_t *xlat
* @param context The MD5 content to update.
* @param input next message block to update
* @param inputLen The length of the next message block
- * @deffunc apr_status_t apr_MD5Update(ap_md5_ctx_t *context, const unsigned char *input, unsigned int inputLen)
+ * @deffunc apr_status_t apr_MD5Update(apr_md5_ctx_t *context, const unsigned char *input, unsigned int inputLen)
*/
-APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
- const unsigned char *input,
- unsigned int inputLen);
+APR_EXPORT(apr_status_t) apr_MD5Update(apr_md5_ctx_t *context,
+ const unsigned char *input,
+ unsigned int inputLen);
/**
* MD5 finalization. Ends an MD5 message-digest operation, writing the
* message digest and zeroing the context
* @param digest The final MD5 digest
* @param context The MD5 content we are finalizing.
- * @deffunc apr_status_t apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE], ap_md5_ctx_t *context)
+ * @deffunc apr_status_t apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE], apr_md5_ctx_t *context)
*/
APR_EXPORT(apr_status_t) apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE],
- ap_md5_ctx_t *context);
+ apr_md5_ctx_t *context);
/**
* Encode a password using an MD5 algorithm
diff --git a/include/apr_network_io.h b/include/apr_network_io.h
index 87e9bb377..3055eb712 100644
--- a/include/apr_network_io.h
+++ b/include/apr_network_io.h
@@ -101,7 +101,7 @@ extern "C" {
#define APR_POLLNVAL 0x040
typedef enum {APR_SHUTDOWN_READ, APR_SHUTDOWN_WRITE,
- APR_SHUTDOWN_READWRITE} ap_shutdown_how_e;
+ APR_SHUTDOWN_READWRITE} apr_shutdown_how_e;
/* We need to make sure we always have an in_addr type, so APR will just
* define it ourselves, if the platform doesn't provide it.
@@ -112,14 +112,14 @@ struct in_addr {
}
#endif
-/* I guess not everybody uses inet_addr. This defines ap_inet_addr
+/* I guess not everybody uses inet_addr. This defines apr_inet_addr
* appropriately.
*/
#if APR_HAVE_INET_ADDR
-#define ap_inet_addr inet_addr
+#define apr_inet_addr inet_addr
#elif APR_HAVE_INET_NETWORK /* only DGUX, as far as I know */
-#define ap_inet_addr inet_network
+#define apr_inet_addr inet_network
#endif
typedef struct apr_socket_t apr_socket_t;
@@ -167,7 +167,7 @@ apr_status_t apr_create_tcp_socket(apr_socket_t **new_sock, apr_pool_t *cont);
* @tip This does not actually close the socket descriptor, it just
* controls which calls are still valid on the socket.
*/
-apr_status_t apr_shutdown(apr_socket_t *thesocket, ap_shutdown_how_e how);
+apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how);
/**
* Close a tcp socket.
diff --git a/include/apr_pools.h b/include/apr_pools.h
index 80a5dc6d9..b368debcb 100644
--- a/include/apr_pools.h
+++ b/include/apr_pools.h
@@ -52,8 +52,8 @@
* <http://www.apache.org/>.
*/
-#ifndef ap_POOLS_H
-#define ap_POOLS_H
+#ifndef APR_POOLS_H
+#define APR_POOLS_H
#ifdef __cplusplus
extern "C" {
@@ -140,37 +140,37 @@ struct process_chain {
* if the data is allocated in any ancestor of T's pool. This is the
* basis on which the POOL_DEBUG code works -- it tests these ancestor
* relationships for all data inserted into tables. POOL_DEBUG also
- * provides tools (ap_find_pool, and ap_pool_is_ancestor) for other
+ * provides tools (apr_find_pool, and apr_pool_is_ancestor) for other
* folks to implement similar restrictions for their own data
* structures.
*
* However, sometimes this ancestor requirement is inconvenient --
* sometimes we're forced to create a sub pool (such as through
- * ap_sub_req_lookup_uri), and the sub pool is guaranteed to have
+ * apr_sub_req_lookup_uri), and the sub pool is guaranteed to have
* the same lifetime as the parent pool. This is a guarantee implemented
* by the *caller*, not by the pool code. That is, the caller guarantees
* they won't destroy the sub pool individually prior to destroying the
* parent pool.
*
- * In this case the caller must call ap_pool_join() to indicate this
+ * In this case the caller must call apr_pool_join() to indicate this
* guarantee to the POOL_DEBUG code. There are a few examples spread
* through the standard modules.
*/
#ifndef POOL_DEBUG
-#ifdef ap_pool_join
-#undef ap_pool_join
+#ifdef apr_pool_join
+#undef apr_pool_join
#endif
-#define ap_pool_join(a,b)
+#define apr_pool_join(a,b)
#else
-APR_EXPORT(void) ap_pool_join(apr_pool_t *p, apr_pool_t *sub);
-APR_EXPORT(apr_pool_t *) ap_find_pool(const void *ts);
-APR_EXPORT(int) ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
+APR_EXPORT(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub);
+APR_EXPORT(apr_pool_t *) apr_find_pool(const void *ts);
+APR_EXPORT(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
#endif
#ifdef ULTRIX_BRAIN_DEATH
-#define ap_fdopen(d,m) fdopen((d), (char *)(m))
+#define apr_fdopen(d,m) fdopen((d), (char *)(m))
#else
-#define ap_fdopen(d,m) fdopen((d), (m))
+#define apr_fdopen(d,m) fdopen((d), (m))
#endif
/*
@@ -241,9 +241,9 @@ APR_EXPORT(apr_size_t) apr_bytes_in_free_blocks(void);
* @param b The pool to search for
* @return True if a is an ancestor of b, NULL is considered an ancestor
* of all pools.
- * @deffunc int ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
+ * @deffunc int apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
*/
-APR_EXPORT(int) ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
+APR_EXPORT(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b);
/**
* Allocate a block of memory from a pool
@@ -318,14 +318,14 @@ APR_EXPORT_NONSTD(apr_status_t) apr_null_cleanup(void *data);
* destroyed before the parent pool
*/
#ifndef POOL_DEBUG
-#ifdef ap_pool_join
-#undef ap_pool_join
-#endif /* ap_pool_join */
-#define ap_pool_join(a,b)
+#ifdef apr_pool_join
+#undef apr_pool_join
+#endif /* apr_pool_join */
+#define apr_pool_join(a,b)
#endif /* POOL_DEBUG */
#ifdef __cplusplus
}
#endif
-#endif /* !ap_POOLS_H */
+#endif /* !APR_POOLS_H */
diff --git a/include/apr_portable.h b/include/apr_portable.h
index 16be3b8f1..bcdd6a0e6 100644
--- a/include/apr_portable.h
+++ b/include/apr_portable.h
@@ -218,7 +218,8 @@ apr_status_t apr_get_os_lock(apr_os_lock_t *oslock, apr_lock_t *lock);
* @param ostime the native time format
* @param aprtime the time to convert
*/
-apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime, ap_exploded_time_t *aprtime);
+apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+ apr_exploded_time_t *aprtime);
/**
* Get the imploded time in the platforms native format.
@@ -252,7 +253,7 @@ apr_status_t apr_get_os_threadkey(apr_os_threadkey_t *thekey, apr_threadkey_t *k
* an apr file type.
*/
apr_status_t apr_put_os_file(apr_file_t **file, apr_os_file_t *thefile,
- apr_pool_t *cont);
+ apr_pool_t *cont);
/**
* convert the dir from os specific type to apr type.
@@ -261,7 +262,7 @@ apr_status_t apr_put_os_file(apr_file_t **file, apr_os_file_t *thefile,
* @param cont The pool to use when creating to apr directory.
*/
apr_status_t apr_put_os_dir(apr_dir_t **dir, apr_os_dir_t *thedir,
- apr_pool_t *cont);
+ apr_pool_t *cont);
/**
* Convert a socket from the os specific type to the apr type
@@ -270,7 +271,7 @@ apr_status_t apr_put_os_dir(apr_dir_t **dir, apr_os_dir_t *thedir,
* @param cont The socket we are converting to an apr type.
*/
apr_status_t apr_put_os_sock(apr_socket_t **sock, apr_os_sock_t *thesock,
- apr_pool_t *cont);
+ apr_pool_t *cont);
/**
* Convert the lock from os specific type to apr type
@@ -279,7 +280,7 @@ apr_status_t apr_put_os_sock(apr_socket_t **sock, apr_os_sock_t *thesock,
* @param cont The pool to use if it is needed.
*/
apr_status_t apr_put_os_lock(apr_lock_t **lock, apr_os_lock_t *thelock,
- apr_pool_t *cont);
+ apr_pool_t *cont);
/**
* Put the imploded time in the APR format.
@@ -287,7 +288,8 @@ apr_status_t apr_put_os_lock(apr_lock_t **lock, apr_os_lock_t *thelock,
* @param ostime the time to convert
* @param cont the pool to use if necessary
*/
-apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime, apr_pool_t *cont);
+apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime,
+ apr_pool_t *cont);
/**
* Put the exploded time in the APR format.
@@ -295,7 +297,8 @@ apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime
* @param ostime the time to convert
* @param cont the pool to use if necessary
*/
-apr_status_t apr_put_os_exp_time(ap_exploded_time_t *aprtime, apr_os_exp_time_t **ostime, apr_pool_t *cont);
+apr_status_t apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+ apr_os_exp_time_t **ostime, apr_pool_t *cont);
#if APR_HAS_THREADS
/**
@@ -305,7 +308,7 @@ apr_status_t apr_put_os_exp_time(ap_exploded_time_t *aprtime, apr_os_exp_time_t
* @param cont The pool to use if it is needed.
*/
apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd,
- apr_pool_t *cont);
+ apr_pool_t *cont);
/**
* convert the thread private memory key from os specific type to apr type.
@@ -313,8 +316,9 @@ apr_status_t apr_put_os_thread(apr_thread_t **thd, apr_os_thread_t *thethd,
* @param thekey The os specific handle to convert
* @param cont The pool to use if it is needed.
*/
-apr_status_t apr_put_os_threadkey(apr_threadkey_t **key, apr_os_threadkey_t *thekey,
- apr_pool_t *cont);
+apr_status_t apr_put_os_threadkey(apr_threadkey_t **key,
+ apr_os_threadkey_t *thekey,
+ apr_pool_t *cont);
#endif
#ifdef __cplusplus
diff --git a/include/apr_tables.h b/include/apr_tables.h
index 43607d5e8..a1c02c641 100644
--- a/include/apr_tables.h
+++ b/include/apr_tables.h
@@ -132,8 +132,8 @@ struct apr_table_entry_t {
* placing it here we are able to get compile-time diagnostics from modules
* written which assume that a apr_table_t is the same as an apr_array_header_t. -djg
*/
-#define ap_table_elts(t) ((apr_array_header_t *)(t))
-#define ap_is_empty_table(t) (((t) == NULL)||(((apr_array_header_t *)(t))->nelts == 0))
+#define apr_table_elts(t) ((apr_array_header_t *)(t))
+#define apr_is_empty_table(t) (((t) == NULL)||(((apr_array_header_t *)(t))->nelts == 0))
APR_EXPORT(apr_array_header_t *) apr_make_array(struct apr_pool_t *p, int nelts,
int elt_size);
@@ -193,12 +193,12 @@ APR_EXPORT(void)
/* Conceptually, apr_overlap_tables does this:
- apr_array_header_t *barr = ap_table_elts(b);
+ apr_array_header_t *barr = apr_table_elts(b);
apr_table_entry_t *belt = (apr_table_entry_t *)barr->elts;
int i;
for (i = 0; i < barr->nelts; ++i) {
- if (flags & ap_OVERLAP_TABLES_MERGE) {
+ if (flags & apr_OVERLAP_TABLES_MERGE) {
apr_table_mergen(a, belt[i].key, belt[i].val);
}
else {
@@ -213,8 +213,8 @@ APR_EXPORT(void)
in an ancestor of a's pool. In practice b and a are usually from
the same pool.
*/
-#define AP_OVERLAP_TABLES_SET (0)
-#define AP_OVERLAP_TABLES_MERGE (1)
+#define APR_OVERLAP_TABLES_SET (0)
+#define APR_OVERLAP_TABLES_MERGE (1)
APR_EXPORT(void) apr_overlap_tables(apr_table_t *a, const apr_table_t *b,
unsigned flags);
diff --git a/include/apr_thread_proc.h b/include/apr_thread_proc.h
index 8cbbf5553..57f847c8e 100644
--- a/include/apr_thread_proc.h
+++ b/include/apr_thread_proc.h
@@ -416,8 +416,8 @@ apr_status_t apr_wait_proc(apr_proc_t *proc, apr_wait_how_e waithow);
* @param p Pool to allocate child information out of.
*/
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, ap_wait_t *status,
- apr_wait_how_e waithow, apr_pool_t *p);
+apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
+ apr_wait_how_e waithow, apr_pool_t *p);
/**
* Detach the process from the controlling terminal.
diff --git a/include/apr_time.h b/include/apr_time.h
index 16cf10709..5983c54ef 100644
--- a/include/apr_time.h
+++ b/include/apr_time.h
@@ -66,8 +66,8 @@ extern "C" {
* @package APR Time library
*/
-APR_VAR_IMPORT const char ap_month_snames[12][4];
-APR_VAR_IMPORT const char ap_day_snames[7][4];
+APR_VAR_IMPORT const char apr_month_snames[12][4];
+APR_VAR_IMPORT const char apr_day_snames[7][4];
/* number of microseconds since 00:00:00 january 1, 1970 UTC */
typedef apr_int64_t apr_time_t;
@@ -76,15 +76,15 @@ typedef apr_int64_t apr_time_t;
typedef apr_int32_t apr_interval_time_t;
#ifdef WIN32
-#define AP_USEC_PER_SEC ((LONGLONG) 1000000)
+#define APR_USEC_PER_SEC ((LONGLONG) 1000000)
#else
/* XXX: this is wrong -- the LL is only required if int64 is implemented as
* a long long, it could be just a long on some platforms. the C99
* correct way of doing this is to use INT64_C(1000000) which comes
* from stdint.h. we'd probably be doing a Good Thing to check for
- * INT64_C in autoconf... or otherwise define an AP_INT64_C(). -dean
+ * INT64_C in autoconf... or otherwise define an APR_INT64_C(). -dean
*/
-#define AP_USEC_PER_SEC (1000000LL)
+#define APR_USEC_PER_SEC (1000000LL)
#endif
/**
@@ -92,13 +92,13 @@ typedef apr_int32_t apr_interval_time_t;
*/
apr_time_t apr_now(void);
-typedef struct ap_exploded_time_t ap_exploded_time_t;
+typedef struct apr_exploded_time_t apr_exploded_time_t;
/**
* a structure similar to ANSI struct tm with the following differences:
* - tm_usec isn't an ANSI field
* - tm_gmtoff isn't an ANSI field (it's a bsdism)
*/
-struct ap_exploded_time_t {
+struct apr_exploded_time_t {
/** microseconds past tm_sec */
apr_int32_t tm_usec;
/** (0-61) seconds past tm_min */
@@ -128,21 +128,21 @@ struct ap_exploded_time_t {
* @param result the resulting apr_time_t
* @param input the time_t to convert
*/
-apr_status_t apr_ansi_time_to_ap_time(apr_time_t *result, time_t input);
+apr_status_t apr_ansi_time_to_apr_time(apr_time_t *result, time_t input);
/**
* convert a time to its human readable components in GMT timezone
* @param result the exploded time
* @param input the time to explode
*/
-apr_status_t apr_explode_gmt(ap_exploded_time_t *result, apr_time_t input);
+apr_status_t apr_explode_gmt(apr_exploded_time_t *result, apr_time_t input);
/**
* convert a time to its human readable components in local timezone
* @param result the exploded time
* @param input the time to explode
*/
-apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input);
+apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input);
/**
* Convert time value from human readable format to number of seconds
@@ -150,7 +150,7 @@ apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input)
* @param result the resulting imploded time
* @param input the input exploded time
*/
-apr_status_t apr_implode_time(apr_time_t *result, ap_exploded_time_t *input);
+apr_status_t apr_implode_time(apr_time_t *result, apr_exploded_time_t *input);
/**
* Sleep for the specified number of micro-seconds.
@@ -159,7 +159,7 @@ apr_status_t apr_implode_time(apr_time_t *result, ap_exploded_time_t *input);
*/
void apr_sleep(apr_interval_time_t t);
-#define AP_RFC822_DATE_LEN (30)
+#define APR_RFC822_DATE_LEN (30)
/**
* apr_rfc822_date formats dates in the RFC822
* format in an efficient manner. it is a fixed length
@@ -170,7 +170,7 @@ void apr_sleep(apr_interval_time_t t);
*/
apr_status_t apr_rfc822_date(char *date_str, apr_time_t t);
-#define AP_CTIME_LEN (25)
+#define APR_CTIME_LEN (25)
/**
* apr_ctime formats dates in the ctime() format
* in an efficient manner. it is a fixed length format
@@ -189,7 +189,7 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t);
* @param format The format for the time string
* @param tm The time to convert
*/
-apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max, const char *format, ap_exploded_time_t *tm);
+apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max, const char *format, apr_exploded_time_t *tm);
#ifdef __cplusplus
}
diff --git a/include/apr_xlate.h b/include/apr_xlate.h
index ffbbcc9fc..fb5eb14a8 100644
--- a/include/apr_xlate.h
+++ b/include/apr_xlate.h
@@ -69,9 +69,9 @@ extern "C" {
*/
/* APR_HAS_XLATE determines whether or not useful implementations of
- * ap_xlate_open() et al are provided.
+ * apr_xlate_open() et al are provided.
*
- * If APR_HAS_XLATE is zero, ap_xlate_open() et al will all return
+ * If APR_HAS_XLATE is zero, apr_xlate_open() et al will all return
* APR_ENOTIMPL at run-time.
*/
@@ -83,22 +83,22 @@ typedef void apr_xlate_t;
* these are macros which always return failure.
*/
-#define ap_xlate_open(convset, topage, frompage, pool) APR_ENOTIMPL
+#define apr_xlate_open(convset, topage, frompage, pool) APR_ENOTIMPL
-#define ap_xlate_get_sb(convset, onoff) APR_ENOTIMPL
+#define apr_xlate_get_sb(convset, onoff) APR_ENOTIMPL
-#define ap_xlate_conv_buffer(convset, inbuf, inbytes_left, outbuf, \
- outbytes_left) APR_ENOTIMPL
+#define apr_xlate_conv_buffer(convset, inbuf, inbytes_left, outbuf, \
+ outbytes_left) APR_ENOTIMPL
-#define ap_xlate_conv_byte(convset, inchar) (-1)
+#define apr_xlate_conv_byte(convset, inchar) (-1)
-/* The purpose of ap_xlate_conv_char is to translate one character
+/* The purpose of apr_xlate_conv_char is to translate one character
* at a time. This needs to be written carefully so that it works
* with double-byte character sets.
*/
-#define ap_xlate_conv_char(convset, inchar, outchar) APR_ENOTIMPL
+#define apr_xlate_conv_char(convset, inchar, outchar) APR_ENOTIMPL
-#define ap_xlate_close(convset) APR_ENOTIMPL
+#define apr_xlate_close(convset) APR_ENOTIMPL
#else /* ! APR_HAS_XLATE */
@@ -125,7 +125,7 @@ typedef struct apr_xlate_t apr_xlate_t;
* names to indicate the charset of the current locale.
* </PRE>
*/
-apr_status_t ap_xlate_open(apr_xlate_t **convset, const char *topage,
+apr_status_t apr_xlate_open(apr_xlate_t **convset, const char *topage,
const char *frompage, apr_pool_t *pool);
#define APR_DEFAULT_CHARSET (const char *)0
@@ -133,16 +133,16 @@ apr_status_t ap_xlate_open(apr_xlate_t **convset, const char *topage,
/**
* Find out whether or not the specified conversion is single-byte-only.
- * @param convset The handle allocated by ap_xlate_open, specifying the
+ * @param convset The handle allocated by apr_xlate_open, specifying the
* parameters of conversion
* @param onoff Output: whether or not the conversion is single-byte-only
*/
-apr_status_t ap_xlate_get_sb(apr_xlate_t *convset, int *onoff);
+apr_status_t apr_xlate_get_sb(apr_xlate_t *convset, int *onoff);
/**
* Convert a buffer of text from one codepage to another.
- * @param convset The handle allocated by ap_xlate_open, specifying
+ * @param convset The handle allocated by apr_xlate_open, specifying
* the parameters of conversion
* @param inbuf The address of the source buffer
* @param inbytes_left Input: the amount of input data to be translated
@@ -151,36 +151,36 @@ apr_status_t ap_xlate_get_sb(apr_xlate_t *convset, int *onoff);
* @param outbytes_left Input: the size of the output buffer
* Output: the amount of the output buffer not yet used
*/
-apr_status_t ap_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
- apr_size_t *inbytes_left, char *outbuf,
- apr_size_t *outbytes_left);
+apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
+ apr_size_t *inbytes_left, char *outbuf,
+ apr_size_t *outbytes_left);
/**
- * The purpose of ap_xlate_conv_char is to translate one character
+ * The purpose of apr_xlate_conv_char is to translate one character
* at a time. This needs to be written carefully so that it works
* with double-byte character sets.
- * @param convset The handle allocated by ap_xlate_open, specifying the
+ * @param convset The handle allocated by apr_xlate_open, specifying the
* parameters of conversion
* @param inchar The character to convert
* @param outchar The converted character
*/
-apr_status_t ap_xlate_conv_char(apr_xlate_t *convset, char inchar, char outchar);
+apr_status_t apr_xlate_conv_char(apr_xlate_t *convset, char inchar, char outchar);
/**
* Convert a single-byte character from one charset to another.
- * @param convset The handle allocated by ap_xlate_open, specifying the
+ * @param convset The handle allocated by apr_xlate_open, specifying the
* parameters of conversion
* @param inchar The single-byte character to convert.
* @tip This only works when converting between single-byte character sets.
-1 will be returned if the conversion can't be performed.
*/
-apr_int32_t ap_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar);
+apr_int32_t apr_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar);
/**
* Close a codepage translation handle.
* @param convset The codepage translation handle to close
*/
-apr_status_t ap_xlate_close(apr_xlate_t *convset);
+apr_status_t apr_xlate_close(apr_xlate_t *convset);
#endif /* ! APR_HAS_XLATE */
diff --git a/include/arch/os2/fileio.h b/include/arch/os2/fileio.h
index 6aa1be1c5..5051cacc9 100644
--- a/include/arch/os2/fileio.h
+++ b/include/arch/os2/fileio.h
@@ -97,7 +97,8 @@ struct apr_dir_t {
};
apr_status_t apr_file_cleanup(void *);
-apr_status_t ap_os2_time_to_ap_time(apr_time_t *result, FDATE os2date, FTIME os2time);
+apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date,
+ FTIME os2time);
#endif /* ! FILE_IO_H */
diff --git a/include/arch/unix/misc.h b/include/arch/unix/misc.h
index f02c112dc..e0ce1d050 100644
--- a/include/arch/unix/misc.h
+++ b/include/arch/unix/misc.h
@@ -115,7 +115,7 @@ typedef enum {
APR_WIN_NT_4_SP4 = 16,
APR_WIN_NT_4_SP6 = 18,
APR_WIN_2000 = 24
-} ap_oslevel_e;
+} apr_oslevel_e;
typedef enum {
@@ -124,25 +124,26 @@ typedef enum {
DLL_WINSOCKAPI = 2, // mswsock From WinSock.h
DLL_WINSOCK2API = 3, // ws2_32 From WinSock2.h
DLL_defined = 4 // must define as last idx_ + 1
-} ap_dlltoken_e;
+} apr_dlltoken_e;
-FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
+FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
-/* The ap_load_dll_func call WILL fault if the function cannot be loaded */
+/* The apr_load_dll_func call WILL fault if the function cannot be loaded */
-#define AP_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
- typedef rettype (calltype *ap_winapi_fpt_##fn) args; \
- static ap_winapi_fpt_##fn ap_winapi_pfn_##fn = NULL; \
- __inline rettype ap_winapi_##fn args \
- { if (!ap_winapi_pfn_##fn) \
- ap_winapi_pfn_##fn = (ap_winapi_fpt_##fn) ap_load_dll_func(lib, #fn, ord); \
- return (*(ap_winapi_pfn_##fn)) names; }; \
+#define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
+ typedef rettype (calltype *apr_winapi_fpt_##fn) args; \
+ static apr_winapi_fpt_##fn apr_winapi_pfn_##fn = NULL; \
+ __inline rettype apr_winapi_##fn args \
+ { if (!apr_winapi_pfn_##fn) \
+ apr_winapi_pfn_##fn = (apr_winapi_fpt_##fn) \
+ apr_load_dll_func(lib, #fn, ord); \
+ return (*(apr_winapi_pfn_##fn)) names; }; \
/* Provide late bound declarations of every API function missing from
* one or more supported releases of the Win32 API
*
- * lib is the enumerated token from ap_dlltoken_e, and must correspond
- * to the string table entry in start.c used by the ap_load_dll_func().
+ * lib is the enumerated token from apr_dlltoken_e, and must correspond
+ * to the string table entry in start.c used by the apr_load_dll_func().
* Token names (attempt to) follow Windows.h declarations prefixed by DLL_
* in order to facilitate comparison. Use the exact declaration syntax
* and names from Windows.h to prevent ambigutity and bugs.
@@ -157,20 +158,20 @@ FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
* In the case of non-text functions, simply #define the original name
*/
-AP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
IN LPCSTR lpFileName,
IN GET_FILEEX_INFO_LEVELS fInfoLevelId,
OUT LPVOID lpFileInformation),
(lpFileName, fInfoLevelId, lpFileInformation));
#undef GetFileAttributesEx
-#define GetFileAttributesEx ap_winapi_GetFileAttributesExA
+#define GetFileAttributesEx apr_winapi_GetFileAttributesExA
-AP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
IN HANDLE hFile),
(hFile));
-#define CancelIo ap_winapi_CancelIo
+#define CancelIo apr_winapi_CancelIo
-apr_status_t ap_get_oslevel(struct apr_pool_t *, ap_oslevel_e *);
+apr_status_t apr_get_oslevel(struct apr_pool_t *, apr_oslevel_e *);
#endif /* WIN32 */
#endif /* ! MISC_H */
diff --git a/include/arch/win32/fileio.h b/include/arch/win32/fileio.h
index bfdda7421..661154ead 100644
--- a/include/arch/win32/fileio.h
+++ b/include/arch/win32/fileio.h
@@ -92,7 +92,7 @@
* fname -- the filename as passed to the open call.
* dwFileAttricutes -- Attributes used to open the file.
* demonfname -- the canonicalized filename. Used to store the result from
- * ap_os_canonicalize_filename.
+ * apr_os_canonicalize_filename.
* lowerdemonfname -- inserted at Ken Parzygnat's request, because of the
* ugly way windows deals with case in the filesystem.
* append -- Windows doesn't support the append concept when opening files.
@@ -143,12 +143,12 @@ struct apr_dir_t {
apr_status_t file_cleanup(void *);
/*mode_t get_fileperms(apr_fileperms_t);
*/
-APR_EXPORT(char *) ap_os_systemcase_filename(struct apr_pool_t *pCont,
- const char *szFile);
+APR_EXPORT(char *) apr_os_systemcase_filename(struct apr_pool_t *pCont,
+ const char *szFile);
char * canonical_filename(struct apr_pool_t *pCont, const char *szFile);
-apr_status_t ap_create_nt_pipe(apr_file_t **in, apr_file_t **out,
- BOOLEAN bAsyncRead, BOOLEAN bAsyncWrite,
- apr_pool_t *p);
+apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
+ BOOLEAN bAsyncRead, BOOLEAN bAsyncWrite,
+ apr_pool_t *p);
#endif /* ! FILE_IO_H */
diff --git a/include/arch/win32/misc.h b/include/arch/win32/misc.h
index f02c112dc..e0ce1d050 100644
--- a/include/arch/win32/misc.h
+++ b/include/arch/win32/misc.h
@@ -115,7 +115,7 @@ typedef enum {
APR_WIN_NT_4_SP4 = 16,
APR_WIN_NT_4_SP6 = 18,
APR_WIN_2000 = 24
-} ap_oslevel_e;
+} apr_oslevel_e;
typedef enum {
@@ -124,25 +124,26 @@ typedef enum {
DLL_WINSOCKAPI = 2, // mswsock From WinSock.h
DLL_WINSOCK2API = 3, // ws2_32 From WinSock2.h
DLL_defined = 4 // must define as last idx_ + 1
-} ap_dlltoken_e;
+} apr_dlltoken_e;
-FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
+FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
-/* The ap_load_dll_func call WILL fault if the function cannot be loaded */
+/* The apr_load_dll_func call WILL fault if the function cannot be loaded */
-#define AP_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
- typedef rettype (calltype *ap_winapi_fpt_##fn) args; \
- static ap_winapi_fpt_##fn ap_winapi_pfn_##fn = NULL; \
- __inline rettype ap_winapi_##fn args \
- { if (!ap_winapi_pfn_##fn) \
- ap_winapi_pfn_##fn = (ap_winapi_fpt_##fn) ap_load_dll_func(lib, #fn, ord); \
- return (*(ap_winapi_pfn_##fn)) names; }; \
+#define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
+ typedef rettype (calltype *apr_winapi_fpt_##fn) args; \
+ static apr_winapi_fpt_##fn apr_winapi_pfn_##fn = NULL; \
+ __inline rettype apr_winapi_##fn args \
+ { if (!apr_winapi_pfn_##fn) \
+ apr_winapi_pfn_##fn = (apr_winapi_fpt_##fn) \
+ apr_load_dll_func(lib, #fn, ord); \
+ return (*(apr_winapi_pfn_##fn)) names; }; \
/* Provide late bound declarations of every API function missing from
* one or more supported releases of the Win32 API
*
- * lib is the enumerated token from ap_dlltoken_e, and must correspond
- * to the string table entry in start.c used by the ap_load_dll_func().
+ * lib is the enumerated token from apr_dlltoken_e, and must correspond
+ * to the string table entry in start.c used by the apr_load_dll_func().
* Token names (attempt to) follow Windows.h declarations prefixed by DLL_
* in order to facilitate comparison. Use the exact declaration syntax
* and names from Windows.h to prevent ambigutity and bugs.
@@ -157,20 +158,20 @@ FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
* In the case of non-text functions, simply #define the original name
*/
-AP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
IN LPCSTR lpFileName,
IN GET_FILEEX_INFO_LEVELS fInfoLevelId,
OUT LPVOID lpFileInformation),
(lpFileName, fInfoLevelId, lpFileInformation));
#undef GetFileAttributesEx
-#define GetFileAttributesEx ap_winapi_GetFileAttributesExA
+#define GetFileAttributesEx apr_winapi_GetFileAttributesExA
-AP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
IN HANDLE hFile),
(hFile));
-#define CancelIo ap_winapi_CancelIo
+#define CancelIo apr_winapi_CancelIo
-apr_status_t ap_get_oslevel(struct apr_pool_t *, ap_oslevel_e *);
+apr_status_t apr_get_oslevel(struct apr_pool_t *, apr_oslevel_e *);
#endif /* WIN32 */
#endif /* ! MISC_H */
diff --git a/lib/apr_pools.c b/lib/apr_pools.c
index ad6f4754c..77352797c 100644
--- a/lib/apr_pools.c
+++ b/lib/apr_pools.c
@@ -131,8 +131,8 @@
#define BLOCK_MINALLOC 0
#endif /* ALLOC_USE_MALLOC */
-#define AP_SLACK_LOW 1
-#define AP_SLACK_HIGH 2
+#define APR_SLACK_LOW 1
+#define APR_SLACK_HIGH 2
/*****************************************************************
@@ -671,7 +671,7 @@ void apr_term_alloc(void)
}
/* We only want to lock the mutex if we are being called from apr_clear_pool.
- * This is because if we also call this function from ap_destroy_real_pool,
+ * This is because if we also call this function from apr_destroy_real_pool,
* which also locks the same mutex, and recursive locks aren't portable.
* This way, we are garaunteed that we only lock this mutex once when calling
* either one of these functions.
@@ -762,7 +762,7 @@ extern char _end;
/* Find the pool that ts belongs to, return NULL if it doesn't
* belong to any pool.
*/
-APR_EXPORT(apr_pool_t *) ap_find_pool(const void *ts)
+APR_EXPORT(apr_pool_t *) apr_find_pool(const void *ts)
{
const char *s = ts;
union block_hdr **pb;
@@ -808,7 +808,7 @@ APR_EXPORT(apr_pool_t *) ap_find_pool(const void *ts)
/* return TRUE iff a is an ancestor of b
* NULL is considered an ancestor of all pools
*/
-APR_EXPORT(int) ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
+APR_EXPORT(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
{
if (a == NULL) {
return 1;
@@ -830,7 +830,7 @@ APR_EXPORT(int) ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
* instead. This is a guarantee by the caller that sub will not
* be destroyed before p is.
*/
-APR_EXPORT(void) ap_pool_join(apr_pool_t *p, apr_pool_t *sub)
+APR_EXPORT(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
{
union block_hdr *b;
@@ -1207,7 +1207,7 @@ static void free_proc_chain(struct process_chain *procs)
*/
{
for (p = procs; p; p = p->next) {
- CloseHandle(p->pid->pid);
+ CloseHandle((HANDLE)p->pid->pid);
}
}
#endif /* WIN32 */
diff --git a/lib/apr_signal.c b/lib/apr_signal.c
index df13f7ace..adbc74d88 100644
--- a/lib/apr_signal.c
+++ b/lib/apr_signal.c
@@ -80,5 +80,5 @@ Sigfunc *apr_signal(int signo, Sigfunc * func)
}
#else
/* need some function in this file, otherwise the linker on NeXT bitches */
-void ap_signal_is_not_here(void) {}
+void apr_signal_is_not_here(void) {}
#endif
diff --git a/libapr.def b/libapr.def
index dbf1cdb1d..118cd997d 100644
--- a/libapr.def
+++ b/libapr.def
@@ -118,7 +118,7 @@ EXPORTS
; apr_get_os_proc @109
apr_get_os_thread @110
apr_get_os_threadkey @111
- ap_os_systemcase_filename @112
+ apr_os_systemcase_filename @112
canonical_filename @113
apr_create_pool @114
apr_clear_pool @115
@@ -128,13 +128,13 @@ EXPORTS
apr_set_userdata @119
apr_initialize @120
apr_getopt @121
- ap_opterr @122 DATA
- ap_optind @123 DATA
- ap_optopt @124 DATA
- ap_optreset @125 DATA
- ap_optarg @126 DATA
+ apr_opterr @122 DATA
+ apr_optind @123 DATA
+ apr_optopt @124 DATA
+ apr_optreset @125 DATA
+ apr_optarg @126 DATA
; apr_make_time @127
- apr_ansi_time_to_ap_time @127
+ apr_ansi_time_to_apr_time @127
; apr_current_time @128
apr_now @128
; apr_explode_time @129
@@ -242,8 +242,8 @@ EXPORTS
apr_dso_sym @221
; apr_dso_init @222
apr_collapse_spaces @223
- ap_month_snames @224
- ap_day_snames @225
+ apr_month_snames @224
+ apr_day_snames @225
apr_canonical_error @226
apr_strerror @227
apr_generate_random_bytes @228
diff --git a/locks/beos/crossproc.c b/locks/beos/crossproc.c
index ee541cfcb..06998e4ab 100644
--- a/locks/beos/crossproc.c
+++ b/locks/beos/crossproc.c
@@ -73,7 +73,7 @@ apr_status_t create_inter_lock(apr_lock_t *new)
new->sem_interproc = (sem_id)apr_palloc(new->cntxt, sizeof(sem_id));
new->ben_interproc = (int32)apr_palloc(new->cntxt, sizeof(int32));
- if ((stat = create_sem(0, "ap_interproc")) < B_NO_ERROR) {
+ if ((stat = create_sem(0, "apr_interproc")) < B_NO_ERROR) {
lock_inter_cleanup(new);
return stat;
}
diff --git a/locks/beos/intraproc.c b/locks/beos/intraproc.c
index 93032f561..0c582a449 100644
--- a/locks/beos/intraproc.c
+++ b/locks/beos/intraproc.c
@@ -75,7 +75,7 @@ apr_status_t create_intra_lock(apr_lock_t *new)
new->ben_intraproc = (int32)apr_palloc(new->cntxt, sizeof(int32));
- if ((stat = create_sem(0, "ap_intraproc")) < B_NO_ERROR){
+ if ((stat = create_sem(0, "apr_intraproc")) < B_NO_ERROR){
lock_intra_cleanup(new);
return stat;
}
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index ad6f4754c..77352797c 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -131,8 +131,8 @@
#define BLOCK_MINALLOC 0
#endif /* ALLOC_USE_MALLOC */
-#define AP_SLACK_LOW 1
-#define AP_SLACK_HIGH 2
+#define APR_SLACK_LOW 1
+#define APR_SLACK_HIGH 2
/*****************************************************************
@@ -671,7 +671,7 @@ void apr_term_alloc(void)
}
/* We only want to lock the mutex if we are being called from apr_clear_pool.
- * This is because if we also call this function from ap_destroy_real_pool,
+ * This is because if we also call this function from apr_destroy_real_pool,
* which also locks the same mutex, and recursive locks aren't portable.
* This way, we are garaunteed that we only lock this mutex once when calling
* either one of these functions.
@@ -762,7 +762,7 @@ extern char _end;
/* Find the pool that ts belongs to, return NULL if it doesn't
* belong to any pool.
*/
-APR_EXPORT(apr_pool_t *) ap_find_pool(const void *ts)
+APR_EXPORT(apr_pool_t *) apr_find_pool(const void *ts)
{
const char *s = ts;
union block_hdr **pb;
@@ -808,7 +808,7 @@ APR_EXPORT(apr_pool_t *) ap_find_pool(const void *ts)
/* return TRUE iff a is an ancestor of b
* NULL is considered an ancestor of all pools
*/
-APR_EXPORT(int) ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
+APR_EXPORT(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
{
if (a == NULL) {
return 1;
@@ -830,7 +830,7 @@ APR_EXPORT(int) ap_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
* instead. This is a guarantee by the caller that sub will not
* be destroyed before p is.
*/
-APR_EXPORT(void) ap_pool_join(apr_pool_t *p, apr_pool_t *sub)
+APR_EXPORT(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
{
union block_hdr *b;
@@ -1207,7 +1207,7 @@ static void free_proc_chain(struct process_chain *procs)
*/
{
for (p = procs; p; p = p->next) {
- CloseHandle(p->pid->pid);
+ CloseHandle((HANDLE)p->pid->pid);
}
}
#endif /* WIN32 */
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c
index 697ea0a40..9699cb5c8 100644
--- a/misc/unix/errorcodes.c
+++ b/misc/unix/errorcodes.c
@@ -187,9 +187,9 @@ static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err)
for (c=0; c<len; c++) {
/* skip multiple whitespace */
- while (ap_isspace(message[c]) && ap_isspace(message[c+1]))
+ while (apr_isspace(message[c]) && apr_isspace(message[c+1]))
c++;
- *(pos++) = ap_isspace(message[c]) ? ' ' : message[c];
+ *(pos++) = apr_isspace(message[c]) ? ' ' : message[c];
}
*pos = 0;
diff --git a/misc/unix/getopt.c b/misc/unix/getopt.c
index bdee3afbd..b28b9e677 100644
--- a/misc/unix/getopt.c
+++ b/misc/unix/getopt.c
@@ -34,91 +34,91 @@
#include "misc.h"
APR_VAR_EXPORT int
- ap_opterr = 1, /* if error message should be printed */
- ap_optind = 1, /* index into parent argv vector */
- ap_optopt, /* character checked for validity */
- ap_optreset; /* reset getopt */
-APR_VAR_EXPORT char *ap_optarg = ""; /* argument associated with option */
+ apr_opterr = 1, /* if error message should be printed */
+ apr_optind = 1, /* index into parent argv vector */
+ apr_optopt, /* character checked for validity */
+ apr_optreset; /* reset getopt */
+APR_VAR_EXPORT char *apr_optarg = ""; /* argument associated with option */
#define EMSG ""
APR_EXPORT(apr_status_t) apr_getopt(apr_int32_t nargc, char *const *nargv,
- const char *ostr, apr_int32_t *rv,
- apr_pool_t *cont)
+ const char *ostr, apr_int32_t *rv,
+ apr_pool_t *cont)
{
char *p;
static char *place = EMSG; /* option letter processing */
char *oli; /* option letter list index */
- if (ap_optreset || !*place) { /* update scanning pointer */
- ap_optreset = 0;
- if (ap_optind >= nargc || *(place = nargv[ap_optind]) != '-') {
+ if (apr_optreset || !*place) { /* update scanning pointer */
+ apr_optreset = 0;
+ if (apr_optind >= nargc || *(place = nargv[apr_optind]) != '-') {
place = EMSG;
- *rv = ap_optopt;
+ *rv = apr_optopt;
return (APR_EOF);
}
if (place[1] && *++place == '-') { /* found "--" */
- ++ap_optind;
+ ++apr_optind;
place = EMSG;
- *rv = ap_optopt;
+ *rv = apr_optopt;
return (APR_EOF);
}
} /* option letter okay? */
- if ((ap_optopt = (int) *place++) == (int) ':' ||
- !(oli = strchr(ostr, ap_optopt))) {
+ if ((apr_optopt = (int) *place++) == (int) ':' ||
+ !(oli = strchr(ostr, apr_optopt))) {
/*
* if the user didn't specify '-' as an option,
* assume it means -1.
*/
- if (ap_optopt == (int) '-') {
- *rv = ap_optopt;
+ if (apr_optopt == (int) '-') {
+ *rv = apr_optopt;
return (APR_EOF);
}
if (!*place)
- ++ap_optind;
- if (ap_opterr && *ostr != ':') {
+ ++apr_optind;
+ if (apr_opterr && *ostr != ':') {
if (!(p = strrchr(*nargv, '/')))
p = *nargv;
else
++p;
(void) fprintf(stderr,
- "%s: illegal option -- %c\n", p, ap_optopt);
+ "%s: illegal option -- %c\n", p, apr_optopt);
}
- *rv = ap_optopt;
+ *rv = apr_optopt;
return APR_BADCH;
}
if (*++oli != ':') { /* don't need argument */
- ap_optarg = NULL;
+ apr_optarg = NULL;
if (!*place)
- ++ap_optind;
+ ++apr_optind;
}
else { /* need an argument */
if (*place) /* no white space */
- ap_optarg = place;
- else if (nargc <= ++ap_optind) { /* no arg */
+ apr_optarg = place;
+ else if (nargc <= ++apr_optind) { /* no arg */
place = EMSG;
if (*ostr == ':') {
- *rv = ap_optopt;
+ *rv = apr_optopt;
return (APR_BADARG);
}
- if (ap_opterr) {
+ if (apr_opterr) {
if (!(p = strrchr(*nargv, '/')))
p = *nargv;
else
++p;
(void) fprintf(stderr,
"%s: option requires an argument -- %c\n",
- p, ap_optopt);
+ p, apr_optopt);
}
- *rv = ap_optopt;
+ *rv = apr_optopt;
return (APR_BADCH);
}
else /* white space */
- ap_optarg = nargv[ap_optind];
+ apr_optarg = nargv[apr_optind];
place = EMSG;
- ++ap_optind;
+ ++apr_optind;
}
- *rv = ap_optopt;
+ *rv = apr_optopt;
return APR_SUCCESS;
}
diff --git a/misc/unix/misc.h b/misc/unix/misc.h
index f02c112dc..e0ce1d050 100644
--- a/misc/unix/misc.h
+++ b/misc/unix/misc.h
@@ -115,7 +115,7 @@ typedef enum {
APR_WIN_NT_4_SP4 = 16,
APR_WIN_NT_4_SP6 = 18,
APR_WIN_2000 = 24
-} ap_oslevel_e;
+} apr_oslevel_e;
typedef enum {
@@ -124,25 +124,26 @@ typedef enum {
DLL_WINSOCKAPI = 2, // mswsock From WinSock.h
DLL_WINSOCK2API = 3, // ws2_32 From WinSock2.h
DLL_defined = 4 // must define as last idx_ + 1
-} ap_dlltoken_e;
+} apr_dlltoken_e;
-FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
+FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
-/* The ap_load_dll_func call WILL fault if the function cannot be loaded */
+/* The apr_load_dll_func call WILL fault if the function cannot be loaded */
-#define AP_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
- typedef rettype (calltype *ap_winapi_fpt_##fn) args; \
- static ap_winapi_fpt_##fn ap_winapi_pfn_##fn = NULL; \
- __inline rettype ap_winapi_##fn args \
- { if (!ap_winapi_pfn_##fn) \
- ap_winapi_pfn_##fn = (ap_winapi_fpt_##fn) ap_load_dll_func(lib, #fn, ord); \
- return (*(ap_winapi_pfn_##fn)) names; }; \
+#define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
+ typedef rettype (calltype *apr_winapi_fpt_##fn) args; \
+ static apr_winapi_fpt_##fn apr_winapi_pfn_##fn = NULL; \
+ __inline rettype apr_winapi_##fn args \
+ { if (!apr_winapi_pfn_##fn) \
+ apr_winapi_pfn_##fn = (apr_winapi_fpt_##fn) \
+ apr_load_dll_func(lib, #fn, ord); \
+ return (*(apr_winapi_pfn_##fn)) names; }; \
/* Provide late bound declarations of every API function missing from
* one or more supported releases of the Win32 API
*
- * lib is the enumerated token from ap_dlltoken_e, and must correspond
- * to the string table entry in start.c used by the ap_load_dll_func().
+ * lib is the enumerated token from apr_dlltoken_e, and must correspond
+ * to the string table entry in start.c used by the apr_load_dll_func().
* Token names (attempt to) follow Windows.h declarations prefixed by DLL_
* in order to facilitate comparison. Use the exact declaration syntax
* and names from Windows.h to prevent ambigutity and bugs.
@@ -157,20 +158,20 @@ FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
* In the case of non-text functions, simply #define the original name
*/
-AP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
IN LPCSTR lpFileName,
IN GET_FILEEX_INFO_LEVELS fInfoLevelId,
OUT LPVOID lpFileInformation),
(lpFileName, fInfoLevelId, lpFileInformation));
#undef GetFileAttributesEx
-#define GetFileAttributesEx ap_winapi_GetFileAttributesExA
+#define GetFileAttributesEx apr_winapi_GetFileAttributesExA
-AP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
+APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
IN HANDLE hFile),
(hFile));
-#define CancelIo ap_winapi_CancelIo
+#define CancelIo apr_winapi_CancelIo
-apr_status_t ap_get_oslevel(struct apr_pool_t *, ap_oslevel_e *);
+apr_status_t apr_get_oslevel(struct apr_pool_t *, apr_oslevel_e *);
#endif /* WIN32 */
#endif /* ! MISC_H */
diff --git a/misc/win32/misc.c b/misc/win32/misc.c
index 734c5a018..f4b00b074 100644
--- a/misc/win32/misc.c
+++ b/misc/win32/misc.c
@@ -55,7 +55,7 @@
#include "apr_private.h"
#include "misc.h"
-apr_status_t ap_get_oslevel(apr_pool_t *cont, ap_oslevel_e *level)
+apr_status_t apr_get_oslevel(apr_pool_t *cont, apr_oslevel_e *level)
{
static OSVERSIONINFO oslev;
static unsigned int servpack = 0;
@@ -123,7 +123,7 @@ static const char* const lateDllName[DLL_defined] = {
static HMODULE lateDllHandle[DLL_defined] = {
NULL, NULL, NULL, NULL };
-FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char* fnName, int ordinal)
+FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char* fnName, int ordinal)
{
if (!lateDllHandle[fnLib]) {
lateDllHandle[fnLib] = LoadLibrary(lateDllName[fnLib]);
diff --git a/misc/win32/names.c b/misc/win32/names.c
index 81587cf9c..baa20236a 100644
--- a/misc/win32/names.c
+++ b/misc/win32/names.c
@@ -82,7 +82,7 @@ static BOOL OnlyDots(char *pString)
* is present on the existing path. This routine also
* converts alias names to long names.
*/
-APR_EXPORT(char *) ap_os_systemcase_filename(apr_pool_t *pCont,
+APR_EXPORT(char *) apr_os_systemcase_filename(apr_pool_t *pCont,
const char *szFile)
{
char buf[HUGE_STRING_LEN];
@@ -271,10 +271,10 @@ char * canonical_filename(apr_pool_t *pCont, const char *szFile)
char *pConvertedName, *pQstr, *pPstr;
char buf[HUGE_STRING_LEN];
/* We potentially have a short name. Call
- * ap_os_systemcase_filename to examine the filesystem
+ * apr_os_systemcase_filename to examine the filesystem
* and possibly extract the long name.
*/
- pConvertedName = ap_os_systemcase_filename(pCont, pNewStr);
+ pConvertedName = apr_os_systemcase_filename(pCont, pNewStr);
/* Since we want to preserve the incoming case as much
* as we can, compare for differences in the string and
diff --git a/network_io/beos/poll.c b/network_io/beos/poll.c
index 354de61ce..b6089bee8 100644
--- a/network_io/beos/poll.c
+++ b/network_io/beos/poll.c
@@ -112,8 +112,8 @@ apr_status_t apr_poll(apr_pollfd_t *aprset, apr_int32_t *nsds,
tvptr = NULL;
}
else {
- tv.tv_sec = timeout / AP_USEC_PER_SEC;
- tv.tv_usec = timeout % AP_USEC_PER_SEC;
+ tv.tv_sec = timeout / APR_USEC_PER_SEC;
+ tv.tv_usec = timeout % APR_USEC_PER_SEC;
tvptr = &tv;
}
diff --git a/network_io/beos/sendrecv.c b/network_io/beos/sendrecv.c
index 601881286..46b489e19 100644
--- a/network_io/beos/sendrecv.c
+++ b/network_io/beos/sendrecv.c
@@ -71,8 +71,8 @@ static apr_status_t wait_for_io_or_timeout(apr_socket_t *sock, int for_read)
tvptr = NULL;
}
else {
- tv.tv_sec = sock->timeout / AP_USEC_PER_SEC;
- tv.tv_usec = sock->timeout % AP_USEC_PER_SEC;
+ tv.tv_sec = sock->timeout / APR_USEC_PER_SEC;
+ tv.tv_usec = sock->timeout % APR_USEC_PER_SEC;
tvptr = &tv;
}
srv = select(sock->socketdes + 1,
diff --git a/network_io/beos/sockets.c b/network_io/beos/sockets.c
index 446d8a7d2..5a1347b64 100644
--- a/network_io/beos/sockets.c
+++ b/network_io/beos/sockets.c
@@ -104,7 +104,7 @@ apr_status_t apr_create_tcp_socket(apr_socket_t **new, apr_pool_t *cont)
return APR_SUCCESS;
}
-apr_status_t apr_shutdown(apr_socket_t *thesocket, ap_shutdown_how_e how)
+apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how)
{
return shutdown(thesocket->socketdes, how);
}
diff --git a/network_io/os2/poll.c b/network_io/os2/poll.c
index f1bd5826a..3dcf184d0 100644
--- a/network_io/os2/poll.c
+++ b/network_io/os2/poll.c
@@ -134,7 +134,7 @@ apr_status_t apr_poll(apr_pollfd_t *pollfdset, apr_int32_t *nsds,
time_t starttime;
struct timeval tv;
- timeout /= AP_USEC_PER_SEC; /* TODO: rework for microseconds and axe this */
+ timeout /= APR_USEC_PER_SEC; /* TODO: rework for microseconds and axe this */
tv.tv_sec = timeout;
tv.tv_usec = 0;
diff --git a/network_io/os2/sockets.c b/network_io/os2/sockets.c
index b6e417840..12371da48 100644
--- a/network_io/os2/sockets.c
+++ b/network_io/os2/sockets.c
@@ -112,7 +112,7 @@ apr_status_t apr_create_tcp_socket(apr_socket_t **new, apr_pool_t *cont)
return APR_SUCCESS;
}
-apr_status_t apr_shutdown(apr_socket_t *thesocket, ap_shutdown_how_e how)
+apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how)
{
if (shutdown(thesocket->socketdes, how) == 0) {
return APR_SUCCESS;
diff --git a/network_io/unix/poll.c b/network_io/unix/poll.c
index 76679791b..b797ccf37 100644
--- a/network_io/unix/poll.c
+++ b/network_io/unix/poll.c
@@ -267,8 +267,8 @@ apr_status_t apr_poll(apr_pollfd_t *aprset, apr_int32_t *nsds,
tvptr = NULL;
}
else {
- tv.tv_sec = timeout / AP_USEC_PER_SEC;
- tv.tv_usec = timeout % AP_USEC_PER_SEC;
+ tv.tv_sec = timeout / APR_USEC_PER_SEC;
+ tv.tv_usec = timeout % APR_USEC_PER_SEC;
tvptr = &tv;
}
diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
index 2ba230a5c..ad22eb53f 100644
--- a/network_io/unix/sendrecv.c
+++ b/network_io/unix/sendrecv.c
@@ -91,8 +91,8 @@ static apr_status_t wait_for_io_or_timeout(apr_socket_t *sock, int for_read)
tvptr = NULL;
}
else {
- tv.tv_sec = sock->timeout / AP_USEC_PER_SEC;
- tv.tv_usec = sock->timeout % AP_USEC_PER_SEC;
+ tv.tv_sec = sock->timeout / APR_USEC_PER_SEC;
+ tv.tv_usec = sock->timeout % APR_USEC_PER_SEC;
tvptr = &tv;
}
srv = select(sock->socketdes + 1,
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c
index 377612f3f..2399c80c6 100644
--- a/network_io/unix/sockets.c
+++ b/network_io/unix/sockets.c
@@ -100,7 +100,7 @@ apr_status_t apr_create_tcp_socket(apr_socket_t **new, apr_pool_t *cont)
return APR_SUCCESS;
}
-apr_status_t apr_shutdown(apr_socket_t *thesocket, ap_shutdown_how_e how)
+apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how)
{
return (shutdown(thesocket->socketdes, how) == -1) ? errno : APR_SUCCESS;
}
diff --git a/network_io/win32/poll.c b/network_io/win32/poll.c
index 843a4c5b2..9558f4746 100644
--- a/network_io/win32/poll.c
+++ b/network_io/win32/poll.c
@@ -125,8 +125,8 @@ apr_status_t apr_poll(apr_pollfd_t *aprset, apr_int32_t *nsds,
tvptr = NULL;
}
else {
- tv.tv_sec = (long)(timeout / AP_USEC_PER_SEC);
- tv.tv_usec = (long)(timeout % AP_USEC_PER_SEC);
+ tv.tv_sec = (long)(timeout / APR_USEC_PER_SEC);
+ tv.tv_usec = (long)(timeout % APR_USEC_PER_SEC);
tvptr = &tv;
}
rv = select(500, /* ignored on Windows */
diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c
index dc6d5f72d..1db683666 100644
--- a/network_io/win32/sockets.c
+++ b/network_io/win32/sockets.c
@@ -113,7 +113,7 @@ apr_status_t apr_create_tcp_socket(apr_socket_t **new, apr_pool_t *cont)
return APR_SUCCESS;
}
-apr_status_t apr_shutdown(apr_socket_t *thesocket, ap_shutdown_how_e how)
+apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how)
{
int winhow;
diff --git a/passwd/apr_md5.c b/passwd/apr_md5.c
index edea993d4..838b633a2 100644
--- a/passwd/apr_md5.c
+++ b/passwd/apr_md5.c
@@ -186,7 +186,7 @@ static apr_xlate_t *xlate_ebcdic_to_ascii; /* used in apr_MD5Encode() */
/* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
-APR_EXPORT(apr_status_t) apr_MD5Init(ap_md5_ctx_t *context)
+APR_EXPORT(apr_status_t) apr_MD5Init(apr_md5_ctx_t *context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants. */
@@ -205,14 +205,15 @@ APR_EXPORT(apr_status_t) apr_MD5Init(ap_md5_ctx_t *context)
* to be used for translating the content before calculating the
* digest.
*/
-APR_EXPORT(apr_status_t) ap_MD5SetXlate(ap_md5_ctx_t *context, apr_xlate_t *xlate)
+APR_EXPORT(apr_status_t) apr_MD5SetXlate(apr_md5_ctx_t *context,
+ apr_xlate_t *xlate)
{
apr_status_t rv;
int is_sb;
/* TODO: remove the single-byte-only restriction from this code
*/
- rv = ap_xlate_get_sb(xlate, &is_sb);
+ rv = apr_xlate_get_sb(xlate, &is_sb);
if (rv != APR_SUCCESS) {
return rv;
}
@@ -228,7 +229,7 @@ APR_EXPORT(apr_status_t) ap_MD5SetXlate(ap_md5_ctx_t *context, apr_xlate_t *xlat
operation, processing another message block, and updating the
context.
*/
-APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
+APR_EXPORT(apr_status_t) apr_MD5Update(apr_md5_ctx_t *context,
const unsigned char *input,
unsigned int inputLen)
{
@@ -241,7 +242,8 @@ APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
idx = (unsigned int) ((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
- if ((context->count[0] += ((UINT4) inputLen << 3)) < ((UINT4) inputLen << 3))
+ if ((context->count[0] += ((UINT4) inputLen << 3))
+ < ((UINT4) inputLen << 3))
context->count[1]++;
context->count[1] += (UINT4) inputLen >> 29;
@@ -267,7 +269,7 @@ APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
if (inputLen >= partLen) {
if (context->xlate) {
inbytes_left = outbytes_left = partLen;
- ap_xlate_conv_buffer(context->xlate, input, &inbytes_left,
+ apr_xlate_conv_buffer(context->xlate, input, &inbytes_left,
&context->buffer[idx],&outbytes_left);
}
else {
@@ -279,7 +281,7 @@ APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
if (context->xlate) {
unsigned char inp_tmp[64];
inbytes_left = outbytes_left = 64;
- ap_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left,
+ apr_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left,
inp_tmp, &outbytes_left);
MD5Transform(context->state, inp_tmp);
}
@@ -296,7 +298,7 @@ APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
/* Buffer remaining input */
if (context->xlate) {
inbytes_left = outbytes_left = inputLen - i;
- ap_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left,
+ apr_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left,
&context->buffer[idx], &outbytes_left);
}
else {
@@ -310,7 +312,7 @@ APR_EXPORT(apr_status_t) apr_MD5Update(ap_md5_ctx_t *context,
the message digest and zeroizing the context.
*/
APR_EXPORT(apr_status_t) apr_MD5Final(unsigned char digest[MD5_DIGESTSIZE],
- ap_md5_ctx_t *context)
+ apr_md5_ctx_t *context)
{
unsigned char bits[8];
unsigned int idx, padLen;
@@ -459,7 +461,7 @@ static void Decode(UINT4 *output, const unsigned char *input, unsigned int len)
}
#ifdef CHARSET_EBCDIC
-APR_EXPORT(apr_status_t) ap_MD5InitEBCDIC(apr_xlate_t *xlate)
+APR_EXPORT(apr_status_t) apr_MD5InitEBCDIC(apr_xlate_t *xlate)
{
xlate_ebcdic_to_ascii = xlate;
return APR_SUCCESS;
@@ -502,7 +504,7 @@ APR_EXPORT(apr_status_t) apr_MD5Encode(const char *pw, const char *salt,
const char *sp, *ep;
unsigned char final[MD5_DIGESTSIZE];
int sl, pl, i;
- ap_md5_ctx_t ctx, ctx1;
+ apr_md5_ctx_t ctx, ctx1;
unsigned long l;
/*
@@ -536,7 +538,7 @@ APR_EXPORT(apr_status_t) apr_MD5Encode(const char *pw, const char *salt,
*/
apr_MD5Init(&ctx);
#ifdef CHARSET_EBCDIC
- ap_MD5SetXlate(&ctx, xlate_ebcdic_to_ascii);
+ apr_MD5SetXlate(&ctx, xlate_ebcdic_to_ascii);
#endif
/*
@@ -563,7 +565,8 @@ APR_EXPORT(apr_status_t) apr_MD5Encode(const char *pw, const char *salt,
apr_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
apr_MD5Final(final, &ctx1);
for (pl = strlen(pw); pl > 0; pl -= MD5_DIGESTSIZE) {
- apr_MD5Update(&ctx, final, (pl > MD5_DIGESTSIZE) ? MD5_DIGESTSIZE : pl);
+ apr_MD5Update(&ctx, final,
+ (pl > MD5_DIGESTSIZE) ? MD5_DIGESTSIZE : pl);
}
/*
@@ -649,7 +652,8 @@ APR_EXPORT(apr_status_t) apr_MD5Encode(const char *pw, const char *salt,
* APR_EMISMATCH if they don't.
*/
-APR_EXPORT(apr_status_t) apr_validate_password(const char *passwd, const char *hash)
+APR_EXPORT(apr_status_t) apr_validate_password(const char *passwd,
+ const char *hash)
{
char sample[120];
#if !defined(WIN32) && !defined(BEOS)
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c
index 7c12cc878..53433c656 100644
--- a/strings/apr_cpystrn.c
+++ b/strings/apr_cpystrn.c
@@ -108,7 +108,7 @@ APR_EXPORT(char *) apr_cpystrn(char *dst, const char *src, size_t dst_size)
* This function provides a way to parse a generic argument string
* into a standard argv[] form of argument list. It respects the
* usual "whitespace" and quoteing rules. In the future this could
- * be expanded to include support for the ap_call_exec command line
+ * be expanded to include support for the apr_call_exec command line
* string processing (including converting '+' to ' ' and doing the
* url processing. It does not currently support this function.
*
@@ -237,7 +237,7 @@ APR_EXPORT(const char *) apr_filename_of_pathname(const char *pathname)
APR_EXPORT(char *) apr_collapse_spaces(char *dest, const char *src)
{
while (*src) {
- if (!ap_isspace(*src))
+ if (!apr_isspace(*src))
*dest++ = *src;
++src;
}
@@ -254,8 +254,8 @@ char *strdup(const char *str)
if (!(sdup = (char *) malloc(len))) {
/* ### whoops! we can't call Apache logging routines here... */
#if 0
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
- "Ouch! Out of memory in our strdup()!");
+ apr_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
+ "Ouch! Out of memory in our strdup()!");
#endif
return NULL;
}
@@ -272,7 +272,7 @@ int strcasecmp(const char *a, const char *b)
const char *p = a;
const char *q = b;
for (p = a, q = b; *p && *q; p++, q++) {
- int diff = ap_tolower(*p) - ap_tolower(*q);
+ int diff = apr_tolower(*p) - apr_tolower(*q);
if (diff)
return diff;
}
@@ -297,7 +297,7 @@ int strncasecmp(const char *a, const char *b, size_t n)
return 0; /* Match up to n characters */
if (!(*p && *q))
return *p - *q;
- diff = ap_tolower(*p) - ap_tolower(*q);
+ diff = apr_tolower(*p) - apr_tolower(*q);
if (diff)
return diff;
}
diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c
index f1c86fca3..131379eca 100644
--- a/strings/apr_fnmatch.c
+++ b/strings/apr_fnmatch.c
@@ -146,7 +146,7 @@ APR_EXPORT(apr_status_t) apr_fnmatch(const char *pattern, const char *string, in
/* FALLTHROUGH */
default:
if (flags & FNM_CASE_BLIND) {
- if (ap_tolower(c) != ap_tolower(*string)) {
+ if (apr_tolower(c) != apr_tolower(*string)) {
return (FNM_NOMATCH);
}
}
@@ -193,14 +193,14 @@ static const char *rangematch(const char *pattern, int test, int flags)
}
if ((c <= test && test <= c2)
|| ((flags & FNM_CASE_BLIND)
- && ((ap_tolower(c) <= ap_tolower(test))
- && (ap_tolower(test) <= ap_tolower(c2))))) {
+ && ((apr_tolower(c) <= apr_tolower(test))
+ && (apr_tolower(test) <= apr_tolower(c2))))) {
ok = 1;
}
}
else if ((c == test)
|| ((flags & FNM_CASE_BLIND)
- && (ap_tolower(c) == ap_tolower(test)))) {
+ && (apr_tolower(c) == apr_tolower(test)))) {
ok = 1;
}
}
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 3427baa69..9e826938d 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -90,12 +90,12 @@ typedef enum {
#ifndef TRUE
#define TRUE 1
#endif
-#ifndef AP_LONGEST_LONG
-#define AP_LONGEST_LONG long
+#ifndef APR_LONGEST_LONG
+#define APR_LONGEST_LONG long
#endif
#define NUL '\0'
#define WIDE_INT long
-#define WIDEST_INT AP_LONGEST_LONG
+#define WIDEST_INT APR_LONGEST_LONG
typedef WIDE_INT wide_int;
typedef unsigned WIDE_INT u_wide_int;
@@ -127,7 +127,7 @@ typedef int bool_int;
*/
/*
- * ap_ecvt converts to decimal
+ * apr_ecvt converts to decimal
* the number of digits is specified by ndigit
* decpt is set to the position of the decimal point
* sign is set to 0 for positive, 1 for negative
@@ -136,7 +136,8 @@ typedef int bool_int;
#define NDIG 80
/* buf must have at least NDIG bytes */
-static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf)
+static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign,
+ int eflag, char *buf)
{
register int r2;
double fi, fj;
@@ -209,29 +210,29 @@ static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, c
return (buf);
}
-static char *ap_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
+static char *apr_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
{
- return (ap_cvt(arg, ndigits, decpt, sign, 1, buf));
+ return (apr_cvt(arg, ndigits, decpt, sign, 1, buf));
}
-static char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
+static char *apr_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
{
- return (ap_cvt(arg, ndigits, decpt, sign, 0, buf));
+ return (apr_cvt(arg, ndigits, decpt, sign, 0, buf));
}
/*
- * ap_gcvt - Floating output conversion to
+ * apr_gcvt - Floating output conversion to
* minimal length string
*/
-static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
+static char *apr_gcvt(double number, int ndigit, char *buf, boolean_e altform)
{
int sign, decpt;
register char *p1, *p2;
register int i;
char buf1[NDIG];
- p1 = ap_ecvt(number, ndigit, &decpt, &sign, buf1);
+ p1 = apr_ecvt(number, ndigit, &decpt, &sign, buf1);
p2 = buf;
if (sign)
*p2++ = '-';
@@ -310,7 +311,7 @@ static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
#define STR_TO_DEC( str, num ) \
num = NUM( *str++ ) ; \
- while ( ap_isdigit( *str ) ) \
+ while ( apr_isdigit( *str ) ) \
{ \
num *= 10 ; \
num += NUM( *str++ ) ; \
@@ -523,14 +524,14 @@ static char *conv_fp(register char format, register double num,
char buf1[NDIG];
if (format == 'f')
- p = ap_fcvt(num, precision, &decimal_point, is_negative, buf1);
+ p = apr_fcvt(num, precision, &decimal_point, is_negative, buf1);
else /* either e or E format */
- p = ap_ecvt(num, precision + 1, &decimal_point, is_negative, buf1);
+ p = apr_ecvt(num, precision + 1, &decimal_point, is_negative, buf1);
/*
* Check for Infinity and NaN
*/
- if (ap_isalpha(*p)) {
+ if (apr_isalpha(*p)) {
*len = strlen(strcpy(buf, p));
*is_negative = FALSE;
return (buf);
@@ -721,7 +722,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* Try to avoid checking for flags, width or precision
*/
- if (!ap_islower(*fmt)) {
+ if (!apr_islower(*fmt)) {
/*
* Recognize flags: -, #, BLANK, +
*/
@@ -743,7 +744,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* Check if a width was specified
*/
- if (ap_isdigit(*fmt)) {
+ if (apr_isdigit(*fmt)) {
STR_TO_DEC(fmt, min_width);
adjust_width = YES;
}
@@ -769,7 +770,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
if (*fmt == '.') {
adjust_precision = YES;
fmt++;
- if (ap_isdigit(*fmt)) {
+ if (apr_isdigit(*fmt)) {
STR_TO_DEC(fmt, precision);
}
else if (*fmt == '*') {
@@ -958,7 +959,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* * We use &num_buf[ 1 ], so that we have room for the sign
*/
- s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1],
+ s = apr_gcvt(va_arg(ap, double), precision, &num_buf[1],
alternate_form);
if (*s == '-')
prefix_char = *s++;
@@ -1018,7 +1019,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
* don't handle "%p".
*/
case 'p':
-#ifdef AP_VOID_P_IS_QUAD
+#ifdef APR_VOID_P_IS_QUAD
if (sizeof(void *) <= sizeof(u_widest_int)) {
ui_quad = (u_widest_int) va_arg(ap, void *);
s = conv_p2_quad(ui_quad, 4, 'x',
diff --git a/tables/apr_hash.c b/tables/apr_hash.c
index 2cff888ba..31ccc12aa 100644
--- a/tables/apr_hash.c
+++ b/tables/apr_hash.c
@@ -80,10 +80,10 @@
* isn't too bad given that pools have a low allocation overhead.
*/
-typedef struct ap_hash_entry_t ap_hash_entry_t;
+typedef struct apr_hash_entry_t apr_hash_entry_t;
-struct ap_hash_entry_t {
- ap_hash_entry_t *next;
+struct apr_hash_entry_t {
+ apr_hash_entry_t *next;
int hash;
const void *key;
size_t klen;
@@ -98,9 +98,9 @@ struct ap_hash_entry_t {
* collision rate.
*/
struct apr_hash_t {
- apr_pool_t *pool;
- ap_hash_entry_t **array;
- size_t count, max;
+ apr_pool_t *pool;
+ apr_hash_entry_t **array;
+ size_t count, max;
};
#define INITIAL_MAX 15 /* tunable == 2^n - 1 */
@@ -112,9 +112,9 @@ struct apr_hash_t {
* apr_hash_next().
*/
struct apr_hash_index_t {
- apr_hash_t *ht;
- ap_hash_entry_t *this, *next;
- int index;
+ apr_hash_t *ht;
+ apr_hash_entry_t *this, *next;
+ size_t index;
};
@@ -122,7 +122,7 @@ struct apr_hash_index_t {
* Hash creation functions.
*/
-static ap_hash_entry_t **alloc_array(apr_hash_t *ht)
+static apr_hash_entry_t **alloc_array(apr_hash_t *ht)
{
return apr_pcalloc(ht->pool, sizeof(*ht->array) * (ht->max + 1));
}
@@ -167,9 +167,9 @@ APR_EXPORT(apr_hash_index_t *) apr_hash_first(apr_hash_t *ht)
}
APR_EXPORT(void) apr_hash_this(apr_hash_index_t *hi,
- const void **key,
- size_t *klen,
- void **val)
+ const void **key,
+ size_t *klen,
+ void **val)
{
if (key) *key = hi->this->key;
if (klen) *klen = hi->this->klen;
@@ -184,7 +184,7 @@ APR_EXPORT(void) apr_hash_this(apr_hash_index_t *hi,
static void resize_array(apr_hash_t *ht)
{
apr_hash_index_t *hi;
- ap_hash_entry_t **new_array;
+ apr_hash_entry_t **new_array;
int i;
new_array = alloc_array(ht);
@@ -205,12 +205,12 @@ static void resize_array(apr_hash_t *ht)
* that hash entries can be removed.
*/
-static ap_hash_entry_t **find_entry(apr_hash_t *ht,
+static apr_hash_entry_t **find_entry(apr_hash_t *ht,
const void *key,
size_t klen,
const void *val)
{
- ap_hash_entry_t **hep, *he;
+ apr_hash_entry_t **hep, *he;
const unsigned char *p;
int hash;
int i;
@@ -284,7 +284,7 @@ APR_EXPORT(void *) apr_hash_get(apr_hash_t *ht,
const void *key,
size_t klen)
{
- ap_hash_entry_t *he;
+ apr_hash_entry_t *he;
he = *find_entry(ht, key, klen, NULL);
if (he)
return (void *)he->val;
@@ -297,7 +297,7 @@ APR_EXPORT(void) apr_hash_set(apr_hash_t *ht,
size_t klen,
const void *val)
{
- ap_hash_entry_t **hep;
+ apr_hash_entry_t **hep;
hep = find_entry(ht, key, klen, val);
if (*hep) {
if (!val) {
diff --git a/tables/apr_tables.c b/tables/apr_tables.c
index f7661c49c..0ae34bbe1 100644
--- a/tables/apr_tables.c
+++ b/tables/apr_tables.c
@@ -313,7 +313,7 @@ APR_EXPORT(apr_table_t *) apr_copy_table(apr_pool_t *p, const apr_table_t *t)
/* we don't copy keys and values, so it's necessary that t->a.pool
* have a life span at least as long as p
*/
- if (!ap_pool_is_ancestor(t->a.cont, p)) {
+ if (!apr_pool_is_ancestor(t->a.cont, p)) {
fprintf(stderr, "copy_table: t's pool is not an ancestor of p\n");
abort();
}
@@ -390,11 +390,11 @@ APR_EXPORT(void) apr_table_setn(apr_table_t *t, const char *key,
#ifdef POOL_DEBUG
{
- if (!ap_pool_is_ancestor(ap_find_pool(key), t->a.cont)) {
+ if (!apr_pool_is_ancestor(apr_find_pool(key), t->a.cont)) {
fprintf(stderr, "table_set: key not in ancestor pool of t\n");
abort();
}
- if (!ap_pool_is_ancestor(ap_find_pool(val), t->a.cont)) {
+ if (!apr_pool_is_ancestor(apr_find_pool(val), t->a.cont)) {
fprintf(stderr, "table_set: val not in ancestor pool of t\n");
abort();
}
@@ -479,11 +479,11 @@ APR_EXPORT(void) apr_table_mergen(apr_table_t *t, const char *key,
#ifdef POOL_DEBUG
{
- if (!ap_pool_is_ancestor(ap_find_pool(key), t->a.cont)) {
+ if (!apr_pool_is_ancestor(apr_find_pool(key), t->a.cont)) {
fprintf(stderr, "table_set: key not in ancestor pool of t\n");
abort();
}
- if (!ap_pool_is_ancestor(ap_find_pool(val), t->a.cont)) {
+ if (!apr_pool_is_ancestor(apr_find_pool(val), t->a.cont)) {
fprintf(stderr, "table_set: key not in ancestor pool of t\n");
abort();
}
@@ -519,11 +519,11 @@ APR_EXPORT(void) apr_table_addn(apr_table_t *t, const char *key,
#ifdef POOL_DEBUG
{
- if (!ap_pool_is_ancestor(ap_find_pool(key), t->a.cont)) {
+ if (!apr_pool_is_ancestor(apr_find_pool(key), t->a.cont)) {
fprintf(stderr, "table_set: key not in ancestor pool of t\n");
abort();
}
- if (!ap_pool_is_ancestor(ap_find_pool(val), t->a.cont)) {
+ if (!apr_pool_is_ancestor(apr_find_pool(val), t->a.cont)) {
fprintf(stderr, "table_set: key not in ancestor pool of t\n");
abort();
}
@@ -546,12 +546,12 @@ APR_EXPORT(apr_table_t *) apr_overlay_tables(apr_pool_t *p,
* overlay->a.pool and base->a.pool have a life span at least
* as long as p
*/
- if (!ap_pool_is_ancestor(overlay->a.cont, p)) {
+ if (!apr_pool_is_ancestor(overlay->a.cont, p)) {
fprintf(stderr,
"overlay_tables: overlay's pool is not an ancestor of p\n");
abort();
}
- if (!ap_pool_is_ancestor(base->a.cont, p)) {
+ if (!apr_pool_is_ancestor(base->a.cont, p)) {
fprintf(stderr,
"overlay_tables: base's pool is not an ancestor of p\n");
abort();
@@ -593,19 +593,19 @@ APR_EXPORT(apr_table_t *) apr_overlay_tables(apr_pool_t *p,
*
* The caching api will allow a user to walk the header values:
*
- * apr_status_t ap_cache_el_header_walk(ap_cache_el *el,
+ * apr_status_t apr_cache_el_header_walk(apr_cache_el *el,
* int (*comp)(void *, const char *, const char *), void *rec, ...);
*
* So it can be ..., however from there I use a callback that use a va_list:
*
- * apr_status_t (*cache_el_header_walk)(ap_cache_el *el,
+ * apr_status_t (*cache_el_header_walk)(apr_cache_el *el,
* int (*comp)(void *, const char *, const char *), void *rec, va_list);
*
* To pass those ...'s on down to the actual module that will handle walking
- * their headers, in the file case this is actually just an ap_table - and
+ * their headers, in the file case this is actually just an apr_table - and
* rather than reimplementing apr_table_do (which IMHO would be bad) I just
* called it with the va_list. For mod_shmem_cache I don't need it since I
- * can't use ap_table's, but mod_file_cache should (though a good hash would
+ * can't use apr_table's, but mod_file_cache should (though a good hash would
* be better, but that's a different issue :).
*
* So to make mod_file_cache easier to maintain, it's a good thing
@@ -662,14 +662,14 @@ static int sort_overlap(const void *va, const void *vb)
}
/* prefer to use the stack for temp storage for overlaps smaller than this */
-#ifndef ap_OVERLAP_TABLES_ON_STACK
-#define ap_OVERLAP_TABLES_ON_STACK (512)
+#ifndef APR_OVERLAP_TABLES_ON_STACK
+#define APR_OVERLAP_TABLES_ON_STACK (512)
#endif
APR_EXPORT(void) apr_overlap_tables(apr_table_t *a, const apr_table_t *b,
unsigned flags)
{
- overlap_key cat_keys_buf[ap_OVERLAP_TABLES_ON_STACK];
+ overlap_key cat_keys_buf[APR_OVERLAP_TABLES_ON_STACK];
overlap_key *cat_keys;
int nkeys;
apr_table_entry_t *e;
@@ -679,7 +679,7 @@ APR_EXPORT(void) apr_overlap_tables(apr_table_t *a, const apr_table_t *b,
overlap_key *last;
nkeys = a->a.nelts + b->a.nelts;
- if (nkeys < ap_OVERLAP_TABLES_ON_STACK) {
+ if (nkeys < APR_OVERLAP_TABLES_ON_STACK) {
cat_keys = cat_keys_buf;
}
else {
@@ -736,7 +736,7 @@ APR_EXPORT(void) apr_overlap_tables(apr_table_t *a, const apr_table_t *b,
* appropriate.
*/
- if (flags & AP_OVERLAP_TABLES_MERGE) {
+ if (flags & APR_OVERLAP_TABLES_MERGE) {
left = cat_keys;
last = left + nkeys;
while (left < last) {
diff --git a/test/client.c b/test/client.c
index 845e643b3..64ca1f612 100644
--- a/test/client.c
+++ b/test/client.c
@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
}
if (argc > 2) {
- read_timeout = AP_USEC_PER_SEC * atoi(argv[2]);
+ read_timeout = APR_USEC_PER_SEC * atoi(argv[2]);
}
fprintf(stdout, "Initializing.........");
diff --git a/test/testargs.c b/test/testargs.c
index 448bf5cb8..9ab990679 100644
--- a/test/testargs.c
+++ b/test/testargs.c
@@ -79,12 +79,12 @@ int main(int argc, char * const argv[])
printf("option %c\n", data);
break;
case 'c':
- printf("option %c with %s\n", data, ap_optarg);
+ printf("option %c with %s\n", data, apr_optarg);
break;
case 'd':
printf("option %c", data);
- if (ap_optarg) {
- printf(" with %s\n", ap_optarg);
+ if (apr_optarg) {
+ printf(" with %s\n", apr_optarg);
}
else {
printf("\n");
diff --git a/test/testfile.c b/test/testfile.c
index 347cc53ad..efbe5fb9e 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -278,7 +278,7 @@ int testdirs(apr_pool_t *context)
apr_dir_t *temp;
apr_file_t *file = NULL;
apr_ssize_t bytes;
- ap_filetype_e type;
+ apr_filetype_e type;
char *fname;
fprintf(stdout, "Testing Directory functions.\n");
diff --git a/test/testmd5.c b/test/testmd5.c
index b05c1c87f..ca6614f70 100644
--- a/test/testmd5.c
+++ b/test/testmd5.c
@@ -86,7 +86,7 @@ static void try(const void *buf, size_t bufLen, apr_xlate_t *xlate,
{
int i;
apr_status_t rv;
- ap_md5_ctx_t context;
+ apr_md5_ctx_t context;
unsigned char hash[MD5_DIGESTSIZE];
rv = apr_MD5Init(&context);
@@ -94,7 +94,7 @@ static void try(const void *buf, size_t bufLen, apr_xlate_t *xlate,
if (xlate) {
#if APR_HAS_XLATE
- ap_MD5SetXlate(&context, xlate);
+ apr_MD5SetXlate(&context, xlate);
#else
fprintf(stderr,
"A translation handle was unexpected.\n");
@@ -156,11 +156,11 @@ int main(int argc, char **argv)
if (src) {
#if APR_HAS_XLATE
- rv = ap_xlate_open(&xlate, dst, src, pool);
+ rv = apr_xlate_open(&xlate, dst, src, pool);
if (rv) {
char buf[80];
- fprintf(stderr, "ap_xlate_open()->%s (%d)\n",
+ fprintf(stderr, "apr_xlate_open()->%s (%d)\n",
apr_strerror(rv, buf, sizeof(buf)), rv);
exit(1);
}
diff --git a/test/testpipe.c b/test/testpipe.c
index 9075c056e..4f1bdb149 100644
--- a/test/testpipe.c
+++ b/test/testpipe.c
@@ -95,7 +95,7 @@ int main(void)
}
fprintf(stdout, "\tSetting pipe timeout.......");
- if ((rv = apr_set_pipe_timeout(readp, 1 * AP_USEC_PER_SEC)) != APR_SUCCESS) {
+ if ((rv = apr_set_pipe_timeout(readp, 1 * APR_USEC_PER_SEC)) != APR_SUCCESS) {
fprintf(stderr, "apr_set_pipe_timeout()->%d/%s\n",
rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
exit(-1);
diff --git a/test/testsf.c b/test/testsf.c
index 8d2f8a5d3..cde32bf83 100644
--- a/test/testsf.c
+++ b/test/testsf.c
@@ -239,7 +239,7 @@ static int client(client_socket_mode_t socket_mode)
case TIMEOUT:
/* set a timeout */
rv = apr_setsocketopt(sock, APR_SO_TIMEOUT,
- 100 * AP_USEC_PER_SEC);
+ 100 * APR_USEC_PER_SEC);
if (rv != APR_SUCCESS) {
fprintf(stderr, "apr_setsocketopt(APR_SO_NONBLOCK)->%d/%s\n",
rv,
diff --git a/test/testtime.c b/test/testtime.c
index 1a5633fdb..816cb70dd 100644
--- a/test/testtime.c
+++ b/test/testtime.c
@@ -64,7 +64,7 @@
int main()
{
apr_time_t now;
- ap_exploded_time_t xt;
+ apr_exploded_time_t xt;
apr_time_t imp;
fprintf(stdout, "Testing Time functions.\n");
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index 4092455f5..bf09188c5 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -277,7 +277,7 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname,
return APR_SUCCESS;
}
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, ap_wait_t *status,
+apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
apr_wait_how_e waithow, apr_pool_t *p)
{
int waitpid_options = WUNTRACED;
diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c
index ea5e73fe3..c389148c1 100644
--- a/threadproc/os2/proc.c
+++ b/threadproc/os2/proc.c
@@ -491,7 +491,7 @@ apr_status_t apr_create_process(apr_proc_t *proc, const char *progname,
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, ap_wait_t *status,
+apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
apr_wait_how_e waithow, apr_pool_t *p)
{
RESULTCODES codes;
@@ -542,7 +542,7 @@ apr_status_t apr_wait_proc(apr_proc_t *proc,
-apr_status_t ap_get_os_proc(apr_os_proc_t *theproc, apr_proc_t *proc)
+apr_status_t apr_get_os_proc(apr_os_proc_t *theproc, apr_proc_t *proc)
{
if (proc == NULL) {
return APR_ENOPROC;
diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c
index e44106be0..3879f6d80 100644
--- a/threadproc/os2/thread.c
+++ b/threadproc/os2/thread.c
@@ -92,7 +92,7 @@ apr_status_t apr_getthreadattr_detach(apr_threadattr_t *attr)
-static void ap_thread_begin(void *arg)
+static void apr_thread_begin(void *arg)
{
apr_thread_t *thread = (apr_thread_t *)arg;
thread->rv = thread->func(thread->data);
@@ -133,9 +133,11 @@ apr_status_t apr_create_thread(apr_thread_t **new, apr_threadattr_t *attr,
}
if (thread->attr->attr & APR_THREADATTR_DETACHED)
- thread->tid = _beginthread((os2_thread_start_t)func, NULL, APR_THREAD_STACKSIZE, data);
+ thread->tid = _beginthread((os2_thread_start_t)func, NULL,
+ APR_THREAD_STACKSIZE, data);
else
- thread->tid = _beginthread(ap_thread_begin, NULL, APR_THREAD_STACKSIZE, thread);
+ thread->tid = _beginthread(apr_thread_begin, NULL,
+ APR_THREAD_STACKSIZE, thread);
if (thread->tid < 0) {
return errno;
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index 25a4b45c6..62ea3d770 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -358,7 +358,7 @@ apr_status_t apr_create_process(apr_proc_t *new, const char *progname,
return APR_SUCCESS;
}
-apr_status_t apr_wait_all_procs(apr_proc_t *proc, ap_wait_t *status,
+apr_status_t apr_wait_all_procs(apr_proc_t *proc, apr_wait_t *status,
apr_wait_how_e waithow, apr_pool_t *p)
{
int waitpid_options = WUNTRACED;
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index 1741b87d7..c362d07ba 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -110,9 +110,9 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in,
bAsyncRead = TRUE;
bAsyncWrite = TRUE;
}
- if ((stat = ap_create_nt_pipe(&attr->child_in, &attr->parent_in,
- bAsyncRead, bAsyncWrite,
- attr->cntxt)) != APR_SUCCESS) {
+ if ((stat = apr_create_nt_pipe(&attr->child_in, &attr->parent_in,
+ bAsyncRead, bAsyncWrite,
+ attr->cntxt)) != APR_SUCCESS) {
return stat;
}
}
@@ -133,9 +133,9 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in,
bAsyncRead = TRUE;
bAsyncWrite = TRUE;
}
- if ((stat = ap_create_nt_pipe(&attr->parent_out, &attr->child_out,
- bAsyncRead, bAsyncWrite,
- attr->cntxt)) != APR_SUCCESS) {
+ if ((stat = apr_create_nt_pipe(&attr->parent_out, &attr->child_out,
+ bAsyncRead, bAsyncWrite,
+ attr->cntxt)) != APR_SUCCESS) {
return stat;
}
}
@@ -156,9 +156,9 @@ apr_status_t apr_setprocattr_io(apr_procattr_t *attr, apr_int32_t in,
bAsyncRead = TRUE;
bAsyncWrite = TRUE;
}
- if ((stat = ap_create_nt_pipe(&attr->parent_err, &attr->child_err,
- bAsyncRead, bAsyncWrite,
- attr->cntxt)) != APR_SUCCESS) {
+ if ((stat = apr_create_nt_pipe(&attr->parent_err, &attr->child_err,
+ bAsyncRead, bAsyncWrite,
+ attr->cntxt)) != APR_SUCCESS) {
return stat;
}
}
@@ -432,7 +432,8 @@ apr_status_t apr_wait_proc(apr_proc_t *proc, apr_wait_how_e wait)
if (!proc)
return APR_ENOPROC;
if (wait == APR_WAIT) {
- if ((stat = WaitForSingleObject(proc->pid, INFINITE)) == WAIT_OBJECT_0) {
+ if ((stat = WaitForSingleObject((HANDLE)proc->pid,
+ INFINITE)) == WAIT_OBJECT_0) {
return APR_CHILD_DONE;
}
else if (stat == WAIT_TIMEOUT) {
@@ -440,7 +441,7 @@ apr_status_t apr_wait_proc(apr_proc_t *proc, apr_wait_how_e wait)
}
return GetLastError();
}
- if ((stat = WaitForSingleObject(proc->pid, 0)) == WAIT_OBJECT_0) {
+ if ((stat = WaitForSingleObject((HANDLE)proc->pid, 0)) == WAIT_OBJECT_0) {
return APR_CHILD_DONE;
}
else if (stat == WAIT_TIMEOUT) {
diff --git a/threadproc/win32/signals.c b/threadproc/win32/signals.c
index a75cd5309..8346c40f5 100644
--- a/threadproc/win32/signals.c
+++ b/threadproc/win32/signals.c
@@ -66,7 +66,7 @@
/* Windows only really support killing process, but that will do for now. */
apr_status_t apr_kill(apr_proc_t *proc, int signal)
{
- if (TerminateProcess(proc->pid, signal) == 0) {
+ if (TerminateProcess((HANDLE)proc->pid, signal) == 0) {
return GetLastError();
}
return APR_SUCCESS;
diff --git a/time/unix/time.c b/time/unix/time.c
index 60a29c189..96b5d6644 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -76,9 +76,9 @@
/* End System Headers */
-apr_status_t apr_ansi_time_to_ap_time(apr_time_t *result, time_t input)
+apr_status_t apr_ansi_time_to_apr_time(apr_time_t *result, time_t input)
{
- *result = (apr_time_t)input * AP_USEC_PER_SEC;
+ *result = (apr_time_t)input * APR_USEC_PER_SEC;
return APR_SUCCESS;
}
@@ -87,11 +87,11 @@ apr_time_t apr_now(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
- return tv.tv_sec * AP_USEC_PER_SEC + tv.tv_usec;
+ return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec;
}
-static void tm_to_exp(ap_exploded_time_t *xt, struct tm *tm)
+static void tm_to_exp(apr_exploded_time_t *xt, struct tm *tm)
{
xt->tm_sec = tm->tm_sec;
xt->tm_min = tm->tm_min;
@@ -105,14 +105,14 @@ static void tm_to_exp(ap_exploded_time_t *xt, struct tm *tm)
}
-apr_status_t apr_explode_gmt(ap_exploded_time_t *result, apr_time_t input)
+apr_status_t apr_explode_gmt(apr_exploded_time_t *result, apr_time_t input)
{
- time_t t = input / AP_USEC_PER_SEC;
+ time_t t = input / APR_USEC_PER_SEC;
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
struct tm banana;
#endif
- result->tm_usec = input % AP_USEC_PER_SEC;
+ result->tm_usec = input % APR_USEC_PER_SEC;
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
gmtime_r(&t, &banana);
@@ -124,13 +124,13 @@ apr_status_t apr_explode_gmt(ap_exploded_time_t *result, apr_time_t input)
return APR_SUCCESS;
}
-apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input)
+apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input)
{
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
- time_t t = input / AP_USEC_PER_SEC;
+ time_t t = input / APR_USEC_PER_SEC;
struct tm apricot;
- result->tm_usec = input % AP_USEC_PER_SEC;
+ result->tm_usec = input % APR_USEC_PER_SEC;
localtime_r(&t, &apricot);
tm_to_exp(result, &apricot);
@@ -152,10 +152,10 @@ apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input)
}
#endif
#else
- time_t t = input / AP_USEC_PER_SEC;
+ time_t t = input / APR_USEC_PER_SEC;
struct tm *tmx;
- result->tm_usec = input % AP_USEC_PER_SEC;
+ result->tm_usec = input % APR_USEC_PER_SEC;
tmx = localtime(&t);
tm_to_exp(result, tmx);
@@ -181,7 +181,7 @@ apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input)
}
-apr_status_t apr_implode_time(apr_time_t *t, ap_exploded_time_t *xt)
+apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt)
{
int year;
time_t days;
@@ -211,18 +211,19 @@ apr_status_t apr_implode_time(apr_time_t *t, ap_exploded_time_t *xt)
return APR_EBADDATE;
}
days -= xt->tm_gmtoff;
- *t = days * AP_USEC_PER_SEC + xt->tm_usec;
+ *t = days * APR_USEC_PER_SEC + xt->tm_usec;
return APR_SUCCESS;
}
apr_status_t apr_get_os_imp_time(apr_os_imp_time_t **ostime, apr_time_t *aprtime)
{
- (*ostime)->tv_usec = *aprtime % AP_USEC_PER_SEC;
- (*ostime)->tv_sec = *aprtime / AP_USEC_PER_SEC;
+ (*ostime)->tv_usec = *aprtime % APR_USEC_PER_SEC;
+ (*ostime)->tv_sec = *aprtime / APR_USEC_PER_SEC;
return APR_SUCCESS;
}
-apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime, ap_exploded_time_t *aprtime)
+apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+ apr_exploded_time_t *aprtime)
{
(*ostime)->tm_sec = aprtime->tm_sec;
(*ostime)->tm_min = aprtime->tm_min;
@@ -239,12 +240,12 @@ apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime, ap_exploded_time_t
apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime,
apr_pool_t *cont)
{
- *aprtime = (*ostime)->tv_sec * AP_USEC_PER_SEC + (*ostime)->tv_usec;
+ *aprtime = (*ostime)->tv_sec * APR_USEC_PER_SEC + (*ostime)->tv_usec;
return APR_SUCCESS;
}
-apr_status_t apr_put_os_exp_time(ap_exploded_time_t *aprtime,
- apr_os_exp_time_t **ostime, apr_pool_t *cont)
+apr_status_t apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+ apr_os_exp_time_t **ostime, apr_pool_t *cont)
{
aprtime->tm_sec = (*ostime)->tm_sec;
aprtime->tm_min = (*ostime)->tm_min;
@@ -264,14 +265,15 @@ void apr_sleep(apr_interval_time_t t)
DosSleep(t/1000);
#else
struct timeval tv;
- tv.tv_usec = t % AP_USEC_PER_SEC;
- tv.tv_sec = t / AP_USEC_PER_SEC;
+ tv.tv_usec = t % APR_USEC_PER_SEC;
+ tv.tv_sec = t / APR_USEC_PER_SEC;
select(0, NULL, NULL, NULL, &tv);
#endif
}
#ifdef OS2
-apr_status_t ap_os2_time_to_ap_time(apr_time_t *result, FDATE os2date, FTIME os2time)
+apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date,
+ FTIME os2time)
{
struct tm tmpdate;
@@ -285,7 +287,7 @@ apr_status_t ap_os2_time_to_ap_time(apr_time_t *result, FDATE os2date, FTIME os2
tmpdate.tm_year = os2date.year + 80;
tmpdate.tm_isdst = -1;
- *result = mktime(&tmpdate) * AP_USEC_PER_SEC;
+ *result = mktime(&tmpdate) * APR_USEC_PER_SEC;
return APR_SUCCESS;
}
#endif
diff --git a/time/unix/timestr.c b/time/unix/timestr.c
index 22b342dcf..52aa1f148 100644
--- a/time/unix/timestr.c
+++ b/time/unix/timestr.c
@@ -68,18 +68,18 @@
#endif
/* End System Headers */
-APR_VAR_EXPORT const char ap_month_snames[12][4] =
+APR_VAR_EXPORT const char apr_month_snames[12][4] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-APR_VAR_EXPORT const char ap_day_snames[7][4] =
+APR_VAR_EXPORT const char apr_day_snames[7][4] =
{
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
{
- ap_exploded_time_t xt;
+ apr_exploded_time_t xt;
const char *s;
int real_year;
@@ -88,7 +88,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
/* example: "Sat, 08 Jan 2000 18:31:41 GMT" */
/* 12345678901234567890123456789 */
- s = &ap_day_snames[xt.tm_wday][0];
+ s = &apr_day_snames[xt.tm_wday][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -97,7 +97,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
*date_str++ = xt.tm_mday / 10 + '0';
*date_str++ = xt.tm_mday % 10 + '0';
*date_str++ = ' ';
- s = &ap_month_snames[xt.tm_mon][0];
+ s = &apr_month_snames[xt.tm_mon][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -127,7 +127,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
apr_status_t apr_ctime(char *date_str, apr_time_t t)
{
- ap_exploded_time_t xt;
+ apr_exploded_time_t xt;
const char *s;
int real_year;
@@ -135,12 +135,12 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t)
/* 123456789012345678901234 */
apr_explode_localtime(&xt, t);
- s = &ap_day_snames[xt.tm_wday][0];
+ s = &apr_day_snames[xt.tm_wday][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = ' ';
- s = &ap_month_snames[xt.tm_mon][0];
+ s = &apr_month_snames[xt.tm_mon][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -168,7 +168,7 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t)
}
apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max,
- const char *format, ap_exploded_time_t *xt)
+ const char *format, apr_exploded_time_t *xt)
{
struct tm tm;
diff --git a/time/win32/access.c b/time/win32/access.c
index e38d7d575..0bc5f8719 100644
--- a/time/win32/access.c
+++ b/time/win32/access.c
@@ -57,7 +57,7 @@
#include "apr_general.h"
#include "apr_lib.h"
-apr_status_t ap_get_curtime(struct atime_t *time, apr_time_t *rv)
+apr_status_t apr_get_curtime(struct atime_t *time, apr_time_t *rv)
{
if (time) {
(*rv) = time->currtime;
@@ -66,7 +66,7 @@ apr_status_t ap_get_curtime(struct atime_t *time, apr_time_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_sec(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_sec(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wSecond;
@@ -75,7 +75,7 @@ apr_status_t ap_get_sec(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_min(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_min(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wMinute;
@@ -84,7 +84,7 @@ apr_status_t ap_get_min(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_hour(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_hour(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wHour;
@@ -93,7 +93,7 @@ apr_status_t ap_get_hour(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_mday(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_mday(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wDay;
@@ -102,7 +102,7 @@ apr_status_t ap_get_mday(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_mon(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_mon(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wMonth;
@@ -111,7 +111,7 @@ apr_status_t ap_get_mon(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_year(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_year(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wYear;
@@ -120,7 +120,7 @@ apr_status_t ap_get_year(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_get_wday(struct atime_t *time, apr_int32_t *rv)
+apr_status_t apr_get_wday(struct atime_t *time, apr_int32_t *rv)
{
if (time) {
(*rv) = time->explodedtime->wDayOfWeek;
@@ -129,7 +129,7 @@ apr_status_t ap_get_wday(struct atime_t *time, apr_int32_t *rv)
return APR_ENOTIME;
}
-apr_status_t ap_set_sec(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_sec(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
@@ -145,7 +145,7 @@ apr_status_t ap_set_sec(struct atime_t *time, apr_int32_t value)
return APR_SUCCESS;
}
-apr_status_t ap_set_min(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_min(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
@@ -161,7 +161,7 @@ apr_status_t ap_set_min(struct atime_t *time, apr_int32_t value)
return APR_SUCCESS;
}
-apr_status_t ap_set_hour(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_hour(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
@@ -177,7 +177,7 @@ apr_status_t ap_set_hour(struct atime_t *time, apr_int32_t value)
return APR_SUCCESS;
}
-apr_status_t ap_set_mday(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_mday(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
@@ -193,7 +193,7 @@ apr_status_t ap_set_mday(struct atime_t *time, apr_int32_t value)
return APR_SUCCESS;
}
-apr_status_t ap_set_mon(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_mon(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
@@ -209,7 +209,7 @@ apr_status_t ap_set_mon(struct atime_t *time, apr_int32_t value)
return APR_SUCCESS;
}
-apr_status_t ap_set_year(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_year(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
@@ -225,7 +225,7 @@ apr_status_t ap_set_year(struct atime_t *time, apr_int32_t value)
return APR_SUCCESS;
}
-apr_status_t ap_set_wday(struct atime_t *time, apr_int32_t value)
+apr_status_t apr_set_wday(struct atime_t *time, apr_int32_t value)
{
if (!time) {
return APR_ENOTIME;
diff --git a/time/win32/time.c b/time/win32/time.c
index 899a57a55..f45f74850 100644
--- a/time/win32/time.c
+++ b/time/win32/time.c
@@ -65,7 +65,7 @@
/* Number of micro-seconds between the beginning of the Windows epoch
* (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970)
*/
-#define AP_DELTA_EPOCH_IN_USEC 11644473600000000;
+#define APR_DELTA_EPOCH_IN_USEC 11644473600000000;
void FileTimeToAprTime(apr_time_t *result, FILETIME *input)
{
@@ -74,20 +74,20 @@ void FileTimeToAprTime(apr_time_t *result, FILETIME *input)
*result = (*result) << 32;
*result |= input->dwLowDateTime;
*result /= 10; /* Convert from 100 nano-sec periods to micro-seconds. */
- *result -= AP_DELTA_EPOCH_IN_USEC; /* Convert from Windows epoch to Unix epoch */
+ *result -= APR_DELTA_EPOCH_IN_USEC; /* Convert from Windows epoch to Unix epoch */
return;
}
void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)
{
LONGLONG ll;
- t += AP_DELTA_EPOCH_IN_USEC;
+ t += APR_DELTA_EPOCH_IN_USEC;
ll = t * 10;
pft->dwLowDateTime = (DWORD)ll;
pft->dwHighDateTime = (DWORD) (ll >> 32);
return;
}
-void SystemTimeToAprExpTime(ap_exploded_time_t *xt, SYSTEMTIME *tm)
+void SystemTimeToAprExpTime(apr_exploded_time_t *xt, SYSTEMTIME *tm)
{
TIME_ZONE_INFORMATION tz;
DWORD rc;
@@ -123,9 +123,9 @@ void SystemTimeToAprExpTime(ap_exploded_time_t *xt, SYSTEMTIME *tm)
return;
}
-apr_status_t apr_ansi_time_to_ap_time(apr_time_t *result, time_t input)
+apr_status_t apr_ansi_time_to_apr_time(apr_time_t *result, time_t input)
{
- *result = (apr_time_t) input * AP_USEC_PER_SEC;
+ *result = (apr_time_t) input * APR_USEC_PER_SEC;
return APR_SUCCESS;
}
@@ -139,7 +139,7 @@ apr_time_t apr_now(void)
return aprtime;
}
-apr_status_t apr_explode_gmt(ap_exploded_time_t *result, apr_time_t input)
+apr_status_t apr_explode_gmt(apr_exploded_time_t *result, apr_time_t input)
{
FILETIME ft;
SYSTEMTIME st;
@@ -149,7 +149,7 @@ apr_status_t apr_explode_gmt(ap_exploded_time_t *result, apr_time_t input)
return APR_SUCCESS;
}
-apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input)
+apr_status_t apr_explode_localtime(apr_exploded_time_t *result, apr_time_t input)
{
SYSTEMTIME st;
FILETIME ft, localft;
@@ -161,7 +161,7 @@ apr_status_t apr_explode_localtime(ap_exploded_time_t *result, apr_time_t input)
return APR_SUCCESS;
}
-apr_status_t apr_implode_time(apr_time_t *t, ap_exploded_time_t *xt)
+apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt)
{
int year;
time_t days;
@@ -191,7 +191,7 @@ apr_status_t apr_implode_time(apr_time_t *t, ap_exploded_time_t *xt)
return APR_EBADDATE;
}
days -= xt->tm_gmtoff;
- *t = days * AP_USEC_PER_SEC + xt->tm_usec;
+ *t = days * APR_USEC_PER_SEC + xt->tm_usec;
return APR_SUCCESS;
}
@@ -202,7 +202,8 @@ apr_status_t apr_get_os_imp_time(apr_os_imp_time_t **ostime, apr_time_t *aprtime
return APR_SUCCESS;
}
-apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime, ap_exploded_time_t *aprexptime)
+apr_status_t apr_get_os_exp_time(apr_os_exp_time_t **ostime,
+ apr_exploded_time_t *aprexptime)
{
(*ostime)->wYear = aprexptime->tm_year + 1900;
(*ostime)->wMonth = aprexptime->tm_mon + 1;
@@ -222,8 +223,8 @@ apr_status_t apr_put_os_imp_time(apr_time_t *aprtime, apr_os_imp_time_t **ostime
return APR_SUCCESS;
}
-apr_status_t apr_put_os_exp_time(ap_exploded_time_t *aprtime,
- apr_os_exp_time_t **ostime, apr_pool_t *cont)
+apr_status_t apr_put_os_exp_time(apr_exploded_time_t *aprtime,
+ apr_os_exp_time_t **ostime, apr_pool_t *cont)
{
SystemTimeToAprExpTime(aprtime, *ostime);
return APR_SUCCESS;
diff --git a/time/win32/timestr.c b/time/win32/timestr.c
index df8254c55..4f397cdd3 100644
--- a/time/win32/timestr.c
+++ b/time/win32/timestr.c
@@ -55,18 +55,18 @@
#include "atime.h"
#include "apr_portable.h"
-APR_VAR_EXPORT const char ap_month_snames[12][4] =
+APR_VAR_EXPORT const char apr_month_snames[12][4] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-APR_VAR_EXPORT const char ap_day_snames[7][4] =
+APR_VAR_EXPORT const char apr_day_snames[7][4] =
{
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
{
- ap_exploded_time_t xt;
+ apr_exploded_time_t xt;
const char *s;
int real_year;
@@ -75,7 +75,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
/* example: "Sat, 08 Jan 2000 18:31:41 GMT" */
/* 12345678901234567890123456789 */
- s = &ap_day_snames[xt.tm_wday][0];
+ s = &apr_day_snames[xt.tm_wday][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -84,7 +84,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
*date_str++ = xt.tm_mday / 10 + '0';
*date_str++ = xt.tm_mday % 10 + '0';
*date_str++ = ' ';
- s = &ap_month_snames[xt.tm_mon][0];
+ s = &apr_month_snames[xt.tm_mon][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -114,7 +114,7 @@ apr_status_t apr_rfc822_date(char *date_str, apr_time_t t)
apr_status_t apr_ctime(char *date_str, apr_time_t t)
{
- ap_exploded_time_t xt;
+ apr_exploded_time_t xt;
const char *s;
int real_year;
@@ -122,12 +122,12 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t)
/* 123456789012345678901234 */
apr_explode_localtime(&xt, t);
- s = &ap_day_snames[xt.tm_wday][0];
+ s = &apr_day_snames[xt.tm_wday][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = ' ';
- s = &ap_month_snames[xt.tm_mon][0];
+ s = &apr_month_snames[xt.tm_mon][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -155,7 +155,7 @@ apr_status_t apr_ctime(char *date_str, apr_time_t t)
}
apr_status_t apr_strftime(char *s, apr_size_t *retsize, apr_size_t max,
- const char *format, ap_exploded_time_t *xt)
+ const char *format, apr_exploded_time_t *xt)
{
struct tm tm;
memset(&tm, 0, sizeof tm);