1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "apr_errno.h"
18#include <sys/types.h>
19#include <sys/socket.h>
20
21extern int (*apr_os2_socket)(int, int, int);
22extern int (*apr_os2_select)(int *, int, int, int, long);
23extern int (*apr_os2_sock_errno)();
24extern int (*apr_os2_accept)(int, struct sockaddr *, int *);
25extern int (*apr_os2_bind)(int, struct sockaddr *, int);
26extern int (*apr_os2_connect)(int, struct sockaddr *, int);
27extern int (*apr_os2_getpeername)(int, struct sockaddr *, int *);
28extern int (*apr_os2_getsockname)(int, struct sockaddr *, int *);
29extern int (*apr_os2_getsockopt)(int, int, int, char *, int *);
30extern int (*apr_os2_ioctl)(int, int, caddr_t, int);
31extern int (*apr_os2_listen)(int, int);
32extern int (*apr_os2_recv)(int, char *, int, int);
33extern int (*apr_os2_send)(int, const char *, int, int);
34extern int (*apr_os2_setsockopt)(int, int, int, char *, int);
35extern int (*apr_os2_shutdown)(int, int);
36extern int (*apr_os2_soclose)(int);
37extern int (*apr_os2_writev)(int, struct iovec *, int);
38extern int (*apr_os2_sendto)(int, const char *, int, int, const struct sockaddr *, int);
39extern int (*apr_os2_recvfrom)(int, char *, int, int, struct sockaddr *, int *);
40
41#define socket apr_os2_socket
42#define select apr_os2_select
43#define sock_errno apr_os2_sock_errno
44#define accept apr_os2_accept
45#define bind apr_os2_bind
46#define connect apr_os2_connect
47#define getpeername apr_os2_getpeername
48#define getsockname apr_os2_getsockname
49#define getsockopt apr_os2_getsockopt
50#define ioctl apr_os2_ioctl
51#define listen apr_os2_listen
52#define recv apr_os2_recv
53#define send apr_os2_send
54#define setsockopt apr_os2_setsockopt
55#define shutdown apr_os2_shutdown
56#define soclose apr_os2_soclose
57#define writev apr_os2_writev
58#define sendto apr_os2_sendto
59#define recvfrom apr_os2_recvfrom
60