1 /* Test of <sys/socket.h> substitute in C++ mode.
2 Copyright (C) 2010-2011 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
22 #include <sys/socket.h>
24 #include "signature.h"
27 #if GNULIB_TEST_SOCKET
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::socket, int, (int, int, int));
31 #if GNULIB_TEST_CONNECT
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::connect, int,
33 (int, const struct sockaddr *, socklen_t));
36 #if GNULIB_TEST_ACCEPT
37 SIGNATURE_CHECK (GNULIB_NAMESPACE::accept, int,
38 (int, struct sockaddr *, socklen_t *));
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::bind, int,
43 (int, const struct sockaddr *, socklen_t));
46 #if GNULIB_TEST_GETPEERNAME
47 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpeername, int,
48 (int, struct sockaddr *, socklen_t *));
51 #if GNULIB_TEST_GETSOCKNAME
52 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsockname, int,
53 (int, struct sockaddr *, socklen_t *));
56 #if GNULIB_TEST_GETSOCKOPT
57 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsockopt, int,
58 (int, int, int, void *, socklen_t *));
61 #if GNULIB_TEST_LISTEN
62 SIGNATURE_CHECK (GNULIB_NAMESPACE::listen, int, (int, int));
66 SIGNATURE_CHECK (GNULIB_NAMESPACE::recv, ssize_t, (int, void *, size_t, int));
70 SIGNATURE_CHECK (GNULIB_NAMESPACE::send, ssize_t,
71 (int, const void *, size_t, int));
74 #if GNULIB_TEST_RECVFROM
75 SIGNATURE_CHECK (GNULIB_NAMESPACE::recvfrom, ssize_t,
76 (int, void *, size_t, int, struct sockaddr *, socklen_t *));
79 #if GNULIB_TEST_SENDTO
80 SIGNATURE_CHECK (GNULIB_NAMESPACE::sendto, ssize_t,
81 (int, const void *, size_t, int,
82 const struct sockaddr *, socklen_t));
85 #if GNULIB_TEST_SETSOCKOPT
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::setsockopt, int,
87 (int, int, int, const void *, socklen_t));
90 #if GNULIB_TEST_SHUTDOWN
91 SIGNATURE_CHECK (GNULIB_NAMESPACE::shutdown, int, (int, int));
94 #if GNULIB_TEST_ACCEPT4
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::accept4, int,
96 (int, struct sockaddr *, socklen_t *, int));