File indexing completed on 2026-09-21 09:28:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef _UNISTRING_CDEFS_H
0027 #define _UNISTRING_CDEFS_H
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 #ifndef _GL_UNUSED_PARAMETER
0040 # define _GL_UNUSED_PARAMETER _UC_ATTRIBUTE_MAYBE_UNUSED
0041 #endif
0042
0043 #ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
0044 # define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED
0045 #endif
0046
0047 #ifndef _GL_UNNAMED
0048 # define _GL_UNNAMED _UC_UNNAMED
0049 #endif
0050
0051 #ifndef _GL_ATTRIBUTE_MALLOC
0052 # define _GL_ATTRIBUTE_MALLOC _UC_ATTRIBUTE_MALLOC
0053 #endif
0054
0055
0056
0057
0058
0059
0060
0061 #ifndef _GL_ATTRIBUTE_DEALLOC
0062 # define _GL_ATTRIBUTE_DEALLOC _UC_ATTRIBUTE_DEALLOC
0063 #endif
0064 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
0065 # define _GL_ATTRIBUTE_DEALLOC_FREE _UC_ATTRIBUTE_DEALLOC_FREE
0066 #endif
0067
0068
0069
0070
0071
0072 #if defined __GNUC__ && defined __GNUC_MINOR__
0073 # define _UC_GNUC_PREREQ(major, minor) \
0074 ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
0075 #else
0076 # define _UC_GNUC_PREREQ(major, minor) 0
0077 #endif
0078
0079 #if (defined __has_attribute \
0080 && (!defined __clang_minor__ \
0081 || (defined __apple_build_version__ \
0082 ? 6000000 <= __apple_build_version__ \
0083 : 5 <= __clang_major__)))
0084 # define _UC_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
0085 #else
0086 # define _UC_HAS_ATTRIBUTE(attr) _UC_ATTR_##attr
0087 # define _UC_ATTR_malloc _UC_GNUC_PREREQ (3, 0)
0088 # define _UC_ATTR_unused _UC_GNUC_PREREQ (2, 7)
0089 #endif
0090
0091 #ifdef __cplusplus
0092 # if defined __clang__
0093 # define _UC_BRACKET_BEFORE_ATTRIBUTE 1
0094 # endif
0095 #else
0096 # if defined __GNUC__ && !defined __clang__
0097 # define _UC_BRACKET_BEFORE_ATTRIBUTE 1
0098 # endif
0099 #endif
0100
0101 #if _UC_GNUC_PREREQ (11, 0)
0102 # define _UC_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
0103 #else
0104 # define _UC_ATTRIBUTE_DEALLOC(f, i)
0105 #endif
0106 #if defined __cplusplus && defined __GNUC__ && !defined __clang__
0107
0108 # define _UC_ATTRIBUTE_DEALLOC_FREE \
0109 _UC_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
0110 #else
0111 # define _UC_ATTRIBUTE_DEALLOC_FREE \
0112 _UC_ATTRIBUTE_DEALLOC (free, 1)
0113 #endif
0114
0115 #if _UC_HAS_ATTRIBUTE (malloc)
0116 # define _UC_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
0117 #else
0118 # define _UC_ATTRIBUTE_MALLOC
0119 #endif
0120
0121 #ifndef _UC_BRACKET_BEFORE_ATTRIBUTE
0122 # if defined __clang__ && defined __cplusplus
0123 # if !defined __apple_build_version__ && __clang_major__ >= 10
0124 # define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
0125 # endif
0126 # elif defined __has_c_attribute
0127 # if __has_c_attribute (__maybe_unused__)
0128 # define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
0129 # endif
0130 # endif
0131 #endif
0132 #ifndef _UC_ATTRIBUTE_MAYBE_UNUSED
0133 # define _UC_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_UNUSED
0134 #endif
0135
0136 #if _UC_HAS_ATTRIBUTE (unused)
0137 # define _UC_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
0138 #else
0139 # define _UC_ATTRIBUTE_UNUSED
0140 #endif
0141
0142 #if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311 \
0143 && !defined __cplusplus)
0144 # define _UC_UNNAMED(id) unnamed_##id _UC_ATTRIBUTE_UNUSED
0145 #else
0146 # define _UC_UNNAMED(id)
0147 #endif
0148
0149 #endif