setipv4sourcefilter: Avoid using alloca.
[glibc.git] / sysdeps / generic / dl-fileid.h
blob2bbe1b6263501b26cb9b4b86147f4b077e37e93e
1 /* File identity for the dynamic linker. Stub version.
2 Copyright (C) 2015-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 #include <stdbool.h>
21 /* This type stores whatever information is fetched by _dl_get_file_id
22 and compared by _dl_file_id_match_p. */
23 struct r_file_id
25 /* In the stub version, we don't record anything at all. */
28 /* Sample FD to fill in *ID. Returns true on success.
29 On error, returns false, with errno set. */
30 static inline bool
31 _dl_get_file_id (int fd __attribute__ ((unused)),
32 struct r_file_id *id __attribute__ ((unused)))
34 return true;
37 /* Compare two results from _dl_get_file_id for equality.
38 It's crucial that this never return false-positive matches.
39 It's ideal that it never return false-negative mismatches either,
40 but lack of matches is survivable. */
41 static inline bool
42 _dl_file_id_match_p (const struct r_file_id *a __attribute__ ((unused)),
43 const struct r_file_id *b __attribute__ ((unused)))
45 return false;