summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2001-03-19 12:35:16 +0000
committerbjh <bjh@13f79535-47bb-0310-9956-ffa450edef68>2001-03-19 12:35:16 +0000
commitd71b5e693b34d6ef89e94fb123eb7fc5d0f89d4e (patch)
treea7fbda419d142fcd2954375a2b17a41e1933dcbd /network_io
parent2ff8a28a468ebe3e5535533847296586eda348e7 (diff)
downloadlibapr-d71b5e693b34d6ef89e94fb123eb7fc5d0f89d4e.tar.gz
OS/2: add an assortment of misc helper functions that were missing so
exports.c can safely be linked in. There's also a few stub functions returning APR_ENOTIMPL. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61367 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/os2/Makefile.in1
-rw-r--r--network_io/os2/poll.c26
-rw-r--r--network_io/os2/sendrecv_udp.c73
3 files changed, 100 insertions, 0 deletions
diff --git a/network_io/os2/Makefile.in b/network_io/os2/Makefile.in
index 543a36e15..5737cd7bf 100644
--- a/network_io/os2/Makefile.in
+++ b/network_io/os2/Makefile.in
@@ -2,6 +2,7 @@
TARGETS = \
poll.lo \
sendrecv.lo \
+ sendrecv_udp.lo \
sockets.lo \
sockopt.lo \
sockaddr.lo \
diff --git a/network_io/os2/poll.c b/network_io/os2/poll.c
index f89253597..55e2f0175 100644
--- a/network_io/os2/poll.c
+++ b/network_io/os2/poll.c
@@ -222,3 +222,29 @@ apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset, apr_socket_t *sock)
{
return apr_poll_socket_mask(aprset, sock, APR_POLLIN|APR_POLLOUT|APR_POLLPRI);
}
+
+
+
+apr_status_t apr_poll_socket_clear(apr_pollfd_t *aprset, apr_int16_t events)
+{
+ aprset->num_read = 0;
+ aprset->num_write = 0;
+ aprset->num_except = 0;
+ aprset->num_total = 0;
+ return APR_SUCCESS;
+}
+
+
+
+apr_status_t apr_poll_data_get(apr_pollfd_t *pollfd, const char *key, void *data)
+{
+ return apr_pool_userdata_get(data, key, pollfd->cntxt);
+}
+
+
+
+apr_status_t apr_poll_data_set(apr_pollfd_t *pollfd, void *data, const char *key,
+ apr_status_t (*cleanup) (void *))
+{
+ return apr_pool_userdata_set(data, key, cleanup, pollfd->cntxt);
+}
diff --git a/network_io/os2/sendrecv_udp.c b/network_io/os2/sendrecv_udp.c
new file mode 100644
index 000000000..a2b0b046b
--- /dev/null
+++ b/network_io/os2/sendrecv_udp.c
@@ -0,0 +1,73 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+#include "networkio.h"
+#include "apr_errno.h"
+#include "apr_general.h"
+#include "apr_network_io.h"
+#include "apr_lib.h"
+#include <sys/time.h>
+
+apr_status_t apr_sendto(apr_socket_t *sock, apr_sockaddr_t *where,
+ apr_int32_t flags, const char *buf, apr_size_t *len)
+{
+ return APR_ENOTIMPL;
+}
+
+apr_status_t apr_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
+ apr_int32_t flags, char *buf,
+ apr_size_t *len)
+{
+ return APR_ENOTIMPL;
+}