annotate tests/test-netdb.c @ 17593:d1e383af69e2

manywarnings: remove -Wmudflap * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wmudflap, since it is no longer supported in gcc-4.9-to-be.
author Jim Meyering <meyering@fb.com>
date Thu, 02 Jan 2014 16:55:04 -0800
parents 344018b6e5d7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10644
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
1 /* Test of <netdb.h> substitute.
17587
344018b6e5d7 maint: update copyright
Eric Blake <eblake@redhat.com>
parents: 17249
diff changeset
2 Copyright (C) 2007-2008, 2010-2014 Free Software Foundation, Inc.
10644
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
3
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
4 This program is free software: you can redistribute it and/or modify
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
7 (at your option) any later version.
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
8
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
12 GNU General Public License for more details.
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
13
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
16
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
17 /* Written by Simon Josefsson <simon@josefsson.org>, 2008. */
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
18
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
19 #include <config.h>
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
20 #include <netdb.h>
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
21
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
22 /* Check that the 'struct hostent' type is defined. */
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
23 struct hostent t1;
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
24
13588
a17068cb741d sys_socket, netdb: Ensure socklen_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
25 /* Check that the 'socklen_t' type is defined. */
a17068cb741d sys_socket, netdb: Ensure socklen_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
26 socklen_t t2;
a17068cb741d sys_socket, netdb: Ensure socklen_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
27
10644
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
28 int
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
29 main (void)
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
30 {
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
31 return 0;
ba5c6a0c8928 Add netdb.h replacement module.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
32 }