summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-06-22 00:36:07 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-06-22 00:36:07 +0000
commitfcd63650edcfbd6efcf028ab6cbeb9c454443afe (patch)
tree5322a9b5b971d414e76defda30ae5be49a73769d /network_io
parent62946928e4f417f23b3da6756fadeb754a650644 (diff)
downloadlibapr-fcd63650edcfbd6efcf028ab6cbeb9c454443afe.tar.gz
Big commit. Basically, if APR defines a public feature macro, then APR
should also use that macro internally. This keeps us from checking for multiple macros as we were doing in the SENDFILE case. It also means that APR is definately building the same way that external programs expect it to. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60239 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/networkio.h9
-rw-r--r--network_io/unix/sendrecv.c8
-rw-r--r--network_io/unix/sockaddr.c2
-rw-r--r--network_io/win32/sendrecv.c2
4 files changed, 11 insertions, 10 deletions
diff --git a/network_io/unix/networkio.h b/network_io/unix/networkio.h
index ad5173687..6dccfaad8 100644
--- a/network_io/unix/networkio.h
+++ b/network_io/unix/networkio.h
@@ -55,6 +55,7 @@
#ifndef NETWORK_IO_H
#define NETWORK_IO_H
+#include "apr.h"
#include "apr_private.h"
#include "apr_network_io.h"
#include "apr_errno.h"
@@ -62,16 +63,16 @@
#include "apr_lib.h"
/* System headers the network I/O library needs */
-#if HAVE_SYS_TYPES_H
+#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#if HAVE_SYS_UIO_H
+#if APR_HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#if HAVE_POLL_H
#include <poll.h>
#endif
-#if HAVE_ERRNO_H
+#if APR_HAVE_ERRNO_H
#include <errno.h>
#endif
#if HAVE_SYS_TIME_H
@@ -98,7 +99,7 @@
#if HAVE_NETDB_H
#include <netdb.h>
#endif
-#if HAVE_FCNTL_H
+#if APR_HAVE_FCNTL_H
#include <fcntl.h>
#endif
#if HAVE_SYS_SENDFILE_H
diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
index 3fb33a549..e96b1b111 100644
--- a/network_io/unix/sendrecv.c
+++ b/network_io/unix/sendrecv.c
@@ -65,7 +65,7 @@
#define READ(x,y,z) read(x,y,z)
#endif
-#if defined(HAVE_SENDFILE) || defined(HAVE_SEND_FILE)
+#if APR_HAVE_SENDFILE
/* This file is needed to allow us access to the ap_file_t internals. */
#include "../../file_io/unix/fileio.h"
@@ -76,7 +76,7 @@
#define TCP_CORK 3
#endif
-#endif /* HAVE_SENDFILE || HAVE_SEND_FILE */
+#endif /* APR_HAVE_SENDFILE */
static ap_status_t wait_for_io_or_timeout(ap_socket_t *sock, int for_read)
{
@@ -204,7 +204,7 @@ ap_status_t ap_sendv(ap_socket_t * sock, const struct iovec *vec,
}
#endif
-#if defined(HAVE_SENDFILE) || defined(HAVE_SEND_FILE)
+#if APR_HAVE_SENDFILE
/* TODO: Verify that all platforms handle the fd the same way
* (i.e. not moving current file pointer)
@@ -555,4 +555,4 @@ ap_status_t ap_sendfile(ap_socket_t * sock, ap_file_t * file,
return APR_SUCCESS;
}
#endif /* __linux__, __FreeBSD__, __HPUX__, _AIX */
-#endif /* HAVE_SENDFILE */
+#endif /* APR_HAVE_SENDFILE */
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index a95fa8f03..0a67769a2 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -144,7 +144,7 @@ ap_status_t ap_get_remote_ipaddr(char **addr, const ap_socket_t *sock)
-#if HAVE_NETINET_IN_H
+#if APR_HAVE_NETINET_IN_H
ap_status_t ap_get_local_name(struct sockaddr_in **name, const ap_socket_t *sock)
{
*name = sock->local_addr;
diff --git a/network_io/win32/sendrecv.c b/network_io/win32/sendrecv.c
index 06230bf24..57019ba0a 100644
--- a/network_io/win32/sendrecv.c
+++ b/network_io/win32/sendrecv.c
@@ -133,7 +133,7 @@ ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec,
*nbytes = dwBytes;
return APR_SUCCESS;
}
-#if defined(HAVE_SENDFILE)
+#if APR_HAVE_SENDFILE
/*
* ap_status_t ap_sendfile(ap_socket_t *, ap_file_t *, ap_hdtr_t *,
* ap_off_t *, ap_size_t *, ap_int32_t flags)