diff options
author | Doug MacEachern <dougm@apache.org> | 2000-08-02 05:26:45 +0000 |
---|---|---|
committer | Doug MacEachern <dougm@apache.org> | 2000-08-02 05:26:45 +0000 |
commit | 1a1463dbfc6e28b6a5852142b0c87d4abe33c3d9 (patch) | |
tree | 4da0bfd73d36292921960aaabc877a57e680b8c4 /network_io/os2 | |
parent | 4dd06339dd5b46bd735c56dc3738146416f52ccf (diff) | |
download | apr-1a1463dbfc6e28b6a5852142b0c87d4abe33c3d9.tar.gz |
prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/os2')
-rw-r--r-- | network_io/os2/networkio.h | 10 | ||||
-rw-r--r-- | network_io/os2/poll.c | 26 | ||||
-rw-r--r-- | network_io/os2/sendrecv.c | 8 | ||||
-rw-r--r-- | network_io/os2/sockets.c | 58 | ||||
-rw-r--r-- | network_io/os2/sockopt.c | 10 |
5 files changed, 56 insertions, 56 deletions
diff --git a/network_io/os2/networkio.h b/network_io/os2/networkio.h index 63424de6a..a87823ae9 100644 --- a/network_io/os2/networkio.h +++ b/network_io/os2/networkio.h @@ -59,18 +59,18 @@ #include "apr_general.h" #include "os2calls.h" -struct ap_socket_t { - ap_pool_t *cntxt; +struct apr_socket_t { + apr_pool_t *cntxt; int socketdes; struct sockaddr_in *local_addr; struct sockaddr_in *remote_addr; int addr_len; - ap_interval_time_t timeout; + apr_interval_time_t timeout; int nonblock; }; -struct ap_pollfd_t { - ap_pool_t *cntxt; +struct apr_pollfd_t { + apr_pool_t *cntxt; int *socket_list; int *r_socket_list; int num_read; diff --git a/network_io/os2/poll.c b/network_io/os2/poll.c index a36854ff0..f1bd5826a 100644 --- a/network_io/os2/poll.c +++ b/network_io/os2/poll.c @@ -64,21 +64,21 @@ /* OS/2 doesn't have a poll function, implement using OS/2 style select */ -ap_status_t ap_setup_poll(ap_pollfd_t **new, ap_int32_t num, ap_pool_t *cont) +apr_status_t apr_setup_poll(apr_pollfd_t **new, apr_int32_t num, apr_pool_t *cont) { - *new = (ap_pollfd_t *)ap_palloc(cont, sizeof(ap_pollfd_t)); + *new = (apr_pollfd_t *)apr_palloc(cont, sizeof(apr_pollfd_t)); if (*new == NULL) { return APR_ENOMEM; } - (*new)->socket_list = ap_palloc(cont, sizeof(int) * num); + (*new)->socket_list = apr_palloc(cont, sizeof(int) * num); if ((*new)->socket_list == NULL) { return APR_ENOMEM; } - (*new)->r_socket_list = ap_palloc(cont, sizeof(int) * num); + (*new)->r_socket_list = apr_palloc(cont, sizeof(int) * num); if ((*new)->r_socket_list == NULL) { return APR_ENOMEM; @@ -95,8 +95,8 @@ ap_status_t ap_setup_poll(ap_pollfd_t **new, ap_int32_t num, ap_pool_t *cont) -ap_status_t ap_add_poll_socket(ap_pollfd_t *aprset, - ap_socket_t *sock, ap_int16_t events) +apr_status_t apr_add_poll_socket(apr_pollfd_t *aprset, + apr_socket_t *sock, apr_int16_t events) { int i; @@ -126,8 +126,8 @@ ap_status_t ap_add_poll_socket(ap_pollfd_t *aprset, -ap_status_t ap_poll(ap_pollfd_t *pollfdset, ap_int32_t *nsds, - ap_interval_time_t timeout) +apr_status_t apr_poll(apr_pollfd_t *pollfdset, apr_int32_t *nsds, + apr_interval_time_t timeout) { int i; int rv = 0; @@ -167,7 +167,7 @@ ap_status_t ap_poll(ap_pollfd_t *pollfdset, ap_int32_t *nsds, -ap_status_t ap_get_revents(ap_int16_t *event, ap_socket_t *sock, ap_pollfd_t *aprset) +apr_status_t apr_get_revents(apr_int16_t *event, apr_socket_t *sock, apr_pollfd_t *aprset) { int i; @@ -189,8 +189,8 @@ ap_status_t ap_get_revents(ap_int16_t *event, ap_socket_t *sock, ap_pollfd_t *ap -ap_status_t ap_mask_poll_socket(ap_pollfd_t *aprset, - ap_socket_t *sock, ap_int16_t events) +apr_status_t apr_mask_poll_socket(apr_pollfd_t *aprset, + apr_socket_t *sock, apr_int16_t events) { int start, *count, pos; @@ -227,7 +227,7 @@ ap_status_t ap_mask_poll_socket(ap_pollfd_t *aprset, -ap_status_t ap_remove_poll_socket(ap_pollfd_t *aprset, ap_socket_t *sock) +apr_status_t apr_remove_poll_socket(apr_pollfd_t *aprset, apr_socket_t *sock) { - return ap_mask_poll_socket(aprset, sock, APR_POLLIN|APR_POLLOUT|APR_POLLPRI); + return apr_mask_poll_socket(aprset, sock, APR_POLLIN|APR_POLLOUT|APR_POLLPRI); } diff --git a/network_io/os2/sendrecv.c b/network_io/os2/sendrecv.c index a2bf14429..81a281e4d 100644 --- a/network_io/os2/sendrecv.c +++ b/network_io/os2/sendrecv.c @@ -59,7 +59,7 @@ #include "apr_lib.h" #include <sys/time.h> -ap_status_t ap_send(ap_socket_t *sock, const char *buf, ap_ssize_t *len) +apr_status_t apr_send(apr_socket_t *sock, const char *buf, apr_ssize_t *len) { ssize_t rv; int fds, err = 0; @@ -98,7 +98,7 @@ ap_status_t ap_send(ap_socket_t *sock, const char *buf, ap_ssize_t *len) -ap_status_t ap_recv(ap_socket_t *sock, char *buf, ap_ssize_t *len) +apr_status_t apr_recv(apr_socket_t *sock, char *buf, apr_ssize_t *len) { ssize_t rv; int fds, err = 0; @@ -137,9 +137,9 @@ ap_status_t ap_recv(ap_socket_t *sock, char *buf, ap_ssize_t *len) -ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec, ap_int32_t nvec, ap_int32_t *len) +apr_status_t apr_sendv(apr_socket_t *sock, const struct iovec *vec, apr_int32_t nvec, apr_int32_t *len) { - ap_status_t rv; + apr_status_t rv; struct iovec *tmpvec; int fds, err = 0; diff --git a/network_io/os2/sockets.c b/network_io/os2/sockets.c index ddd581510..b6e417840 100644 --- a/network_io/os2/sockets.c +++ b/network_io/os2/sockets.c @@ -66,9 +66,9 @@ #include <netdb.h> #include "os2calls.h" -static ap_status_t socket_cleanup(void *sock) +static apr_status_t socket_cleanup(void *sock) { - ap_socket_t *thesocket = sock; + apr_socket_t *thesocket = sock; if (soclose(thesocket->socketdes) == 0) { thesocket->socketdes = -1; return APR_SUCCESS; @@ -78,17 +78,17 @@ static ap_status_t socket_cleanup(void *sock) } } -ap_status_t ap_create_tcp_socket(ap_socket_t **new, ap_pool_t *cont) +apr_status_t apr_create_tcp_socket(apr_socket_t **new, apr_pool_t *cont) { - (*new) = (ap_socket_t *)ap_palloc(cont, sizeof(ap_socket_t)); + (*new) = (apr_socket_t *)apr_palloc(cont, sizeof(apr_socket_t)); if ((*new) == NULL) { return APR_ENOMEM; } (*new)->cntxt = cont; - (*new)->local_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, + (*new)->local_addr = (struct sockaddr_in *)apr_palloc((*new)->cntxt, sizeof(struct sockaddr_in)); - (*new)->remote_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, + (*new)->remote_addr = (struct sockaddr_in *)apr_palloc((*new)->cntxt, sizeof(struct sockaddr_in)); if ((*new)->local_addr == NULL || (*new)->remote_addr == NULL) { @@ -107,12 +107,12 @@ ap_status_t ap_create_tcp_socket(ap_socket_t **new, ap_pool_t *cont) } (*new)->timeout = -1; (*new)->nonblock = FALSE; - ap_register_cleanup((*new)->cntxt, (void *)(*new), - socket_cleanup, ap_null_cleanup); + apr_register_cleanup((*new)->cntxt, (void *)(*new), + socket_cleanup, apr_null_cleanup); return APR_SUCCESS; } -ap_status_t ap_shutdown(ap_socket_t *thesocket, ap_shutdown_how_e how) +apr_status_t apr_shutdown(apr_socket_t *thesocket, ap_shutdown_how_e how) { if (shutdown(thesocket->socketdes, how) == 0) { return APR_SUCCESS; @@ -122,16 +122,16 @@ ap_status_t ap_shutdown(ap_socket_t *thesocket, ap_shutdown_how_e how) } } -ap_status_t ap_close_socket(ap_socket_t *thesocket) +apr_status_t apr_close_socket(apr_socket_t *thesocket) { - ap_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup); + apr_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup); return socket_cleanup(thesocket); } -ap_status_t ap_bind(ap_socket_t *sock) +apr_status_t apr_bind(apr_socket_t *sock) { if (bind(sock->socketdes, (struct sockaddr *)sock->local_addr, sock->addr_len) == -1) return APR_OS2_STATUS(sock_errno()); @@ -139,7 +139,7 @@ ap_status_t ap_bind(ap_socket_t *sock) return APR_SUCCESS; } -ap_status_t ap_listen(ap_socket_t *sock, ap_int32_t backlog) +apr_status_t apr_listen(apr_socket_t *sock, apr_int32_t backlog) { if (listen(sock->socketdes, backlog) == -1) return APR_OS2_STATUS(sock_errno()); @@ -147,13 +147,13 @@ ap_status_t ap_listen(ap_socket_t *sock, ap_int32_t backlog) return APR_SUCCESS; } -ap_status_t ap_accept(ap_socket_t **new, ap_socket_t *sock, ap_pool_t *connection_context) +apr_status_t apr_accept(apr_socket_t **new, apr_socket_t *sock, apr_pool_t *connection_context) { - (*new) = (ap_socket_t *)ap_palloc(connection_context, - sizeof(ap_socket_t)); + (*new) = (apr_socket_t *)apr_palloc(connection_context, + sizeof(apr_socket_t)); (*new)->cntxt = connection_context; - (*new)->remote_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, + (*new)->remote_addr = (struct sockaddr_in *)apr_palloc((*new)->cntxt, sizeof(struct sockaddr_in)); (*new)->local_addr = sock->local_addr; (*new)->addr_len = sizeof(struct sockaddr_in); @@ -167,12 +167,12 @@ ap_status_t ap_accept(ap_socket_t **new, ap_socket_t *sock, ap_pool_t *connectio return APR_OS2_STATUS(sock_errno()); } - ap_register_cleanup((*new)->cntxt, (void *)(*new), - socket_cleanup, ap_null_cleanup); + apr_register_cleanup((*new)->cntxt, (void *)(*new), + socket_cleanup, apr_null_cleanup); return APR_SUCCESS; } -ap_status_t ap_connect(ap_socket_t *sock, char *hostname) +apr_status_t apr_connect(apr_socket_t *sock, char *hostname) { struct hostent *hp; @@ -206,21 +206,21 @@ ap_status_t ap_connect(ap_socket_t *sock, char *hostname) -ap_status_t ap_get_socketdata(void **data, const char *key, - ap_socket_t *socket) +apr_status_t apr_get_socketdata(void **data, const char *key, + apr_socket_t *socket) { - return ap_get_userdata(data, key, socket->cntxt); + return apr_get_userdata(data, key, socket->cntxt); } -ap_status_t ap_set_socketdata(ap_socket_t *socket, void *data, const char *key, - ap_status_t (*cleanup) (void *)) +apr_status_t apr_set_socketdata(apr_socket_t *socket, void *data, const char *key, + apr_status_t (*cleanup) (void *)) { - return ap_set_userdata(data, key, cleanup, socket->cntxt); + return apr_set_userdata(data, key, cleanup, socket->cntxt); } -ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) +apr_status_t apr_get_os_sock(apr_os_sock_t *thesock, apr_socket_t *sock) { *thesock = sock->socketdes; return APR_SUCCESS; @@ -228,13 +228,13 @@ ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) -ap_status_t ap_put_os_sock(ap_socket_t **sock, ap_os_sock_t *thesock, ap_pool_t *cont) +apr_status_t apr_put_os_sock(apr_socket_t **sock, apr_os_sock_t *thesock, apr_pool_t *cont) { if (cont == NULL) { return APR_ENOPOOL; } if ((*sock) == NULL) { - (*sock) = (ap_socket_t *)ap_palloc(cont, sizeof(ap_socket_t)); + (*sock) = (apr_socket_t *)apr_palloc(cont, sizeof(apr_socket_t)); (*sock)->cntxt = cont; } (*sock)->socketdes = *thesock; diff --git a/network_io/os2/sockopt.c b/network_io/os2/sockopt.c index 75b4c2a78..a3c917f55 100644 --- a/network_io/os2/sockopt.c +++ b/network_io/os2/sockopt.c @@ -66,7 +66,7 @@ #include <sys/so_ioctl.h> -ap_status_t ap_setsocketopt(ap_socket_t *sock, ap_int32_t opt, ap_int32_t on) +apr_status_t apr_setsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t on) { int one; struct linger li; @@ -118,7 +118,7 @@ ap_status_t ap_setsocketopt(ap_socket_t *sock, ap_int32_t opt, ap_int32_t on) -ap_status_t ap_getsocketopt(ap_socket_t *sock, ap_int32_t opt, ap_int32_t *on) +apr_status_t apr_getsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t *on) { switch(opt) { case APR_SO_TIMEOUT: @@ -132,7 +132,7 @@ ap_status_t ap_getsocketopt(ap_socket_t *sock, ap_int32_t opt, ap_int32_t *on) -ap_status_t ap_gethostname(char *buf, ap_int32_t len, ap_pool_t *cont) +apr_status_t apr_gethostname(char *buf, apr_int32_t len, apr_pool_t *cont) { if (gethostname(buf, len) == -1) return APR_OS2_STATUS(sock_errno()); @@ -142,14 +142,14 @@ ap_status_t ap_gethostname(char *buf, ap_int32_t len, ap_pool_t *cont) -ap_status_t ap_get_remote_hostname(char **name, ap_socket_t *sock) +apr_status_t apr_get_remote_hostname(char **name, apr_socket_t *sock) { struct hostent *hptr; hptr = gethostbyaddr((char *)&(sock->remote_addr->sin_addr), sizeof(struct in_addr), AF_INET); if (hptr != NULL) { - *name = ap_pstrdup(sock->cntxt, hptr->h_name); + *name = apr_pstrdup(sock->cntxt, hptr->h_name); if (*name) { return APR_SUCCESS; } |