.
[glibc.git] / nscd / gai.c
blob1233590407163b2ac5d6611e476354952d035c1f
1 /* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 2004.
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 2 as
7 published by the Free Software Foundation.
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, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 #include <alloca.h>
19 /* This file uses the getaddrinfo code but it compiles it without NSCD
20 support. We just need a few symbol renames. */
21 #define __inet_aton inet_aton
22 #define __getsockname getsockname
23 #define __socket socket
24 #define __recvmsg recvmsg
25 #define __bind bind
26 #define __sendto sendto
27 #define __strchrnul strchrnul
28 #define __getline getline
29 /* nscd uses 1MB or 2MB thread stacks. */
30 #define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
32 #include <getaddrinfo.c>
34 /* Support code. */
35 #include <check_pf.c>
36 #ifdef HAVE_LIBIDN
37 # include <libidn/idn-stub.c>
38 #endif
40 /* Some variables normally defined in libc. */
41 service_user *__nss_hosts_database;
43 #if defined NEED_NETLINK && __ASSUME_NETLINK_SUPPORT == 0
44 int __no_netlink_support attribute_hidden;
45 #endif