annotate tests/test-sys_socket-c++.cc @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Test of <sys/socket.h> substitute in C++ mode.
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 Copyright (C) 2010-2013 Free Software Foundation, Inc.
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software: you can redistribute it and/or modify
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 (at your option) any later version.
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #define GNULIB_NAMESPACE gnulib
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 #include <config.h>
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 #include <sys/socket.h>
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include "signature.h"
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
27 #if GNULIB_TEST_SOCKET
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::socket, int, (int, int, int));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
31 #if GNULIB_TEST_CONNECT
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::connect, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 (int, const struct sockaddr *, socklen_t));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
36 #if GNULIB_TEST_ACCEPT
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 SIGNATURE_CHECK (GNULIB_NAMESPACE::accept, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 (int, struct sockaddr *, socklen_t *));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
41 #if GNULIB_TEST_BIND
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::bind, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 (int, const struct sockaddr *, socklen_t));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
46 #if GNULIB_TEST_GETPEERNAME
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 SIGNATURE_CHECK (GNULIB_NAMESPACE::getpeername, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 (int, struct sockaddr *, socklen_t *));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
51 #if GNULIB_TEST_GETSOCKNAME
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsockname, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 (int, struct sockaddr *, socklen_t *));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
56 #if GNULIB_TEST_GETSOCKOPT
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsockopt, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 (int, int, int, void *, socklen_t *));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
61 #if GNULIB_TEST_LISTEN
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 SIGNATURE_CHECK (GNULIB_NAMESPACE::listen, int, (int, int));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
65 #if GNULIB_TEST_RECV
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 SIGNATURE_CHECK (GNULIB_NAMESPACE::recv, ssize_t, (int, void *, size_t, int));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
69 #if GNULIB_TEST_SEND
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 SIGNATURE_CHECK (GNULIB_NAMESPACE::send, ssize_t,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 (int, const void *, size_t, int));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
74 #if GNULIB_TEST_RECVFROM
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 SIGNATURE_CHECK (GNULIB_NAMESPACE::recvfrom, ssize_t,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 (int, void *, size_t, int, struct sockaddr *, socklen_t *));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
79 #if GNULIB_TEST_SENDTO
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 SIGNATURE_CHECK (GNULIB_NAMESPACE::sendto, ssize_t,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 (int, const void *, size_t, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 const struct sockaddr *, socklen_t));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
85 #if GNULIB_TEST_SETSOCKOPT
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::setsockopt, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 (int, int, int, const void *, socklen_t));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
90 #if GNULIB_TEST_SHUTDOWN
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 SIGNATURE_CHECK (GNULIB_NAMESPACE::shutdown, int, (int, int));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93
13073
03de1efbfdd3 Resolve conflict between the two kinds of module indicators.
Bruno Haible <bruno@clisp.org>
parents: 12969
diff changeset
94 #if GNULIB_TEST_ACCEPT4
12969
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::accept4, int,
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 (int, struct sockaddr *, socklen_t *, int));
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 #endif
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 int
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 main ()
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 {
c587d7959480 Tests of module 'sys_socket' in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 }