1 /* Elementary types and macros for the GNU UniString library.
2 Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify it
5 under the terms of the GNU Lesser General Public License as published
6 by 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 GNU
12 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/>. */
20 /* Get uint8_t, uint16_t, uint32_t. */
23 /* Type representing a Unicode character. */
24 typedef uint32_t ucs4_t
;
26 /* Attribute of a function whose result depends only on the arguments
27 (not pointers!) and which has no side effects. */
28 #ifndef _UC_ATTRIBUTE_CONST
29 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__
30 # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__))
32 # define _UC_ATTRIBUTE_CONST
36 /* Attribute of a function whose result depends only on the arguments
37 (possibly pointers) and global memory, and which has no side effects. */
38 #ifndef _UC_ATTRIBUTE_PURE
39 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
40 # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__))
42 # define _UC_ATTRIBUTE_PURE
46 /* Qualifier in a function declaration, that asserts that the caller must
47 pass a pointer to a different object in the specified pointer argument
48 than in the other pointer arguments. */
50 # if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__)
51 # define _UC_RESTRICT __restrict
52 # elif 199901L <= __STDC_VERSION__ || defined restrict
53 # define _UC_RESTRICT restrict
59 #endif /* _UNITYPES_H */