diff options
82 files changed, 260 insertions, 255 deletions
diff --git a/file_io/os2/dir.c b/file_io/os2/dir.c index 3072a2243..3e935a3de 100644 --- a/file_io/os2/dir.c +++ b/file_io/os2/dir.c @@ -69,7 +69,7 @@ ap_status_t dir_cleanup(void *thedir) -ap_status_t ap_opendir(ap_context_t *cntxt, const char *dirname, struct dir_t **new) +ap_status_t ap_opendir(struct dir_t **new, ap_context_t *cntxt, const char *dirname) { struct dir_t *thedir = (struct dir_t *)ap_palloc(cntxt, sizeof(struct dir_t)); @@ -212,7 +212,7 @@ ap_status_t ap_dir_entry_ftype(struct dir_t *thedir, ap_filetype_e *type) -ap_status_t ap_get_dir_filename(struct dir_t *thedir, char **new) +ap_status_t ap_get_dir_filename(char **new, struct dir_t *thedir) { if (thedir->validentry) { *new = thedir->entry.achName; diff --git a/file_io/os2/fileacc.c b/file_io/os2/fileacc.c index a31519265..872c5e787 100644 --- a/file_io/os2/fileacc.c +++ b/file_io/os2/fileacc.c @@ -63,7 +63,7 @@ /* A file to put ALL of the accessor functions for struct file_t types. */ -ap_status_t ap_get_filename(struct file_t *thefile, char **new) +ap_status_t ap_get_filename(char **new, struct file_t *thefile) { if (thefile != NULL) { *new = ap_pstrdup(thefile->cntxt, thefile->fname); diff --git a/file_io/os2/filedup.c b/file_io/os2/filedup.c index 884c8e67a..24139aeb6 100644 --- a/file_io/os2/filedup.c +++ b/file_io/os2/filedup.c @@ -61,7 +61,7 @@ #define INCL_DOS #include <os2.h> -ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new_file) +ap_status_t ap_dupfile(struct file_t **new_file, struct file_t *old_file) { int rv; struct file_t *dup_file = (struct file_t *)ap_palloc(old_file->cntxt, sizeof(struct file_t)); diff --git a/file_io/os2/open.c b/file_io/os2/open.c index 090d33f62..3fb434690 100644 --- a/file_io/os2/open.c +++ b/file_io/os2/open.c @@ -69,7 +69,7 @@ ap_status_t file_cleanup(void *thefile) -ap_status_t ap_open(ap_context_t *cntxt, char *fname, ap_int32_t flag, ap_fileperms_t perm, struct file_t **new) +ap_status_t ap_open(struct file_t **new, ap_context_t *cntxt, char *fname, ap_int32_t flag, ap_fileperms_t perm) { int oflags = 0; int mflags = OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYNONE; diff --git a/file_io/os2/pipe.c b/file_io/os2/pipe.c index 50595d700..131c2105f 100644 --- a/file_io/os2/pipe.c +++ b/file_io/os2/pipe.c @@ -59,7 +59,7 @@ #include "apr_lib.h" #include <string.h> -ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct file_t **out) +ap_status_t ap_create_pipe(struct file_t **in, struct file_t **out, ap_context_t *cont) { ULONG filedes[2]; ULONG rc; @@ -89,7 +89,7 @@ ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct file_t -ap_status_t ap_create_namedpipe(ap_context_t *cont, char *dirpath, ap_fileperms_t perm, char **new) +ap_status_t ap_create_namedpipe(char **new, ap_context_t *cont, char *dirpath, ap_fileperms_t perm) { /* Not yet implemented, interface not suitable */ return -1; diff --git a/file_io/unix/dir.c b/file_io/unix/dir.c index 7e67d0300..620bd42e9 100644 --- a/file_io/unix/dir.c +++ b/file_io/unix/dir.c @@ -75,13 +75,13 @@ static ap_status_t dir_cleanup(void *thedir) } /* ***APRDOC******************************************************** - * ap_status_t ap_opendir(ap_context_t *, char *, ap_dir_t **) + * ap_status_t ap_opendir(ap_dir_t **, ap_context_t *, char *) * Open the specified directory. * arg 1) The context to use. * arg 2) The full path to the directory (use / on all systems) * arg 3) The opened directory descriptor. */ -ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, struct dir_t **new) +ap_status_t ap_opendir(struct dir_t **new, ap_context_t *cont, const char *dirname) { (*new) = (struct dir_t *)ap_palloc(cont, sizeof(struct dir_t)); @@ -272,12 +272,12 @@ ap_status_t ap_dir_entry_ftype(struct dir_t *thedir, ap_filetype_e *type) } /* ***APRDOC******************************************************** - * ap_status_t ap_get_dir_filename(ap_dir_t *, char **) + * ap_status_t ap_get_dir_filename(char **, ap_dir_t *) * Get the file name of the current directory entry. * arg 1) the currently open directory. * arg 2) the file name of the directory entry. */ -ap_status_t ap_get_dir_filename(struct dir_t *thedir, char **new) +ap_status_t ap_get_dir_filename(char **new, struct dir_t *thedir) { (*new) = ap_pstrdup(thedir->cntxt, thedir->entry->d_name); return APR_SUCCESS; @@ -304,8 +304,8 @@ ap_status_t ap_get_os_dir(struct dir_t *dir, ap_os_dir_t *thedir) * arg 1) The os specific dir to convert * arg 2) The apr dir we are converting to. */ -ap_status_t ap_put_os_dir(ap_context_t *cont, struct dir_t **dir, - ap_os_dir_t *thedir) +ap_status_t ap_put_os_dir(struct dir_t **dir, ap_os_dir_t *thedir, + ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; diff --git a/file_io/unix/fileacc.c b/file_io/unix/fileacc.c index 232f1e592..85eec2347 100644 --- a/file_io/unix/fileacc.c +++ b/file_io/unix/fileacc.c @@ -64,12 +64,12 @@ /* A file to put ALL of the accessor functions for struct file_t types. */ /* ***APRDOC******************************************************** - * ap_status_t ap_get_filename(ap_file_t *, char **) + * ap_status_t ap_get_filename(char **, ap_file_t *) * return the file name of the current file. * arg 1) The currently open file. * arg 2) The path of the file. */ -ap_status_t ap_get_filename(struct file_t *thefile, char **new) +ap_status_t ap_get_filename(char **new, struct file_t *thefile) { if (thefile != NULL) { *new = ap_pstrdup(thefile->cntxt, thefile->fname); @@ -260,7 +260,7 @@ ap_status_t ap_get_filetype(struct file_t *file, ap_filetype_e *type) ap_status_t ap_get_filedata(struct file_t *file, char *key, void *data) { if (file != NULL) { - return ap_get_userdata(file->cntxt, key, &data); + return ap_get_userdata(&data, file->cntxt, key); } else { data = NULL; diff --git a/file_io/unix/filedup.c b/file_io/unix/filedup.c index 25e10d2ad..f191a57d0 100644 --- a/file_io/unix/filedup.c +++ b/file_io/unix/filedup.c @@ -60,12 +60,12 @@ #include <string.h> /* ***APRDOC******************************************************** - * ap_status_t ap_dupfile(ap_file_t *, ap_file_t **) + * ap_status_t ap_dupfile(ap_file_t **, ap_file_t *) * duplicate the specified file descriptor. * arg 1) The file to duplicate. * arg 2) The structure to duplicate into. */ -ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new_file) +ap_status_t ap_dupfile(struct file_t **new_file, struct file_t *old_file) { char *buf_oflags; (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt, diff --git a/file_io/unix/fileio.h b/file_io/unix/fileio.h index 1800205fb..beb1a9f6e 100644 --- a/file_io/unix/fileio.h +++ b/file_io/unix/fileio.h @@ -65,6 +65,9 @@ #include "apr_general.h" #include "apr_file_io.h" #include "apr_errno.h" +#ifdef BEOS +#include <kernel/OS.h> +#endif struct file_t { ap_context_t *cntxt; diff --git a/file_io/unix/open.c b/file_io/unix/open.c index eb55a10f1..67e9c92b6 100644 --- a/file_io/unix/open.c +++ b/file_io/unix/open.c @@ -103,7 +103,7 @@ ap_status_t file_cleanup(void *thefile) * NOTE: If mode is APR_OS_DEFAULT, the system open command will be * called without any mode parameters. */ -ap_status_t ap_open(ap_context_t *cont, const char *fname, ap_int32_t flag, ap_fileperms_t perm, struct file_t **new) +ap_status_t ap_open(struct file_t **new, ap_context_t *cont, const char *fname, ap_int32_t flag, ap_fileperms_t perm) { int oflags = 0; mode_t mode = get_fileperms(perm); @@ -246,8 +246,8 @@ ap_status_t ap_get_os_file(struct file_t *file, ap_os_file_t *thefile) * NOTE: On Unix, it is only possible to put a file descriptor into * an apr file type. */ -ap_status_t ap_put_os_file(ap_context_t *cont, struct file_t **file, - ap_os_file_t *thefile) +ap_status_t ap_put_os_file(struct file_t **file, ap_os_file_t *thefile, + ap_context_t *cont) { int *dafile = thefile; if ((*file) == NULL) { diff --git a/file_io/unix/pipe.c b/file_io/unix/pipe.c index ca842de1a..6989da6af 100644 --- a/file_io/unix/pipe.c +++ b/file_io/unix/pipe.c @@ -64,13 +64,13 @@ #include <sys/stat.h> /* ***APRDOC******************************************************** - * ap_status_t ap_create_pipe(ap_context_t *, ap_file_t **, ap_file_t **) + * ap_status_t ap_create_pipe(ap_file_t **, ap_context_t *, ap_file_t **) * Create an anonymous pipe. * arg 1) The context to operate on. * arg 2) The file descriptor to use as input to the pipe. * arg 3) The file descriptor to use as output from the pipe. */ -ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct file_t **out) +ap_status_t ap_create_pipe(struct file_t **in, struct file_t **out, ap_context_t *cont) { int filedes[2]; @@ -100,8 +100,8 @@ ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct file_t * arg 3) The permissions for the newly created pipe. * arg 4) The name of the new pipe. */ -ap_status_t ap_create_namedpipe(ap_context_t *cont, char *dirpath, - ap_fileperms_t perm, char **new) +ap_status_t ap_create_namedpipe(char **new, ap_context_t *cont, char *dirpath, + ap_fileperms_t perm) { mode_t mode = get_fileperms(perm); diff --git a/file_io/win32/dir.c b/file_io/win32/dir.c index 1c4741147..6ef32ff0a 100644 --- a/file_io/win32/dir.c +++ b/file_io/win32/dir.c @@ -84,7 +84,7 @@ ap_status_t dir_cleanup(void *thedir) } } -ap_status_t ap_opendir(ap_context_t *cont, const char *dirname, struct dir_t **new) +ap_status_t ap_opendir(struct dir_t **new, ap_context_t *cont, const char *dirname) { char * temp; (*new) = ap_palloc(cont, sizeof(struct dir_t)); @@ -203,7 +203,7 @@ ap_status_t ap_dir_entry_ftype(struct dir_t *thedir, ap_filetype_e *type) } } -ap_status_t ap_get_dir_filename(struct dir_t *thedir, char **new) +ap_status_t ap_get_dir_filename(char **new, struct dir_t *thedir) { (*new) = ap_pstrdup(thedir->cntxt, thedir->entry->cFileName); return APR_SUCCESS; diff --git a/file_io/win32/fileacc.c b/file_io/win32/fileacc.c index 08d8b3976..a507059ae 100644 --- a/file_io/win32/fileacc.c +++ b/file_io/win32/fileacc.c @@ -63,7 +63,7 @@ /* A file to put ALL of the accessor functions for struct file_t types. */ -ap_status_t ap_get_filename(struct file_t *thefile, char **new) +ap_status_t ap_get_filename(char **new, struct file_t *thefile) { if (thefile != NULL) { *new = ap_pstrdup(thefile->cntxt, thefile->fname); diff --git a/file_io/win32/filedup.c b/file_io/win32/filedup.c index 2d3135a3b..95517f909 100644 --- a/file_io/win32/filedup.c +++ b/file_io/win32/filedup.c @@ -59,7 +59,7 @@ #include "apr_lib.h" #include <string.h> -ap_status_t ap_dupfile(struct file_t *old_file, struct file_t **new_file) +ap_status_t ap_dupfile(struct file_t **new_file, struct file_t *old_file) { (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt, sizeof(struct file_t)); diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c index 9db2ab8d1..d1c843c76 100644 --- a/file_io/win32/pipe.c +++ b/file_io/win32/pipe.c @@ -63,7 +63,7 @@ #include <sys/types.h> #include <sys/stat.h> -ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct file_t **out) +ap_status_t ap_create_pipe(struct file_t **in, struct file_t **out, ap_context_t *cont) { SECURITY_ATTRIBUTES sa; @@ -87,7 +87,7 @@ ap_status_t ap_create_pipe(ap_context_t *cont, struct file_t **in, struct file_t } /* -ap_status_t ap_create_namedpipe(ap_context_t *cont, char *dirpath, ap_fileperms_t perm, char **new) +ap_status_t ap_create_namedpipe(char **new, ap_context_t *cont, char *dirpath, ap_fileperms_t perm) { mode_t mode = get_fileperms(perm); diff --git a/include/apr_file_io.h b/include/apr_file_io.h index eb3bd0ed2..dd65ae3d3 100644 --- a/include/apr_file_io.h +++ b/include/apr_file_io.h @@ -107,7 +107,7 @@ typedef struct iovec_t ap_iovec_t; typedef ap_int32_t ap_fileperms_t; /* Function definitions */ -ap_status_t ap_open(ap_context_t *, const char *, ap_int32_t, ap_fileperms_t, ap_file_t **); +ap_status_t ap_open(ap_file_t **, ap_context_t *, const char *, ap_int32_t, ap_fileperms_t); ap_status_t ap_close(ap_file_t *); ap_status_t ap_remove_file(ap_context_t *, char *); ap_status_t ap_eof(ap_file_t *); @@ -124,23 +124,23 @@ ap_status_t ap_flush(ap_file_t *); API_EXPORT(int) ap_fprintf(ap_file_t *fptr, const char *format, ...) __attribute__((format(printf,2,3))); -ap_status_t ap_dupfile(ap_file_t *, ap_file_t **); +ap_status_t ap_dupfile(ap_file_t **, ap_file_t *); ap_status_t ap_getfileinfo(ap_file_t *); ap_status_t ap_seek(ap_file_t *, ap_seek_where_t, ap_off_t *); -ap_status_t ap_opendir(ap_context_t *, const char *, ap_dir_t **); +ap_status_t ap_opendir(ap_dir_t **, ap_context_t *, const char *); ap_status_t ap_closedir(ap_dir_t *); ap_status_t ap_readdir(ap_dir_t *); ap_status_t ap_rewinddir(ap_dir_t *); ap_status_t ap_make_dir(ap_context_t *, const char *, ap_fileperms_t); ap_status_t ap_remove_dir(ap_context_t *, const char *); -ap_status_t ap_create_pipe(ap_context_t *, ap_file_t **, ap_file_t **); -ap_status_t ap_create_namedpipe(ap_context_t *, char *, ap_fileperms_t, char **); +ap_status_t ap_create_pipe(ap_file_t **, ap_file_t **, ap_context_t *); +ap_status_t ap_create_namedpipe(char **, ap_context_t *, char *, ap_fileperms_t); /*accessor and general file_io functions. */ -ap_status_t ap_get_filename(ap_file_t *, char **); -ap_status_t ap_get_dir_filename(ap_dir_t *, char **); +ap_status_t ap_get_filename(char **, ap_file_t *); +ap_status_t ap_get_dir_filename(char **, ap_dir_t *); ap_status_t ap_get_filedata(ap_file_t *, char *, void *); ap_status_t ap_set_filedata(ap_file_t *, void *, char *, ap_status_t (*cleanup) (void *)); diff --git a/include/apr_general.h b/include/apr_general.h index be776be68..1d1b3a783 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -225,12 +225,12 @@ typedef int ap_signum_t; #endif /* Context functions */ -ap_status_t ap_create_context(ap_context_t *, ap_context_t **); +ap_status_t ap_create_context(ap_context_t **, ap_context_t *); ap_status_t ap_destroy_context(struct context_t *cont); ap_status_t ap_exit(ap_context_t *); ap_status_t ap_set_userdata(ap_context_t *, void *, char *, ap_status_t (*cleanup) (void *)); -ap_status_t ap_get_userdata(ap_context_t *, char *, void **); +ap_status_t ap_get_userdata(void **, ap_context_t *, char *); ap_status_t ap_initialize(void); ap_status_t ap_create_signal(ap_context_t *, ap_signum_t); diff --git a/include/apr_lock.h b/include/apr_lock.h index bf4d262c0..64a998872 100644 --- a/include/apr_lock.h +++ b/include/apr_lock.h @@ -75,7 +75,7 @@ ap_status_t ap_create_lock(ap_context_t *, ap_locktype_e, ap_lockscope_e, ap_status_t ap_lock(ap_lock_t *); ap_status_t ap_unlock(ap_lock_t *); ap_status_t ap_destroy_lock(ap_lock_t *); -ap_status_t ap_child_init_lock(ap_context_t *, char *, ap_lock_t **); +ap_status_t ap_child_init_lock(ap_lock_t **, ap_context_t *, char *); ap_status_t ap_get_lockdata(ap_lock_t *, char *, void *); ap_status_t ap_set_lockdata(ap_lock_t *, void *, char *, diff --git a/include/apr_network_io.h b/include/apr_network_io.h index 06da35e88..4775b800d 100644 --- a/include/apr_network_io.h +++ b/include/apr_network_io.h @@ -104,16 +104,16 @@ typedef struct pollfd_t ap_pollfd_t; /* function definitions */ -ap_status_t ap_create_tcp_socket(ap_context_t *, ap_socket_t **); +ap_status_t ap_create_tcp_socket(ap_socket_t **, ap_context_t *); ap_status_t ap_shutdown(ap_socket_t *, ap_shutdown_how_e); ap_status_t ap_close_socket(ap_socket_t *); ap_status_t ap_bind(ap_socket_t *); ap_status_t ap_listen(ap_socket_t *, ap_int32_t); -ap_status_t ap_accept(const ap_socket_t *, ap_socket_t **); +ap_status_t ap_accept(ap_socket_t **, const ap_socket_t *); ap_status_t ap_connect(ap_socket_t *, char *); -ap_status_t ap_get_remote_hostname(ap_socket_t *, char **); +ap_status_t ap_get_remote_hostname(char **, ap_socket_t *); ap_status_t ap_gethostname(ap_context_t *, char *, int); ap_status_t ap_get_socketdata(ap_socket_t *, char *, void *); ap_status_t ap_set_socketdata(ap_socket_t *, void *, char *, @@ -128,7 +128,7 @@ ap_status_t ap_setipaddr(ap_socket_t *, const char *); ap_status_t ap_getport(ap_socket_t *, ap_uint32_t *); ap_status_t ap_getipaddr(char *buf, ap_ssize_t len, const ap_socket_t *sock); -ap_status_t ap_setup_poll(ap_context_t *, ap_int32_t, ap_pollfd_t **); +ap_status_t ap_setup_poll(ap_pollfd_t **, ap_context_t *, ap_int32_t); ap_status_t ap_poll(ap_pollfd_t *, ap_int32_t *, ap_int32_t); ap_status_t ap_add_poll_socket(ap_pollfd_t *, ap_socket_t *, ap_int16_t); ap_status_t ap_remove_poll_socket(ap_pollfd_t *, ap_socket_t *, ap_int16_t); diff --git a/include/apr_portable.h b/include/apr_portable.h index 0b923a813..559501b0b 100644 --- a/include/apr_portable.h +++ b/include/apr_portable.h @@ -186,17 +186,17 @@ ap_status_t ap_get_os_sock(ap_socket_t *, ap_os_sock_t *); ap_status_t ap_get_os_lock(ap_lock_t *, ap_os_lock_t *); ap_status_t ap_get_os_thread(ap_thread_t *, ap_os_thread_t *); ap_status_t ap_get_os_proc(ap_proc_t *, ap_os_proc_t *); -ap_status_t ap_get_os_time(ap_time_t *, ap_os_time_t **); +ap_status_t ap_get_os_time(ap_os_time_t **, ap_time_t *); ap_status_t ap_get_os_threadkey(ap_key_t *, ap_os_threadkey_t *); -ap_status_t ap_put_os_file(ap_context_t *, ap_file_t **, ap_os_file_t *); -ap_status_t ap_put_os_dir(ap_context_t *, ap_dir_t **, ap_os_dir_t *); -ap_status_t ap_put_os_sock(ap_context_t *, ap_socket_t **, ap_os_sock_t *); -ap_status_t ap_put_os_lock(ap_context_t *, ap_lock_t **, ap_os_lock_t *); -ap_status_t ap_put_os_thread(ap_context_t *, ap_thread_t **, ap_os_thread_t *); -ap_status_t ap_put_os_proc(ap_context_t *, ap_proc_t **, ap_os_proc_t *); -ap_status_t ap_put_os_time(ap_context_t *, ap_time_t **, ap_os_time_t *); -ap_status_t ap_put_os_threadkey(ap_context_t *, ap_key_t **, ap_os_threadkey_t *); +ap_status_t ap_put_os_file(ap_file_t **, ap_os_file_t *, ap_context_t *); +ap_status_t ap_put_os_dir(ap_dir_t **, ap_os_dir_t *, ap_context_t *); +ap_status_t ap_put_os_sock(ap_socket_t **, ap_os_sock_t *, ap_context_t *); +ap_status_t ap_put_os_lock(ap_lock_t **, ap_os_lock_t *, ap_context_t *); +ap_status_t ap_put_os_thread(ap_thread_t **, ap_os_thread_t *, ap_context_t *); +ap_status_t ap_put_os_proc(ap_proc_t **, ap_os_proc_t *, ap_context_t *); +ap_status_t ap_put_os_time(ap_time_t **, ap_os_time_t *, ap_context_t *); +ap_status_t ap_put_os_threadkey(ap_key_t **, ap_os_threadkey_t *, ap_context_t *); #ifdef __cplusplus } diff --git a/include/apr_shmem.h b/include/apr_shmem.h index 226df17a9..d207c3dff 100644 --- a/include/apr_shmem.h +++ b/include/apr_shmem.h @@ -65,17 +65,17 @@ extern "C" { typedef struct shmem_t ap_shmem_t -ap_status_t ap_shm_create(ap_context_t *, ap_size_t, const char *, ap_shmem_t **); +ap_status_t ap_shm_create(ap_shmem_t **, ap_context_t *, ap_size_t, const char *); ap_status_t ap_shm_destroy(ap_shmem_t *); -ap_status_t ap_shm_malloc(ap_shmem_t *, ap_size_t, void **); -ap_status_t ap_shm_calloc(ap_shmem_t *, ap_size_t, ap_size_t, void **); -ap_status_t ap_shm_realloc(ap_shmem_t *, ap_size_t, void **); +ap_status_t ap_shm_malloc(void **, ap_shmem_t *, ap_size_t); +ap_status_t ap_shm_calloc(void **, ap_shmem_t *, ap_size_t, ap_size_t); +ap_status_t ap_shm_realloc(void **, ap_shmem_t *, ap_size_t); ap_status_t ap_shm_free(ap_shmem_t *, void *); -ap_status_t ap_shm_strdup(ap_shmem_t *, const char *, char **); +ap_status_t ap_shm_strdup(char **, ap_shmem_t *, const char *); ap_status_t ap_shm_sizeof(ap_shmem_t *, void *, ap_size_t *); ap_status_t ap_shm_maxsize(ap_size_t *); ap_status_t ap_shm_available(ap_shmem_t *, ap_size_t *); -ap_status_t ap_shm_child_create(ap_context_t *, const char *, ap_shmem_t**); +ap_status_t ap_shm_child_create(ap_shmem_t**, ap_context_t *, const char *); #ifdef __cplusplus } diff --git a/include/apr_thread_proc.h b/include/apr_thread_proc.h index b4f4819cf..67a27eb26 100644 --- a/include/apr_thread_proc.h +++ b/include/apr_thread_proc.h @@ -83,7 +83,7 @@ typedef struct threadkey_t ap_key_t; typedef void *(API_THREAD_FUNC *ap_thread_start_t)(void *); /* Thread Function definitions */ -ap_status_t ap_create_threadattr(ap_context_t *, ap_threadattr_t **); +ap_status_t ap_create_threadattr(ap_threadattr_t **, ap_context_t *); ap_status_t ap_setthreadattr_detach(ap_threadattr_t *, ap_int32_t); ap_status_t ap_getthreadattr_detach(ap_threadattr_t *); ap_status_t ap_create_thread(ap_context_t *, ap_threadattr_t *, @@ -101,7 +101,7 @@ ap_status_t ap_set_threaddata(ap_thread_t *, void *, char *, ap_status_t ap_create_thread_private(ap_context_t *, void (*dest)(void *), ap_key_t **); -ap_status_t ap_get_thread_private(ap_key_t *, void **); +ap_status_t ap_get_thread_private(void **, ap_key_t *); ap_status_t ap_set_thread_private(ap_key_t *, void *); ap_status_t ap_delete_thread_private(ap_key_t *); ap_status_t ap_get_threadkeydata(ap_key_t *, char *, void *); @@ -109,7 +109,7 @@ ap_status_t ap_set_threadkeydata(ap_key_t *, void *, char *, ap_status_t (*cleanup) (void *)); /* Process Function definitions */ -ap_status_t ap_createprocattr_init(ap_context_t *, ap_procattr_t **); +ap_status_t ap_createprocattr_init(ap_procattr_t **, ap_context_t *); ap_status_t ap_setprocattr_io(ap_procattr_t *, ap_int32_t, ap_int32_t, ap_int32_t); ap_status_t ap_setprocattr_dir(ap_procattr_t *, char *); @@ -119,11 +119,11 @@ ap_status_t ap_get_procdata(ap_proc_t *, char *, void *); ap_status_t ap_set_procdata(ap_proc_t *, void *, char *, ap_status_t (*cleanup) (void *)); -ap_status_t ap_get_childin(ap_proc_t *, ap_file_t **); -ap_status_t ap_get_childout(ap_proc_t *, ap_file_t **); -ap_status_t ap_get_childerr(ap_proc_t *, ap_file_t **); +ap_status_t ap_get_childin(ap_file_t **, ap_proc_t *); +ap_status_t ap_get_childout(ap_file_t **, ap_proc_t *); +ap_status_t ap_get_childerr(ap_file_t **, ap_proc_t *); -ap_status_t ap_fork(ap_context_t *, ap_proc_t **); +ap_status_t ap_fork(ap_proc_t **, ap_context_t *); ap_status_t ap_create_process(ap_context_t *, char *, char *const [], char **, ap_procattr_t *, ap_proc_t **); ap_status_t ap_wait_proc(ap_proc_t *, ap_wait_how_e); diff --git a/include/apr_time.h b/include/apr_time.h index f16346883..b49d78d43 100644 --- a/include/apr_time.h +++ b/include/apr_time.h @@ -68,7 +68,7 @@ typedef enum {APR_LOCALTIME, APR_UTCTIME} ap_timetype_e; typedef struct atime_t ap_time_t; /* Function Definitions */ -ap_status_t ap_make_time(ap_context_t *, ap_time_t **); +ap_status_t ap_make_time(ap_time_t **, ap_context_t *); ap_status_t ap_current_time(ap_time_t *); ap_status_t ap_explode_time(ap_time_t *, ap_timetype_e); ap_status_t ap_implode_time(ap_time_t *); diff --git a/include/arch/unix/fileio.h b/include/arch/unix/fileio.h index 1800205fb..beb1a9f6e 100644 --- a/include/arch/unix/fileio.h +++ b/include/arch/unix/fileio.h @@ -65,6 +65,9 @@ #include "apr_general.h" #include "apr_file_io.h" #include "apr_errno.h" +#ifdef BEOS +#include <kernel/OS.h> +#endif struct file_t { ap_context_t *cntxt; diff --git a/include/arch/unix/locks.h b/include/arch/unix/locks.h index 916520cf1..6f81df864 100644 --- a/include/arch/unix/locks.h +++ b/include/arch/unix/locks.h @@ -121,8 +121,8 @@ ap_status_t lock_inter(struct lock_t *lock); ap_status_t unlock_inter(struct lock_t *lock); ap_status_t destroy_inter_lock(struct lock_t *lock); -ap_status_t child_init_lock(ap_context_t *cont, char *fname, - struct lock_t **lock); +ap_status_t child_init_lock(struct lock_t **lock, ap_context_t *cont, + char *fname); #endif /* LOCKS_H */ diff --git a/include/arch/unix/threadproc.h b/include/arch/unix/threadproc.h index 81c9f67a1..8db9c9567 100644 --- a/include/arch/unix/threadproc.h +++ b/include/arch/unix/threadproc.h @@ -99,7 +99,7 @@ struct proc_t { /*This will move to ap_threadproc.h in time, but I need to figure it out * on windows first. :) */ -ap_status_t ap_detach(ap_context_t *, struct proc_t **); +ap_status_t ap_detach(struct proc_t **, ap_context_t *); #endif /* ! THREAD_PROC_H */ diff --git a/locks/beos/locks.c b/locks/beos/locks.c index ca50665e1..3deda906e 100644 --- a/locks/beos/locks.c +++ b/locks/beos/locks.c @@ -59,7 +59,7 @@ #include <strings.h> #include <stdio.h> -ap_status_t ap_create_lock(ap_context_t *cont, ap_locktype_e type, char *fname, struct lock_t **lock) +ap_status_t ap_create_lock(struct lock_t **lock, ap_context_t *cont, ap_locktype_e type, char *fname) { struct lock_t *new; ap_status_t stat; diff --git a/locks/os2/locks.c b/locks/os2/locks.c index 300b557a2..a2e46eed3 100644 --- a/locks/os2/locks.c +++ b/locks/os2/locks.c @@ -70,7 +70,7 @@ ap_status_t lock_cleanup(void *thelock) -ap_status_t ap_create_lock(ap_context_t *cont, ap_locktype_e type, char *fname, struct lock_t **lock) +ap_status_t ap_create_lock(struct lock_t **lock, ap_context_t *cont, ap_locktype_e type, char *fname) { struct lock_t *new; ULONG rc; diff --git a/locks/unix/crossproc.c b/locks/unix/crossproc.c index ad88be3a1..daa23c9e8 100644 --- a/locks/unix/crossproc.c +++ b/locks/unix/crossproc.c @@ -129,7 +129,7 @@ ap_status_t destroy_inter_lock(struct lock_t *lock) return stat; } -ap_status_t child_init_lock(ap_context_t *cont, char *fname, struct lock_t **lock) +ap_status_t child_init_lock(struct lock_t **lock, ap_context_t *cont, char *fname) { return APR_SUCCESS; } @@ -223,7 +223,7 @@ ap_status_t destroy_inter_lock(struct lock_t *lock) return stat; } -ap_status_t child_init_lock(ap_context_t *cont, char *fname, struct lock_t **lock) +ap_status_t child_init_lock(struct lock_t **lock, ap_context_t *cont, char *fname) { return APR_SUCCESS; } @@ -297,7 +297,7 @@ ap_status_t destroy_inter_lock(struct lock_t *lock) return stat; } -ap_status_t child_init_lock(ap_context_t *cont, char *fname, struct lock_t **lock) +ap_status_t child_init_lock(struct lock_t **lock, ap_context_t *cont, char *fname) { return APR_SUCCESS; } @@ -356,7 +356,7 @@ ap_status_t destroy_inter_lock(struct lock_t *lock) return stat; } -ap_status_t child_init_lock(ap_context_t *cont, char *fname, struct lock_t **lock) +ap_status_t child_init_lock(struct lock_t **lock, ap_context_t *cont, char *fname) { struct lock_t *new; diff --git a/locks/unix/locks.c b/locks/unix/locks.c index f0241eb39..dbec87aae 100644 --- a/locks/unix/locks.c +++ b/locks/unix/locks.c @@ -170,7 +170,7 @@ ap_status_t ap_destroy_lock(struct lock_t *lock) } /* ***APRDOC******************************************************** - * ap_status_t ap_child_init_lock(ap_context_t *, char *, ap_lock_t **) + * ap_status_t ap_child_init_lock(ap_lock_t **, ap_context_t *, char *) * Re-open a lock in a child process. * arg 1) The context to operate on. * arg 2) A file name to use if the lock mechanism requires one. This @@ -183,11 +183,11 @@ ap_status_t ap_destroy_lock(struct lock_t *lock) * idea to call it regardless, because it makes the code more * portable. */ -ap_status_t ap_child_init_lock(ap_context_t *cont, char *fname, struct lock_t **lock) +ap_status_t ap_child_init_lock(struct lock_t **lock, ap_context_t *cont, char *fname) { ap_status_t stat; if ((*lock)->type != APR_CROSS_PROCESS) { - if ((stat = child_init_lock(cont, fname, lock)) != APR_SUCCESS) { + if ((stat = child_init_lock(lock, cont, fname)) != APR_SUCCESS) { return stat; } } @@ -204,7 +204,7 @@ ap_status_t ap_child_init_lock(ap_context_t *cont, char *fname, struct lock_t ** ap_status_t ap_get_lockdata(struct lock_t *lock, char *key, void *data) { if (lock != NULL) { - return ap_get_userdata(lock->cntxt, key, &data); + return ap_get_userdata(&data, lock->cntxt, key); } else { data = NULL; @@ -260,14 +260,14 @@ ap_status_t ap_get_os_lock(struct lock_t *lock, ap_os_lock_t *oslock) } /* ***APRDOC******************************************************** - * ap_status_t ap_put_os_lock(ap_context_t *, ap_lock_t **, ap_os_lock_t *) + * ap_status_t ap_put_os_lock(ap_lock_t **, ap_os_lock_t *, ap_context_t *) * onvert the lock from os specific type to apr type * arg 1) The context to use if it is needed. * arg 2) The apr lock we are converting to. * arg 3) The os specific lock to convert. */ -ap_status_t ap_put_os_lock(ap_context_t *cont, struct lock_t **lock, - ap_os_lock_t *thelock) +ap_status_t ap_put_os_lock(struct lock_t **lock, ap_os_lock_t *thelock, + ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; diff --git a/locks/unix/locks.h b/locks/unix/locks.h index 916520cf1..6f81df864 100644 --- a/locks/unix/locks.h +++ b/locks/unix/locks.h @@ -121,8 +121,8 @@ ap_status_t lock_inter(struct lock_t *lock); ap_status_t unlock_inter(struct lock_t *lock); ap_status_t destroy_inter_lock(struct lock_t *lock); -ap_status_t child_init_lock(ap_context_t *cont, char *fname, - struct lock_t **lock); +ap_status_t child_init_lock(struct lock_t **lock, ap_context_t *cont, + char *fname); #endif /* LOCKS_H */ diff --git a/locks/win32/locks.c b/locks/win32/locks.c index fbe78e9f1..1ec23521f 100644 --- a/locks/win32/locks.c +++ b/locks/win32/locks.c @@ -85,7 +85,7 @@ ap_status_t ap_create_lock(ap_context_t *cont, ap_locktype_e type, return APR_SUCCESS; } -ap_status_t ap_child_init_lock(ap_context_t *cont, char *fname, struct lock_t **lock) +ap_status_t ap_child_init_lock(struct lock_t **lock, ap_context_t *cont, char *fname) { (*lock) = (struct lock_t *)ap_palloc(cont, sizeof(struct lock_t)); diff --git a/misc/beos/start.c b/misc/beos/start.c index 8b036eefd..8dcecf083 100644 --- a/misc/beos/start.c +++ b/misc/beos/start.c @@ -63,7 +63,7 @@ #include <errno.h> #include <string.h> -ap_status_t ap_create_context(ap_context_t *cont, void *data, ap_context_t **newcont) +ap_status_t ap_create_context(ap_context_t **newcont, ap_context_t *cont, void *data) { ap_context_t *new; ap_pool_t *pool; @@ -113,7 +113,7 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data) return APR_ENOCONT; } -ap_status_t ap_get_userdata(struct context_t *cont, void **data) +ap_status_t ap_get_userdata(void **data, struct context_t *cont) { if (cont) { (*data) = cont->prog_data; diff --git a/misc/os2/start.c b/misc/os2/start.c index 00ad1f9a5..ad980bcaa 100644 --- a/misc/os2/start.c +++ b/misc/os2/start.c @@ -60,7 +60,7 @@ #include <errno.h> #include <string.h> -ap_status_t ap_create_context(struct context_t *cont, void *data, ap_context_t **newcont) +ap_status_t ap_create_context(ap_context_t **newcont, struct context_t *cont, void *data) { struct context_t *new; ap_pool_t *pool; @@ -117,12 +117,12 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data) } /* ***APRDOC******************************************************** - * ap_status_t ap_get_userdata(ap_context_t *, void **) + * ap_status_t ap_get_userdata(void **, ap_context_t *) * Return the data associated with the current context. * arg 1) The current context. * arg 2) The user data associated with the context. */ -ap_status_t ap_get_userdata(struct context_t *cont, void **data) +ap_status_t ap_get_userdata(void **data, struct context_t *cont) { if (cont) { (*data) = cont->prog_data; diff --git a/misc/unix/start.c b/misc/unix/start.c index f431823f2..21f9143b4 100644 --- a/misc/unix/start.c +++ b/misc/unix/start.c @@ -66,7 +66,7 @@ #endif /* ***APRDOC******************************************************** - * ap_status_t ap_create_context(ap_context_t *, ap_context_t **) + * ap_status_t ap_create_context(ap_context_t **, ap_context_t *) * Create a new context. * arg 1) The parent context. If this is NULL, the new context is a root * context. If it is non-NULL, the new context will inherit all @@ -74,7 +74,7 @@ * sub-pool. * arg 2) The context we have just created. */ -ap_status_t ap_create_context(struct context_t *cont, struct context_t **newcont) +ap_status_t ap_create_context(struct context_t **newcont, struct context_t *cont) { struct context_t *new; ap_pool_t *pool; @@ -164,13 +164,13 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key, } /* ***APRDOC******************************************************** - * ap_status_t ap_get_userdata(ap_context_t *, void **) + * ap_status_t ap_get_userdata(void **, ap_context_t *) * Return the data associated with the current context. * arg 1) The current context. * arg 2) The key for the data to retrieve * arg 3) The user data associated with the context. */ -ap_status_t ap_get_userdata(struct context_t *cont, char *key, void **data) +ap_status_t ap_get_userdata(void **data, struct context_t *cont, char *key) { datastruct *dptr = NULL; if (cont) { diff --git a/misc/win32/start.c b/misc/win32/start.c index 4a6a44a3d..d12adc0bb 100644 --- a/misc/win32/start.c +++ b/misc/win32/start.c @@ -69,7 +69,7 @@ ap_status_t clean_cont(void *data) } -ap_status_t ap_create_context(ap_context_t *cont, ap_context_t **newcont) +ap_status_t ap_create_context(ap_context_t **newcont, ap_context_t *cont) { int iVersionRequested; WSADATA wsaData; @@ -177,7 +177,7 @@ ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key, return APR_ENOCONT; } -ap_status_t ap_get_userdata(struct context_t *cont, char *key, void **data) +ap_status_t ap_get_userdata(void **data, struct context_t *cont, char *key) { datastruct *dptr = NULL; if (cont) { diff --git a/network_io/beos/sockets.c b/network_io/beos/sockets.c index e5ae3c298..80f0ab6ea 100644 --- a/network_io/beos/sockets.c +++ b/network_io/beos/sockets.c @@ -74,7 +74,7 @@ ap_status_t socket_cleanup(void *sock) } } -ap_status_t ap_create_tcp_socket(ap_context_t *cont, struct socket_t **new) +ap_status_t ap_create_tcp_socket(struct socket_t **new, ap_context_t *cont) { (*new) = (struct socket_t *)ap_palloc(cont,sizeof(struct socket_t)); @@ -169,7 +169,7 @@ ap_status_t ap_listen(struct socket_t *sock, ap_int32_t backlog) return APR_SUCCESS; } -ap_status_t ap_accept(const struct socket_t *sock, struct socket_t **new) +ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock) { struct hostent *hptr; diff --git a/network_io/beos/sockopt.c b/network_io/beos/sockopt.c index 35248fc65..069e6d105 100644 --- a/network_io/beos/sockopt.c +++ b/network_io/beos/sockopt.c @@ -100,7 +100,7 @@ ap_status_t ap_gethostname(ap_context_t *cont, char * buf, int len) } } -ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name) +ap_status_t ap_get_remote_hostname(char **name, struct socket_t *sock) { (*name) = (char*)ap_pstrdup(sock->cntxt, sock->remote_hostname); if (*name) { diff --git a/network_io/os2/poll.c b/network_io/os2/poll.c index b356ce4bc..063ff3066 100644 --- a/network_io/os2/poll.c +++ b/network_io/os2/poll.c @@ -62,7 +62,7 @@ /* OS/2 doesn't have a poll function, implement using select */ -ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct pollfd_t **new) +ap_status_t ap_setup_poll(struct pollfd_t **new, ap_context_t *cont, ap_int32_t num) { (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * num); diff --git a/network_io/os2/sockets.c b/network_io/os2/sockets.c index f0500b9c1..da078f36c 100644 --- a/network_io/os2/sockets.c +++ b/network_io/os2/sockets.c @@ -76,7 +76,7 @@ ap_status_t socket_cleanup(void *sock) } } -ap_status_t ap_create_tcp_socket(ap_context_t *cont, struct socket_t **new) +ap_status_t ap_create_tcp_socket(struct socket_t **new, ap_context_t *cont) { (*new) = (struct socket_t *)ap_palloc(cont, sizeof(struct socket_t)); @@ -145,7 +145,7 @@ ap_status_t ap_listen(struct socket_t *sock, ap_int32_t backlog) return APR_SUCCESS; } -ap_status_t ap_accept(const struct socket_t *sock, struct socket_t **new) +ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock) { struct hostent *hptr; diff --git a/network_io/os2/sockopt.c b/network_io/os2/sockopt.c index ef00169e4..c9e57036c 100644 --- a/network_io/os2/sockopt.c +++ b/network_io/os2/sockopt.c @@ -162,7 +162,7 @@ ap_status_t ap_gethostname(ap_context_t *cont, char *buf, int len) return APR_SUCCESS; } -ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name) +ap_status_t ap_get_remote_hostname(char **name, struct socket_t *sock) { (*name) = ap_pstrdup(sock->cntxt, sock->remote_hostname); if (*name) { diff --git a/network_io/unix/poll.c b/network_io/unix/poll.c index 9d4332bbf..942f40eae 100644 --- a/network_io/unix/poll.c +++ b/network_io/unix/poll.c @@ -67,13 +67,13 @@ #ifdef HAVE_POLL /* We can just use poll to do our socket polling. */ /* ***APRDOC******************************************************** - * ap_status_t ap_setup_poll(ap_context_t *, ap_int32_t, ap_pollfd_t **) + * ap_status_t ap_setup_poll(ap_pollfd_t **, ap_context_t *, ap_int32_t) * Setup the memory required for poll to operate properly. * arg 1) The context to operate on. * arg 2) The number of socket descriptors to be polled. * arg 3) The poll structure to be used. */ -ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct pollfd_t **new) +ap_status_t ap_setup_poll(struct pollfd_t **new, ap_context_t *cont, ap_int32_t num) { (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t)); (*new)->sock = ap_palloc(cont, sizeof(struct socket_t) * num); @@ -437,7 +437,7 @@ ap_status_t ap_clear_poll_sockets(struct pollfd_t *aprset, ap_int16_t event) ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data) { if (pollfd != NULL) { - return ap_get_userdata(pollfd->cntxt, key, &data); + return ap_get_userdata(&data, pollfd->cntxt, key); } else { data = NULL; diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c index a7cac39f9..22aca4548 100644 --- a/network_io/unix/sockets.c +++ b/network_io/unix/sockets.c @@ -79,12 +79,12 @@ static ap_status_t socket_cleanup(void *sock) } /* ***APRDOC******************************************************** - * ap_status_t ap_create_tcp_socket(ap_context_t *, ap_socket_t **) + * ap_status_t ap_create_tcp_socket(ap_socket_t **, ap_context_t *) * Create a socket for tcp communication. * arg 1) The context to use * arg 2) The new socket that has been setup. */ -ap_status_t ap_create_tcp_socket(ap_context_t *cont, struct socket_t **new) +ap_status_t ap_create_tcp_socket(struct socket_t **new, ap_context_t *cont) { (*new) = (struct socket_t *)ap_palloc(cont, sizeof(struct socket_t)); @@ -243,14 +243,14 @@ ap_status_t ap_listen(struct socket_t *sock, ap_int32_t backlog) } /* ***APRDOC******************************************************** - * ap_status_t ap_accept(ap_socket_t *, ap_socket_t **) + * ap_status_t ap_accept(ap_socket_t **, ap_socket_t *) * Accept a new connection request * arg 1) The socket we are listening on * arg 2) A copy of the socket that is connected to the socket that * made the connection request. This is the socket which should * be used for all future communication. */ -ap_status_t ap_accept(const struct socket_t *sock, struct socket_t **new) +ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock) { struct hostent *hptr; @@ -329,8 +329,8 @@ ap_status_t ap_connect(struct socket_t *sock, char *hostname) */ ap_status_t ap_get_socketdata(struct socket_t *sock, char *key, void *data) { - if (sock != NULL) { - return ap_get_userdata(sock->cntxt, key, &data); + if (socket != NULL) { + return ap_get_userdata(&data, sock->cntxt, key); } else { data = NULL; @@ -373,14 +373,14 @@ ap_status_t ap_get_os_sock(struct socket_t *sock, ap_os_sock_t *thesock) } /* ***APRDOC******************************************************** - * ap_status_t ap_put_os_sock(ap_context_t *, ap_socket_t **, ap_os_socket_t *) + * ap_status_t ap_put_os_sock(ap_socket_t **, ap_os_socket_t *, ap_context_t *) * Convert a socket from the os specific type to the apr type * arg 1) The context to use. * arg 2) The socket to convert to. * arg 3) The socket we are converting to an apr type. */ -ap_status_t ap_put_os_sock(ap_context_t *cont, struct socket_t **sock, - ap_os_sock_t *thesock) +ap_status_t ap_put_os_sock(struct socket_t **sock, ap_os_sock_t *thesock, + ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c index 294000f7d..cb03e3ba6 100644 --- a/network_io/unix/sockopt.c +++ b/network_io/unix/sockopt.c @@ -199,7 +199,7 @@ ap_status_t ap_gethostname(ap_context_t *cont, char *buf, ap_int32_t len) * arg 1) The socket to examine. * arg 2) A buffer to store the hostname in. */ -ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name) +ap_status_t ap_get_remote_hostname(char **name, struct socket_t *sock) { (*name) = ap_pstrdup(sock->cntxt, sock->remote_hostname); if (*name) { diff --git a/network_io/win32/poll.c b/network_io/win32/poll.c index 04d07fcfd..4e2909180 100644 --- a/network_io/win32/poll.c +++ b/network_io/win32/poll.c @@ -62,7 +62,7 @@ #include <time.h> -ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct pollfd_t **new) +ap_status_t ap_setup_poll(struct pollfd_t **new, ap_context_t *cont, ap_int32_t num) { (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * num); if ((*new) == NULL) { diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c index 5f9cfcaf7..17c18283b 100644 --- a/network_io/win32/sockets.c +++ b/network_io/win32/sockets.c @@ -75,7 +75,7 @@ ap_status_t socket_cleanup(void *sock) } } -ap_status_t ap_create_tcp_socket(ap_context_t *cont, struct socket_t **new) +ap_status_t ap_create_tcp_socket(struct socket_t **new, ap_context_t *cont) { (*new) = (struct socket_t *)ap_palloc(cont, sizeof(struct socket_t)); @@ -187,7 +187,7 @@ ap_status_t ap_listen(struct socket_t *sock, ap_int32_t backlog) return APR_SUCCESS; } -ap_status_t ap_accept(const struct socket_t *sock, struct socket_t **new) +ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock) { struct hostent *hptr; diff --git a/network_io/win32/sockopt.c b/network_io/win32/sockopt.c index 316aaaa31..28da9bd18 100644 --- a/network_io/win32/sockopt.c +++ b/network_io/win32/sockopt.c @@ -134,7 +134,7 @@ ap_status_t ap_gethostname(ap_context_t *cont, char *buf, int len) return APR_SUCCESS; } -ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name) +ap_status_t ap_get_remote_hostname(char **name, struct socket_t *sock) { (*name) = ap_pstrdup(sock->cntxt, sock->remote_hostname); if (*name) { diff --git a/shmem/shmem.c b/shmem/shmem.c index 735256e7c..41f56b84c 100644 --- a/shmem/shmem.c +++ b/shmem/shmem.c @@ -58,7 +58,7 @@ struct shmem_t { ap_context_t *cntxt; } -ap_status_t ap_shm_create(ap_context_t *cont, ap_size_t size, const char *file, struct shmem_t **new) +ap_status_t ap_shm_create(struct shmem_t **new, ap_context_t *cont, ap_size_t size, const char *file) { MM *mm = mm_create(size, file); @@ -81,7 +81,7 @@ ap_status_t ap_shm_destroy(struct shmem_t *shared) return APR_SUCCESS; } -ap_status_t ap_shm_malloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_malloc(void **entity, struct shmem_t *shared, ap_size_t size) { entity = mm_malloc(shared->mm, size); if (entity == NULL) { @@ -90,7 +90,7 @@ ap_status_t ap_shm_malloc(struct shmem_t *shared, ap_size_t size, void **entity) return APR_SUCCESS; } -ap_status_t ap_shm_calloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_calloc(void **entity, struct shmem_t *shared, ap_size_t size) { entity = mm_calloc(shared->mm, size); if (entity == NULL) { @@ -99,7 +99,7 @@ ap_status_t ap_shm_calloc(struct shmem_t *shared, ap_size_t size, void **entity) return APR_SUCCESS; } -ap_status_t ap_shm_realloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_realloc(void **entity, struct shmem_t *shared, ap_size_t size) { void *new; @@ -118,7 +118,7 @@ ap_status_t ap_shm_free(struct shmem_t *shared, void *entity) return APR_SUCCESS; } -ap_status_t ap_shm_strdup(struct shmem_t *shared, const char *old, char **new) +ap_status_t ap_shm_strdup(char **new, struct shmem_t *shared, const char *old) { (*new) = mm_strdup(shared->mm, old); if ((*new) == NULL) { diff --git a/shmem/unix/shmem.c b/shmem/unix/shmem.c index 848e4fece..1263c0cee 100644 --- a/shmem/unix/shmem.c +++ b/shmem/unix/shmem.c @@ -86,7 +86,7 @@ ap_status_t ap_shm_destroy(struct shmem_t *shared) return APR_SUCCESS; } -ap_status_t ap_shm_malloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_malloc(void **entity, struct shmem_t *shared, ap_size_t size) { entity = mm_malloc(shared->mm, size); if (entity == NULL) { @@ -105,7 +105,7 @@ ap_status_t ap_shm_calloc(struct shmem_t *shared, ap_size_t num, return APR_SUCCESS; } -ap_status_t ap_shm_realloc(struct shmem_t *shared, ap_size_t size, void **entity) +ap_status_t ap_shm_realloc(void **entity, struct shmem_t *shared, ap_size_t size) { void *new; @@ -124,7 +124,7 @@ ap_status_t ap_shm_free(struct shmem_t *shared, void *entity) return APR_SUCCESS; } -ap_status_t ap_shm_strdup(struct shmem_t *shared, const char *old, char **new) +ap_status_t ap_shm_strdup(char **new, struct shmem_t *shared, const char *old) { (*new) = mm_strdup(shared->mm, old); if ((*new) == NULL) { diff --git a/test/Makefile.in b/test/Makefile.in index 0606b167a..25eb6ec39 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -106,11 +106,10 @@ client.o: client.c $(INCDIR)/apr_network_io.h \ $(INCDIR)/apr_errno.h htdigest.o: htdigest.c $(INCDIR)/apr_lib.h $(INCDIR)/apr_general.h \ $(INCDIR)/apr_config.h $(INCDIR)/apr_errno.h \ - $(INCDIR)/apr_file_io.h $(INCDIR)/hsregex.h $(INCDIR)/apr_md5.h + $(INCDIR)/apr_file_io.h $(INCDIR)/apr_md5.h htpasswd.o: htpasswd.c $(INCDIR)/apr_signal.h \ $(INCDIR)/apr_general.h $(INCDIR)/apr_config.h \ - $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h $(INCDIR)/apr_file_io.h \ - $(INCDIR)/hsregex.h + $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h $(INCDIR)/apr_file_io.h logresolve.o: logresolve.c $(INCDIR)/apr_config.h rotatelogs.o: rotatelogs.c $(INCDIR)/apr_config.h server.o: server.c $(INCDIR)/apr_network_io.h \ @@ -119,22 +118,22 @@ server.o: server.c $(INCDIR)/apr_network_io.h \ suexec.o: suexec.c $(INCDIR)/apr_config.h suexec.h testargs.o: testargs.c $(INCDIR)/apr_file_io.h \ $(INCDIR)/apr_general.h $(INCDIR)/apr_config.h \ - $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h $(INCDIR)/hsregex.h + $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h testfile.o: testfile.c $(INCDIR)/apr_file_io.h \ $(INCDIR)/apr_general.h $(INCDIR)/apr_config.h \ - $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h $(INCDIR)/hsregex.h + $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h testproc.o: testproc.c $(INCDIR)/apr_thread_proc.h \ $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \ $(INCDIR)/apr_config.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_win.h \ - $(INCDIR)/apr_lib.h $(INCDIR)/hsregex.h + $(INCDIR)/apr_lib.h testsig.o: testsig.c $(INCDIR)/apr_thread_proc.h \ $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \ $(INCDIR)/apr_config.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_win.h \ - $(INCDIR)/apr_lib.h $(INCDIR)/hsregex.h + $(INCDIR)/apr_lib.h testsock.o: testsock.c $(INCDIR)/apr_thread_proc.h \ $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \ $(INCDIR)/apr_config.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_win.h \ - $(INCDIR)/apr_lib.h $(INCDIR)/hsregex.h + $(INCDIR)/apr_lib.h testthread.o: testthread.c $(INCDIR)/apr_thread_proc.h \ $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \ $(INCDIR)/apr_config.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_win.h \ diff --git a/test/ab_apr.c b/test/ab_apr.c index 8ae41bf05..ced7375d6 100644 --- a/test/ab_apr.c +++ b/test/ab_apr.c @@ -443,7 +443,7 @@ static void start_connect(struct connection *c) c->cbx = 0; c->gotheader = 0; - if (ap_create_tcp_socket(cntxt, &c->aprsock) != APR_SUCCESS) { + if (ap_create_tcp_socket(&c->aprsock, cntxt) != APR_SUCCESS) { err("Socket:"); } if (ap_setport(c->aprsock, port) != APR_SUCCESS) { @@ -677,18 +677,18 @@ static void test(void) fflush(stdout); } - ap_make_time(cntxt, &now); + ap_make_time(&now, cntxt); con = (struct connection *)malloc(concurrency * sizeof(struct connection)); memset(con, 0, concurrency * sizeof(struct connection)); stats = (struct data *)malloc(requests * sizeof(struct data)); - ap_setup_poll(cntxt, concurrency, &readbits); + ap_setup_poll(&readbits, cntxt, concurrency); for (i = 0; i < concurrency; i++) { - ap_make_time(cntxt, &con[i].start); - ap_make_time(cntxt, &con[i].connect); - ap_make_time(cntxt, &con[i].done); + ap_make_time(&con[i].start, cntxt); + ap_make_time(&con[i].connect, cntxt); + ap_make_time(&con[i].done, cntxt); } /* setup request */ @@ -859,7 +859,7 @@ static int open_postfile(char *pfile) ap_fileperms_t mode; ap_ssize_t length; - if (ap_open(cntxt, pfile, APR_READ, mode, &postfd) != APR_SUCCESS) { + if (ap_open(&postfd, cntxt, pfile, APR_READ, mode) != APR_SUCCESS) { printf("Invalid postfile name (%s)\n", pfile); return errno; } @@ -893,10 +893,10 @@ int main(int argc, char **argv) trstring = ""; tdstring = "bgcolor=white"; - ap_create_context(NULL, &cntxt); + ap_create_context(&cntxt, NULL); - ap_make_time(cntxt, &start); - ap_make_time(cntxt, &endtime); + ap_make_time(&start, cntxt); + ap_make_time(&endtime, cntxt); optind = 1; while (ap_getopt(cntxt, argc, argv, "n:c:t:T:p:v:kVhwx:y:z:", &c) == APR_SUCCESS) { diff --git a/test/abc.c b/test/abc.c index 6f7813acf..cba458c43 100644 --- a/test/abc.c +++ b/test/abc.c @@ -11,9 +11,9 @@ int main(int argc, char *argv[]) int status = 0; ap_context_t *context; - ap_create_context(NULL, &context); + ap_create_context(&context, NULL); - ap_open(context, argv[1], APR_READ, -1, &fd); + ap_open(&fd, context, argv[1], APR_READ, -1); while (!status) { status = ap_getc(fd, &ch); diff --git a/test/client.c b/test/client.c index 3dfdf9c4b..dc5127b71 100644 --- a/test/client.c +++ b/test/client.c @@ -70,14 +70,14 @@ int main(int argc, char *argv[]) char datarecv[STRLEN]; fprintf(stdout, "Creating context......."); - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "Something went wrong\n"); exit(-1); } fprintf(stdout, "OK\n"); fprintf(stdout, "\tClient: Creating new socket......."); - if (ap_create_tcp_socket(context, &sock) != APR_SUCCESS) { + if (ap_create_tcp_socket(&sock, context) != APR_SUCCESS) { fprintf(stderr, "Couldn't create socket\n"); exit(-1); } diff --git a/test/htdigest.c b/test/htdigest.c index 5ad809dc8..3c5015b31 100644 --- a/test/htdigest.c +++ b/test/htdigest.c @@ -208,14 +208,14 @@ int main(int argc, char *argv[]) char command[MAX_STRING_LEN]; int found; - ap_create_context(NULL, &cntxt); + ap_create_context(&cntxt, NULL); tn = NULL; signal(SIGINT, (void (*)(int)) interrupted); if (argc == 5) { if (strcmp(argv[1], "-c")) usage(); - if (ap_open(cntxt, argv[2], APR_WRITE | APR_CREATE, -1, &tfp) != APR_SUCCESS) { + if (ap_open(&tfp, cntxt, argv[2], APR_WRITE | APR_CREATE, -1) != APR_SUCCESS) { fprintf(stderr, "Could not open passwd file %s for writing.\n", argv[2]); perror("ap_open"); @@ -230,12 +230,12 @@ int main(int argc, char *argv[]) usage(); tn = tmpnam(NULL); - if (ap_open(cntxt, tn, APR_WRITE | APR_CREATE, -1, &tfp)!= APR_SUCCESS) { + if (ap_open(&tfp, cntxt, tn, APR_WRITE | APR_CREATE, -1)!= APR_SUCCESS) { fprintf(stderr, "Could not open temp file.\n"); exit(1); } - if (ap_open(cntxt, argv[1], APR_READ, -1, &f) != APR_SUCCESS) { + if (ap_open(&f, cntxt, argv[1], APR_READ, -1) != APR_SUCCESS) { fprintf(stderr, "Could not open passwd file %s for reading.\n", argv[1]); fprintf(stderr, "Use -c option to create new one.\n"); diff --git a/test/server.c b/test/server.c index a285709b4..55826ea33 100644 --- a/test/server.c +++ b/test/server.c @@ -71,14 +71,14 @@ int main(int argc, char *argv[]) char datarecv[STRLEN] = "Recv data test"; fprintf(stdout, "Creating context......."); - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "Could not create a context\n"); exit(-1); } fprintf(stdout, "OK\n"); fprintf(stdout, "\tServer: Creating new socket......."); - if (ap_create_tcp_socket(context, &sock) != APR_SUCCESS) { + if (ap_create_tcp_socket(&sock, context) != APR_SUCCESS) { fprintf(stderr, "Couldn't create socket\n"); exit(-1); } @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "OK\n"); fprintf(stdout, "\tServer: Setting up socket for polling......."); - ap_setup_poll(context, 1, &sdset); + ap_setup_poll(&sdset, context, 1); ap_add_poll_socket(sdset, sock, APR_POLLIN); fprintf(stdout, "OK\n"); @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "OK\n"); fprintf(stdout, "\tServer: Accepting a connection......."); - if (ap_accept(sock, &sock2) != APR_SUCCESS) { + if (ap_accept(&sock2, sock) != APR_SUCCESS) { ap_close_socket(sock); fprintf(stderr, "Could not accept connection.\n"); exit(-1); diff --git a/test/testargs.c b/test/testargs.c index 1282885ff..a5ecaf5c6 100644 --- a/test/testargs.c +++ b/test/testargs.c @@ -69,7 +69,7 @@ int main(int argc, char * const argv[]) ap_context_t *context; ap_int32_t data; - ap_create_context(NULL, &context); + ap_create_context(&context, NULL); while (ap_getopt(context, argc, argv, "abc:d::", &data) == APR_SUCCESS) { switch(data) { diff --git a/test/testcontext.c b/test/testcontext.c index a5c74e037..c566a2448 100644 --- a/test/testcontext.c +++ b/test/testcontext.c @@ -72,7 +72,7 @@ int main() char *testdata; char *retdata; - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "Couldn't allocate context."); exit(-1); } @@ -81,7 +81,7 @@ int main() ap_set_userdata(context, testdata, "TEST", string_cleanup); - ap_get_userdata(context, "TEST", (void **)&retdata); + ap_get_userdata((void **)&retdata, context, "TEST"); if (!strcmp(testdata, retdata)) { fprintf(stdout, "User data is working ok\n"); diff --git a/test/testfile.c b/test/testfile.c index b7ac375dd..7d69e8649 100644 --- a/test/testfile.c +++ b/test/testfile.c @@ -77,11 +77,11 @@ int main() char *buf; char *str; char *filename = "test.fil"; - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "Couldn't allocate context."); exit(-1); } - if (ap_create_context(context, &cont2) != APR_SUCCESS) { + if (ap_create_context(&cont2, context) != APR_SUCCESS) { fprintf(stderr, "Couldn't allocate context."); exit(-1); } @@ -89,7 +89,7 @@ int main() fprintf(stdout, "Testing file functions.\n"); fprintf(stdout, "\tOpening file......."); - if (ap_open(context, filename, flag, APR_UREAD | APR_UWRITE | APR_GREAD, &thefile) != APR_SUCCESS) { + if (ap_open(&thefile, context, filename, flag, APR_UREAD | APR_UWRITE | APR_GREAD) != APR_SUCCESS) { perror("Didn't open file"); exit(-1); } @@ -102,7 +102,7 @@ int main() fprintf(stderr, "Bad file des\n"); exit(-1); } - ap_get_filename(thefile, &str); + ap_get_filename(&str, thefile); if (strcmp(str, filename) != 0) { fprintf(stderr, "wrong filename\n"); exit(-1); @@ -172,7 +172,7 @@ int main() } fprintf(stdout, "\tMaking sure it's gone......."); - status = ap_open(context, filename, APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD, &thefile); + status = ap_open(&thefile, context, filename, APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD); if (status == APR_SUCCESS) { fprintf(stderr, "I could open the file for some reason?\n"); exit(-1); @@ -193,7 +193,7 @@ int test_filedel(ap_context_t *context) ap_int32_t flag = APR_READ | APR_WRITE | APR_CREATE; ap_status_t stat; - stat = ap_open(context, "testdel", flag, APR_UREAD | APR_UWRITE | APR_GREAD, &thefile); + stat = ap_open(&thefile, context, "testdel", flag, APR_UREAD | APR_UWRITE | APR_GREAD); if (stat != APR_SUCCESS) { return stat; } @@ -206,7 +206,7 @@ int test_filedel(ap_context_t *context) return stat; } - stat = ap_open(context, "testdel", APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD, &thefile); + stat = ap_open(&thefile, context, "testdel", APR_READ, APR_UREAD | APR_UWRITE | APR_GREAD); if (stat == APR_SUCCESS) { return stat; } @@ -233,7 +233,7 @@ int testdirs(ap_context_t *context) fprintf(stdout, "OK\n"); } - if (ap_open(context, "testdir/testfile", APR_READ | APR_WRITE | APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE, &file) != APR_SUCCESS) {; + if (ap_open(&file, context, "testdir/testfile", APR_READ | APR_WRITE | APR_CREATE, APR_UREAD | APR_UWRITE | APR_UEXECUTE) != APR_SUCCESS) {; return -1; } @@ -242,7 +242,7 @@ int testdirs(ap_context_t *context) ap_close(file); fprintf(stdout, "\tOpening Directory......."); - if (ap_opendir(context, "testdir", &temp) != APR_SUCCESS) { + if (ap_opendir(&temp, context, "testdir") != APR_SUCCESS) { fprintf(stderr, "Could not open directory\n"); return -1; } @@ -269,7 +269,7 @@ int testdirs(ap_context_t *context) fprintf(stderr, "Error reading directory testdir"); return -1; } - ap_get_dir_filename(temp, &fname); + ap_get_dir_filename(&fname, temp); } while (fname[0] == '.'); if (strcmp(fname, "testfile")) { fprintf(stderr, "Got wrong file name %s\n", fname); diff --git a/test/testproc.c b/test/testproc.c index 7d867f764..b442106c8 100644 --- a/test/testproc.c +++ b/test/testproc.c @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) char *args[3]; char *teststr; - ap_create_context(NULL, &context); + ap_create_context(&context, NULL); teststr = ap_pstrdup(context, "Whooo Hoooo\0"); @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "OK\n"); fprintf(stdout, "Creating procattr......."); - if (ap_createprocattr_init(context, &attr) != APR_SUCCESS) { + if (ap_createprocattr_init(&attr, context) != APR_SUCCESS) { fprintf(stderr, "Could not create attr\n"); exit(-1);; } @@ -135,7 +135,7 @@ int main(int argc, char *argv[]) fprintf(stdout, "OK.\n"); fprintf(stdout, "Grabbing child's stdout......."); - if (ap_get_childout(newproc, &testfile) != APR_SUCCESS) { + if (ap_get_childout(&testfile, newproc) != APR_SUCCESS) { fprintf(stderr, "Could not get child's stdout\n"); exit(-1); } diff --git a/test/testsig.c b/test/testsig.c index ad23327e9..8d5546f97 100644 --- a/test/testsig.c +++ b/test/testsig.c @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) ap_initialize(); - ap_create_context(NULL, &context); + ap_create_context(&context, NULL); if (argc > 1) { @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) } fprintf(stdout, "OK\n"); - if (ap_createprocattr_init(context, &attr) != APR_SUCCESS) { + if (ap_createprocattr_init(&attr, context) != APR_SUCCESS) { fprintf(stderr, "Could not create attr\n"); exit(-1);; } diff --git a/test/testsock.c b/test/testsock.c index aca3f38a4..6d182925c 100644 --- a/test/testsock.c +++ b/test/testsock.c @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) char *args[2]; fprintf(stdout, "Creating context......."); - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "Could not create context\n"); exit(-1); } @@ -87,8 +87,8 @@ int main(int argc, char *argv[]) fprintf(stdout, "server and client by yourself.\n"); fprintf(stdout, "Creating children to run network tests.......\n"); - s1 = ap_createprocattr_init(context, &attr1); - s2 = ap_createprocattr_init(context, &attr2); + s1 = ap_createprocattr_init(&attr1, context); + s2 = ap_createprocattr_init(&attr2, context); if (s1 != APR_SUCCESS || s2 != APR_SUCCESS) { fprintf(stderr, "Problem creating proc attrs\n"); diff --git a/test/testthread.c b/test/testthread.c index 4c77b6640..829ef77af 100644 --- a/test/testthread.c +++ b/test/testthread.c @@ -129,7 +129,7 @@ int main() ap_status_t s4; fprintf(stdout, "Initializing the context......."); - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "could not initialize\n"); exit(-1); } diff --git a/test/testtime.c b/test/testtime.c index ece903f4a..e81216503 100644 --- a/test/testtime.c +++ b/test/testtime.c @@ -70,7 +70,7 @@ int main() ap_int64_t t1, t2; fprintf(stdout, "Creating context......."); - if (ap_create_context(NULL, &context) != APR_SUCCESS) { + if (ap_create_context(&context, NULL) != APR_SUCCESS) { fprintf(stderr, "could not create context\n"); exit(-1); } @@ -79,7 +79,7 @@ int main() fprintf(stdout, "Testing Time functions.\n"); fprintf(stdout, "\tMaking new time variable......."); - if (ap_make_time(context, &time) != APR_SUCCESS) { + if (ap_make_time(&time, context) != APR_SUCCESS) { fprintf(stderr, "Couldn't allocate memory\n"); exit(-1); } @@ -99,7 +99,7 @@ int main() } fprintf(stdout, "OK\n"); - ap_make_time(context, &time2); + ap_make_time(&time2, context); fprintf(stdout, "\tGetting the number of seconds......."); if (ap_get_sec(time, &rv) != APR_SUCCESS) { fprintf(stderr, "Couldn't get the seconds\n"); diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c index cbc015e9d..470f85a9d 100644 --- a/threadproc/beos/proc.c +++ b/threadproc/beos/proc.c @@ -69,7 +69,7 @@ struct send_pipe { char ** envp; }; -ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t **new) +ap_status_t ap_createprocattr_init(struct procattr_t **new, ap_context_t *cont) { (*new) = (struct procattr_t *)ap_palloc(cont, sizeof(struct procattr_t)); @@ -146,7 +146,7 @@ ap_status_t ap_setprocattr_detach(struct procattr_t *attr, ap_int32_t detach) return APR_SUCCESS; } -ap_status_t ap_fork(ap_context_t *cont, struct proc_t **proc) +ap_status_t ap_fork(struct proc_t **proc, ap_context_t *cont) { int pid; @@ -235,19 +235,19 @@ ap_status_t ap_create_process(ap_context_t *cont, char *progname, return APR_SUCCESS; } -ap_status_t ap_get_childin(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childin(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_in; return APR_SUCCESS; } -ap_status_t ap_get_childout(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childout(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_out; return APR_SUCCESS; } -ap_status_t ap_get_childerr(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childerr(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_err; return APR_SUCCESS; diff --git a/threadproc/beos/procsup.c b/threadproc/beos/procsup.c index 2a502b94d..c98691a51 100644 --- a/threadproc/beos/procsup.c +++ b/threadproc/beos/procsup.c @@ -62,7 +62,7 @@ #include "apr_general.h" #include "apr_lib.h" -ap_status_t ap_detach(ap_context_t *cont, struct proc_t **new) +ap_status_t ap_detach(struct proc_t **new, ap_context_t *cont) { int x; diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c index 4a3762354..7ac1d98e5 100644 --- a/threadproc/beos/thread.c +++ b/threadproc/beos/thread.c @@ -58,7 +58,7 @@ #include "apr_general.h" -ap_status_t ap_create_threadattr(ap_context_t *cont, struct threadattr_t **new) +ap_status_t ap_create_threadattr(struct threadattr_t **new, ap_context_t *cont) { ap_status_t stat; @@ -120,7 +120,7 @@ ap_status_t ap_create_thread(ap_context_t *cont, struct threadattr_t *attr, else temp = B_NORMAL_PRIORITY; - stat = ap_create_context(cont, &(*new)->cntxt); + stat = ap_create_context(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } diff --git a/threadproc/beos/threadpriv.c b/threadproc/beos/threadpriv.c index 8b3b7e1cf..9f2845073 100644 --- a/threadproc/beos/threadpriv.c +++ b/threadproc/beos/threadpriv.c @@ -86,7 +86,7 @@ ap_status_t ap_create_thread_private(ap_context_t *cont, return APR_ENOMEM; } -ap_status_t ap_get_thread_private(struct threadkey_t *key, void **new) +ap_status_t ap_get_thread_private(void **new, struct threadkey_t *key) { thread_id tid; int i, index=0; diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c index 003b1a795..8127a161a 100644 --- a/threadproc/os2/proc.c +++ b/threadproc/os2/proc.c @@ -68,7 +68,7 @@ #define INCL_DOS #include <os2.h> -ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t **new) +ap_status_t ap_createprocattr_init(struct procattr_t **new, ap_context_t *cont) { (*new) = (struct procattr_t *)ap_palloc(cont, sizeof(struct procattr_t)); @@ -130,7 +130,7 @@ ap_status_t ap_setprocattr_cmdtype(struct procattr_t *attr, return APR_SUCCESS; } -ap_status_t ap_fork(ap_context_t *cont, struct proc_t **proc) +ap_status_t ap_fork(struct proc_t **proc, ap_context_t *cont) { int pid; @@ -271,19 +271,19 @@ ap_status_t ap_create_process(ap_context_t *cont, char *progname, -ap_status_t ap_get_childin(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childin(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_in; return APR_SUCCESS; } -ap_status_t ap_get_childout(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childout(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_out; return APR_SUCCESS; } -ap_status_t ap_get_childerr(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childerr(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_err; return APR_SUCCESS; diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c index 4a7970ab9..75a62afea 100644 --- a/threadproc/os2/thread.c +++ b/threadproc/os2/thread.c @@ -61,7 +61,7 @@ #define INCL_DOS #include <os2.h> -ap_status_t ap_create_threadattr(ap_context_t *cont, struct threadattr_t **new) +ap_status_t ap_create_threadattr(struct threadattr_t **new, ap_context_t *cont) { (*new) = (struct threadattr_t *)ap_palloc(cont, sizeof(struct threadattr_t)); @@ -117,7 +117,7 @@ ap_status_t ap_create_thread(ap_context_t *cont, struct threadattr_t *attr, thread->attr = attr; thread->func = func; thread->data = data; - stat = ap_create_context(cont, &thread->cntxt); + stat = ap_create_context(&thread->cntxt, cont); if (stat != APR_SUCCESS) { return stat; diff --git a/threadproc/os2/threadpriv.c b/threadproc/os2/threadpriv.c index 049f93896..852958a4a 100644 --- a/threadproc/os2/threadpriv.c +++ b/threadproc/os2/threadpriv.c @@ -73,7 +73,7 @@ ap_status_t ap_create_thread_private(ap_context_t *cont, void (*dest)(void *), return os2errno(DosAllocThreadLocalMemory(1, &((*key)->key))); } -ap_status_t ap_get_thread_private(struct threadkey_t *key, void **new) +ap_status_t ap_get_thread_private(void **new, struct threadkey_t *key) { (*new) = (void *)*(key->key); return APR_SUCCESS; diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c index 4ef7e3d2a..3898de7d8 100644 --- a/threadproc/unix/proc.c +++ b/threadproc/unix/proc.c @@ -67,12 +67,12 @@ #include <unistd.h> /* ***APRDOC******************************************************** - * ap_status_t ap_createprocattr_init(ap_context_t *, ap_procattr_t **) + * ap_status_t ap_createprocattr_init(ap_procattr_t **, ap_context_t *) * Create and initialize a new procattr variable * arg 1) The context to use * arg 2) The newly created procattr. */ -ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t **new) +ap_status_t ap_createprocattr_init(struct procattr_t **new, ap_context_t *cont) { (*new) = (struct procattr_t *)ap_palloc(cont, sizeof(struct procattr_t)); @@ -107,20 +107,20 @@ ap_status_t ap_setprocattr_io(struct procattr_t *attr, ap_int32_t in, { ap_status_t status; if (in) { - if ((status = ap_create_pipe(attr->cntxt, &attr->child_in, - &attr->parent_in)) != APR_SUCCESS) { + if ((status = ap_create_pipe(&attr->child_in, &attr->parent_in, + attr->cntxt)) != APR_SUCCESS) { return status; } } if (out) { - if ((status = ap_create_pipe(attr->cntxt, &attr->parent_out, - &attr->child_out)) != APR_SUCCESS) { + if ((status = ap_create_pipe(&attr->parent_out, &attr->child_out, + attr->cntxt)) != APR_SUCCESS) { return status; } } if (err) { - if ((status = ap_create_pipe(attr->cntxt, &attr->parent_err, - &attr->child_err)) != APR_SUCCESS) { + if ((status = ap_create_pipe(&attr->parent_err, &attr->child_err, + attr->cntxt)) != APR_SUCCESS) { return status; } } @@ -173,13 +173,13 @@ ap_status_t ap_setprocattr_detach(struct procattr_t *attr, ap_int32_t detach) } /* ***APRDOC******************************************************** - * ap_status_t ap_fork_detach(ap_context_t *, ap_proc_t **) + * ap_status_t ap_fork_detach(ap_proc_t **, ap_context_t *) * This is currently the only non-portable call in APR. This executes * a standard unix fork. * arg 1) The context to use. * arg 2) The resulting process handle. */ -ap_status_t ap_fork(ap_context_t *cont, struct proc_t **proc) +ap_status_t ap_fork(struct proc_t **proc, ap_context_t *cont) { int pid; @@ -271,13 +271,13 @@ ap_status_t ap_create_process(ap_context_t *cont, char *progname, } newargs[i + 3] = NULL; if (attr->detached) { - ap_detach(attr->cntxt, &pgrp); + ap_detach(&pgrp, attr->cntxt); } execve(SHELL_PATH, newargs, env); } else { if (attr->detached) { - ap_detach(attr->cntxt, &pgrp); + ap_detach(&pgrp, attr->cntxt); } execve(progname, args, env); } @@ -300,36 +300,36 @@ ap_status_t ap_create_process(ap_context_t *cont, char *progname, } /* ***APRDOC******************************************************** - * ap_status_t ap_get_childin(ap_proc_t *, ap_file_t **) + * ap_status_t ap_get_childin(ap_file_t **, ap_proc_t *) * Get the file handle that is assocaited with a child's stdin. * arg 1) The process handle that corresponds to the desired child process * arg 2) The returned file handle. */ -ap_status_t ap_get_childin(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childin(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_in; return APR_SUCCESS; } /* ***APRDOC******************************************************** - * ap_status_t ap_get_childout(ap_proc_t *, ap_file_t **) + * ap_status_t ap_get_childout(ap_file_t **, ap_proc_t *) * Get the file handle that is assocaited with a child's stdout. * arg 1) The process handle that corresponds to the desired child process * arg 2) The returned file handle. */ -ap_status_t ap_get_childout(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childout(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_out; return APR_SUCCESS; } /* ***APRDOC******************************************************** - * ap_status_t ap_get_childerr(ap_proc_t *, ap_file_t **) + * ap_status_t ap_get_childerr(ap_file_t **, ap_proc_t *) * Get the file handle that is assocaited with a child's stderr. * arg 1) The process handle that corresponds to the desired child process * arg 2) The returned file handle. */ -ap_status_t ap_get_childerr(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childerr(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_err; return APR_SUCCESS; @@ -394,8 +394,8 @@ ap_status_t ap_get_os_proc(ap_proc_t *proc, ap_os_proc_t *theproc) * arg 2) The apr proc we are converting to. * arg 3) The os specific proc to convert */ -ap_status_t ap_put_os_proc(ap_context_t *cont, struct proc_t **proc, - ap_os_proc_t *theproc) +ap_status_t ap_put_os_proc(struct proc_t **proc, ap_os_proc_t *theproc, + ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; diff --git a/threadproc/unix/procsup.c b/threadproc/unix/procsup.c index 3f39fec4b..1be490762 100644 --- a/threadproc/unix/procsup.c +++ b/threadproc/unix/procsup.c @@ -68,7 +68,7 @@ * arg 1) The context to use if it is needed. * arg 2) The new process handler */ -ap_status_t ap_detach(ap_context_t *cont, struct proc_t **new) +ap_status_t ap_detach(struct proc_t **new, ap_context_t *cont) { int x; @@ -141,7 +141,7 @@ ap_status_t ap_detach(ap_context_t *cont, struct proc_t **new) ap_status_t ap_get_procdata(struct proc_t *proc, char *key, void *data) { if (proc != NULL) { - return ap_get_userdata(proc->cntxt, key, &data); + return ap_get_userdata(&data, proc->cntxt, key); } else { data = NULL; diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c index bccf91245..5e32aae1c 100644 --- a/threadproc/unix/thread.c +++ b/threadproc/unix/thread.c @@ -61,12 +61,12 @@ #ifdef HAVE_PTHREAD_H /* ***APRDOC******************************************************** - * ap_status_t ap_create_threadattr(ap_context_t *, ap_threadattr_t **) + * ap_status_t ap_create_threadattr(ap_threadattr_t **, ap_context_t *) * Create and initialize a new threadattr variable * arg 1) The context to use * arg 2) The newly created threadattr. */ -ap_status_t ap_create_threadattr(ap_context_t *cont, struct threadattr_t **new) +ap_status_t ap_create_threadattr(struct threadattr_t **new, ap_context_t *cont) { ap_status_t stat; @@ -157,7 +157,7 @@ ap_status_t ap_create_thread(ap_context_t *cont, struct threadattr_t *attr, else temp = NULL; - stat = ap_create_context(cont, &(*new)->cntxt); + stat = ap_create_context(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } @@ -227,7 +227,7 @@ ap_status_t ap_thread_detach(struct thread_t *thd) ap_status_t ap_get_threaddata(struct thread_t *thread, char *key, void *data) { if (thread != NULL) { - return ap_get_userdata(thread->cntxt, key, &data); + return ap_get_userdata(&data, thread->cntxt, key); } else { data = NULL; @@ -276,8 +276,8 @@ ap_status_t ap_get_os_thread(struct thread_t *thd, ap_os_thread_t *thethd) * arg 2) The apr thread we are converting to. * arg 3) The os specific thread to convert */ -ap_status_t ap_put_os_thread(ap_context_t *cont, struct thread_t **thd, - ap_os_thread_t *thethd) +ap_status_t ap_put_os_thread(struct thread_t **thd, ap_os_thread_t *thethd, + ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; @@ -291,7 +291,7 @@ ap_status_t ap_put_os_thread(ap_context_t *cont, struct thread_t **thd, } #else /* No pthread.h, no threads for right now.*/ -ap_status_t ap_create_threadattr(ap_context_t *cont, struct threadattr_t **new) +ap_status_t ap_create_threadattr(struct threadattr_t **new, ap_context_t *cont) { *new = NULL; return APR_SUCCESS; diff --git a/threadproc/unix/threadpriv.c b/threadproc/unix/threadpriv.c index a7b2f3e72..6e7e97f3e 100644 --- a/threadproc/unix/threadpriv.c +++ b/threadproc/unix/threadpriv.c @@ -88,12 +88,12 @@ ap_status_t ap_create_thread_private(ap_context_t *cont, void (*dest)(void *), } /* ***APRDOC******************************************************** - * ap_status_t ap_get_thread_private(ap_key_t *, void **) + * ap_status_t ap_get_thread_private(void **, ap_key_t *) * Get a pointer to the thread private memory * arg 1) The handle for the desired thread private memory * arg 2) The data stored in private memory */ -ap_status_t ap_get_thread_private(struct threadkey_t *key, void **new) +ap_status_t ap_get_thread_private(void **new, struct threadkey_t *key) { (*new) = pthread_getspecific(key->key); return APR_SUCCESS; @@ -139,7 +139,7 @@ ap_status_t ap_delete_thread_private(struct threadkey_t *key) ap_status_t ap_get_threadkeydata(struct threadkey_t *threadkey, char *key, void *data) { if (threadkey != NULL) { - return ap_get_userdata(threadkey->cntxt, key, &data); + return ap_get_userdata(&data, threadkey->cntxt, key); } else { data = NULL; @@ -190,8 +190,8 @@ ap_status_t ap_get_os_threadkey(struct threadkey_t *key, ap_os_threadkey_t *thek * arg 2) The apr handle we are converting to. * arg 3) The os specific handle to convert */ -ap_status_t ap_put_os_threadkey(ap_context_t *cont, struct threadkey_t **key, - ap_os_threadkey_t *thekey) +ap_status_t ap_put_os_threadkey(struct threadkey_t **key, + ap_os_threadkey_t *thekey, ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; @@ -211,7 +211,7 @@ ap_status_t ap_create_thread_private(ap_context_t *cont, void (*dest)(void *), return APR_SUCCESS; } -ap_status_t ap_get_thread_private(struct threadkey_t *key, void **new) +ap_status_t ap_get_thread_private(void **new, struct threadkey_t *key) { (*new) = NULL; return APR_SUCCESS; diff --git a/threadproc/unix/threadproc.h b/threadproc/unix/threadproc.h index 81c9f67a1..8db9c9567 100644 --- a/threadproc/unix/threadproc.h +++ b/threadproc/unix/threadproc.h @@ -99,7 +99,7 @@ struct proc_t { /*This will move to ap_threadproc.h in time, but I need to figure it out * on windows first. :) */ -ap_status_t ap_detach(ap_context_t *, struct proc_t **); +ap_status_t ap_detach(struct proc_t **, ap_context_t *); #endif /* ! THREAD_PROC_H */ diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c index 1650d2359..22f99db24 100644 --- a/threadproc/win32/proc.c +++ b/threadproc/win32/proc.c @@ -66,7 +66,7 @@ #include <string.h> #include <process.h> -ap_status_t ap_createprocattr_init(ap_context_t *cont, struct procattr_t **new) +ap_status_t ap_createprocattr_init(struct procattr_t **new, ap_context_t *cont) { (*new) = (struct procattr_t *)ap_palloc(cont, sizeof(struct procattr_t)); @@ -296,19 +296,19 @@ ap_status_t ap_create_process(ap_context_t *cont, char *progname, return GetLastError(); } -ap_status_t ap_get_childin(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childin(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_in; return APR_SUCCESS; } -ap_status_t ap_get_childout(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childout(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_out; return APR_SUCCESS; } -ap_status_t ap_get_childerr(struct proc_t *proc, ap_file_t **new) +ap_status_t ap_get_childerr(ap_file_t **new, struct proc_t *proc) { (*new) = proc->attr->parent_err; return APR_SUCCESS; diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c index 7800e676c..9a2314ddd 100644 --- a/threadproc/win32/thread.c +++ b/threadproc/win32/thread.c @@ -61,7 +61,7 @@ #include <process.h> -ap_status_t ap_create_threadattr(ap_context_t *cont, struct threadattr_t **new) +ap_status_t ap_create_threadattr(struct threadattr_t **new, ap_context_t *cont) { (*new) = (struct threadattr_t *)ap_palloc(cont, sizeof(struct threadattr_t)); @@ -103,7 +103,7 @@ ap_status_t ap_create_thread(ap_context_t *cont, struct threadattr_t *attr, (*new)->cntxt = cont; - stat = ap_create_context(cont, &(*new)->cntxt); + stat = ap_create_context(&(*new)->cntxt, cont); if (stat != APR_SUCCESS) { return stat; } diff --git a/threadproc/win32/threadpriv.c b/threadproc/win32/threadpriv.c index ecfaa13f3..d40fcf2a3 100644 --- a/threadproc/win32/threadpriv.c +++ b/threadproc/win32/threadpriv.c @@ -67,7 +67,7 @@ ap_status_t ap_create_thread_private(ap_context_t *cont, void (*dest)(void *), return APR_SUCCESS; } -ap_status_t ap_get_thread_private(struct threadkey_t *key, void **new) +ap_status_t ap_get_thread_private(void **new, struct threadkey_t *key) { if ((*new) = TlsGetValue(key->key)) { return APR_SUCCESS; diff --git a/time/os2/time.c b/time/os2/time.c index 2b0e7a2a1..3db9e66c4 100644 --- a/time/os2/time.c +++ b/time/os2/time.c @@ -61,7 +61,7 @@ #include <errno.h> #include <string.h> -ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new) +ap_status_t ap_make_time(struct atime_t **new, ap_context_t *cont) { (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t)); diff --git a/time/unix/access.c b/time/unix/access.c index 12dbc9637..6a627ce0a 100644 --- a/time/unix/access.c +++ b/time/unix/access.c @@ -343,7 +343,7 @@ ap_status_t ap_set_wday(struct atime_t *atime, ap_int32_t value) ap_status_t ap_get_timedata(struct atime_t *atime, char *key, void *data) { if (atime != NULL) { - return ap_get_userdata(atime->cntxt, key, &data); + return ap_get_userdata(&data, atime->cntxt, key); } else { data = NULL; diff --git a/time/unix/time.c b/time/unix/time.c index 5ad6c36a8..f0a797a34 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -68,7 +68,7 @@ * arg 1) The context to operate on. * arg 2) The new time entity to create. */ -ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new) +ap_status_t ap_make_time(struct atime_t **new, ap_context_t *cont) { (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t)); @@ -162,12 +162,12 @@ ap_status_t ap_implode_time(struct atime_t *atime) } /* ***APRDOC******************************************************** - * ap_status_t ap_get_os_time(ap_time_t *, ap_os_time_t **) + * ap_status_t ap_get_os_time(ap_os_time_t **, ap_time_t *) * Convert from apr time type to OS specific time value * arg 1) The time value to convert. * arg 2) The OS specific value to convert to. */ -ap_status_t ap_get_os_time(struct atime_t *thetime, ap_os_time_t **atime) +ap_status_t ap_get_os_time(ap_os_time_t **atime, struct atime_t *thetime) { if (thetime == NULL) { return APR_ENOTIME; @@ -180,14 +180,14 @@ ap_status_t ap_get_os_time(struct atime_t *thetime, ap_os_time_t **atime) } /* ***APRDOC******************************************************** - * ap_status_t ap_put_os_time(ap_context_t *, ap_time_t **, ap_os_time_t *) + * ap_status_t ap_put_os_time(ap_time_t **, ap_os_time_t *, ap_context_t *) * Convert to apr time type from OS specific time value * arg 1) The context to use. * arg 2) The time value to convert to. * arg 3) The OS specific value to convert. */ -ap_status_t ap_put_os_time(ap_context_t *cont, struct atime_t **thetime, - ap_os_time_t *atime) +ap_status_t ap_put_os_time(struct atime_t **thetime, ap_os_time_t *atime, + ap_context_t *cont) { if (cont == NULL) { return APR_ENOCONT; diff --git a/time/win32/time.c b/time/win32/time.c index b61a547f9..8eba99897 100644 --- a/time/win32/time.c +++ b/time/win32/time.c @@ -62,7 +62,7 @@ #include <errno.h> #include <string.h> -ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new) +ap_status_t ap_make_time(struct atime_t **new, ap_context_t *cont) { (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t)); @@ -111,7 +111,7 @@ ap_status_t ap_implode_time(struct atime_t *atime) return APR_SUCCESS; } -ap_status_t ap_get_os_time(struct atime_t *thetime, ap_os_time_t **atime) +ap_status_t ap_get_os_time(ap_os_time_t **atime, struct atime_t *thetime) { if (thetime == NULL) { return APR_ENOTIME; |