support: Also return fd when it is 0
[glibc.git] / intl / hash-string.h
blob0b7f4785fdd9c6a9b74e048ea6a2a5d21e0e8c68
1 /* Description of GNU message catalog format: string hashing function.
2 Copyright (C) 1995-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 Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* @@ end of prolog @@ */
19 /* We assume to have `unsigned long int' value with at least 32 bits. */
20 #define HASHWORDBITS 32
23 #ifndef _LIBC
24 # ifdef IN_LIBINTL
25 # define __hash_string libintl_hash_string
26 # else
27 # define __hash_string hash_string
28 # endif
29 #endif
31 /* Defines the so called `hashpjw' function by P.J. Weinberger
32 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
33 1986, 1987 Bell Telephone Laboratories, Inc.] */
34 extern unsigned long int __hash_string (const char *str_param)
35 attribute_hidden;