Debian Codegraph @

src/ikarus-getaddrinfo.h

raw
1 /*
2 * Ikarus Scheme -- A compiler for R6RS Scheme.
3 * Copyright (C) 2006,2007,2008 Abdulaziz Ghuloum
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
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/>.
16 */
17
18
19
20
21 #include "config.h"
22 #if (!HAVE_GETADDRINFO)
23 #include <stdlib.h>
24 #include <sys/types.h>
25 #include <netdb.h>
26
27 struct addrinfo {
28 int ai_family;
29 int ai_socktype;
30 int ai_protocol;
31 size_t ai_addrlen;
32 struct sockaddr *ai_addr;
33 struct addrinfo *ai_next;
34 };
35
36 extern int
37 getaddrinfo(const char *hostname, const char* servname,
38 const struct addrinfo* hints, struct addrinfo** res);
39
40 extern void
41 freeaddrinfo(struct addrinfo *ai);
42
43
44 #ifndef EAI_SYSTEM
45 # define EAI_SYSTEM 11 /* same code as in glibc */
46 #endif
47
48 #endif
49