sys_ioctl: Simplify.
[gnulib.git] / tests / test-sys_socket-c++.cc
blobf4bc1416627bd4333f0f841c278d34bd7a47811a
1 /* Test of <sys/socket.h> substitute in C++ mode.
2 Copyright (C) 2010-2020 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 <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
20 #include <config.h>
22 #include <sys/socket.h>
24 #include "signature.h"
27 #if GNULIB_TEST_SOCKET
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::socket, int, (int, int, int));
29 #endif
31 #if GNULIB_TEST_CONNECT
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::connect, int,
33 (int, const struct sockaddr *, socklen_t));
34 #endif
36 #if GNULIB_TEST_ACCEPT
37 SIGNATURE_CHECK (GNULIB_NAMESPACE::accept, int,
38 (int, struct sockaddr *, socklen_t *));
39 #endif
41 #if GNULIB_TEST_BIND
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::bind, int,
43 (int, const struct sockaddr *, socklen_t));
44 #endif
46 #if GNULIB_TEST_GETPEERNAME
47 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpeername, int,
48 (int, struct sockaddr *, socklen_t *));
49 #endif
51 #if GNULIB_TEST_GETSOCKNAME
52 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsockname, int,
53 (int, struct sockaddr *, socklen_t *));
54 #endif
56 #if GNULIB_TEST_GETSOCKOPT
57 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsockopt, int,
58 (int, int, int, void *, socklen_t *));
59 #endif
61 #if GNULIB_TEST_LISTEN
62 SIGNATURE_CHECK (GNULIB_NAMESPACE::listen, int, (int, int));
63 #endif
65 #if GNULIB_TEST_RECV
66 SIGNATURE_CHECK (GNULIB_NAMESPACE::recv, ssize_t, (int, void *, size_t, int));
67 #endif
69 #if GNULIB_TEST_SEND
70 SIGNATURE_CHECK (GNULIB_NAMESPACE::send, ssize_t,
71 (int, const void *, size_t, int));
72 #endif
74 #if GNULIB_TEST_RECVFROM
75 SIGNATURE_CHECK (GNULIB_NAMESPACE::recvfrom, ssize_t,
76 (int, void *, size_t, int, struct sockaddr *, socklen_t *));
77 #endif
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));
83 #endif
85 #if GNULIB_TEST_SETSOCKOPT
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::setsockopt, int,
87 (int, int, int, const void *, socklen_t));
88 #endif
90 #if GNULIB_TEST_SHUTDOWN
91 SIGNATURE_CHECK (GNULIB_NAMESPACE::shutdown, int, (int, int));
92 #endif
94 #if GNULIB_TEST_ACCEPT4
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::accept4, int,
96 (int, struct sockaddr *, socklen_t *, int));
97 #endif
101 main ()