fchmod-tests, fchmodat tests, lchmod tests: Add more tests.
[gnulib.git] / lib / hash-triple.h
blob896d3d22a2123f5ce4bd3313f9422f1b7cdf031d
1 /* Hash functions for file-related (name, device, inode) triples.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc.
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 by
6 the Free Software Foundation; either version 3 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 /* Written by Jim Meyering, 2007. */
19 #ifndef HASH_TRIPLE_H
20 #define HASH_TRIPLE_H
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <stdbool.h>
26 /* Describe a just-created or just-renamed destination file. */
27 struct F_triple
29 char *name;
30 ino_t st_ino;
31 dev_t st_dev;
34 /* Defined in module 'hash-triple-simple'. */
36 extern size_t triple_hash (void const *x, size_t table_size) _GL_ATTRIBUTE_PURE;
37 extern bool triple_compare_ino_str (void const *x, void const *y)
38 _GL_ATTRIBUTE_PURE;
39 extern void triple_free (void *x);
41 /* Defined in module 'hash-triple'. */
42 extern size_t triple_hash_no_name (void const *x, size_t table_size)
43 _GL_ATTRIBUTE_PURE;
44 extern bool triple_compare (void const *x, void const *y);
46 #endif