x86-64: Require BMI2 for AVX2 strcmp implementation
[glibc.git] / nscd / gai.c
blobe32924a4006b9b3a855f53a4ecc49a2558a07d30
1 /* Copyright (C) 2004-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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
6 by the Free Software Foundation; version 2 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 #include <alloca.h>
18 #include <sys/stat.h>
20 /* This file uses the getaddrinfo code but it compiles it without NSCD
21 support. We just need a few symbol renames. */
22 #define __ioctl ioctl
23 #define __getsockname getsockname
24 #define __socket socket
25 #define __recvmsg recvmsg
26 #define __bind bind
27 #define __sendto sendto
28 #define __strchrnul strchrnul
29 #define __getline getline
30 #define __qsort_r qsort_r
31 /* nscd uses 1MB or 2MB thread stacks. */
32 #define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
33 #define __getifaddrs getifaddrs
34 #define __freeifaddrs freeifaddrs
35 #undef __fstat64
36 #define __fstat64 fstat64
37 #undef __stat64
38 #define __stat64 stat64
40 /* We are nscd, so we don't want to be talking to ourselves. */
41 #undef USE_NSCD
43 #include <getaddrinfo.c>
45 /* Support code. */
46 #include <check_pf.c>
47 #include <check_native.c>
49 /* Some variables normally defined in libc. */
50 nss_action_list __nss_hosts_database attribute_hidden;