Mercurial > hg > CbC > CbC_gcc
comparison intl/libgnuintl.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 77e2b8dfacca |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
113 #endif | 113 #endif |
114 | 114 |
115 /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return | 115 /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return |
116 its n-th argument literally. This enables GCC to warn for example about | 116 its n-th argument literally. This enables GCC to warn for example about |
117 printf (gettext ("foo %y")). */ | 117 printf (gettext ("foo %y")). */ |
118 #if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) | 118 #if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus) |
119 # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) | 119 # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) |
120 #else | 120 #else |
121 # define _INTL_MAY_RETURN_STRING_ARG(n) | 121 # define _INTL_MAY_RETURN_STRING_ARG(n) |
122 #endif | 122 #endif |
123 | 123 |
125 LC_MESSAGES locale. If not found, returns MSGID itself (the default | 125 LC_MESSAGES locale. If not found, returns MSGID itself (the default |
126 text). */ | 126 text). */ |
127 #ifdef _INTL_REDIRECT_INLINE | 127 #ifdef _INTL_REDIRECT_INLINE |
128 extern char *libintl_gettext (const char *__msgid) | 128 extern char *libintl_gettext (const char *__msgid) |
129 _INTL_MAY_RETURN_STRING_ARG (1); | 129 _INTL_MAY_RETURN_STRING_ARG (1); |
130 static inline char *gettext (const char *__msgid) | 130 static inline |
131 _INTL_MAY_RETURN_STRING_ARG (1) | |
132 char *gettext (const char *__msgid) | |
131 { | 133 { |
132 return libintl_gettext (__msgid); | 134 return libintl_gettext (__msgid); |
133 } | 135 } |
134 #else | 136 #else |
135 #ifdef _INTL_REDIRECT_MACROS | 137 #ifdef _INTL_REDIRECT_MACROS |
143 /* Look up MSGID in the DOMAINNAME message catalog for the current | 145 /* Look up MSGID in the DOMAINNAME message catalog for the current |
144 LC_MESSAGES locale. */ | 146 LC_MESSAGES locale. */ |
145 #ifdef _INTL_REDIRECT_INLINE | 147 #ifdef _INTL_REDIRECT_INLINE |
146 extern char *libintl_dgettext (const char *__domainname, const char *__msgid) | 148 extern char *libintl_dgettext (const char *__domainname, const char *__msgid) |
147 _INTL_MAY_RETURN_STRING_ARG (2); | 149 _INTL_MAY_RETURN_STRING_ARG (2); |
148 static inline char *dgettext (const char *__domainname, const char *__msgid) | 150 static inline |
151 _INTL_MAY_RETURN_STRING_ARG (2) | |
152 char *dgettext (const char *__domainname, const char *__msgid) | |
149 { | 153 { |
150 return libintl_dgettext (__domainname, __msgid); | 154 return libintl_dgettext (__domainname, __msgid); |
151 } | 155 } |
152 #else | 156 #else |
153 #ifdef _INTL_REDIRECT_MACROS | 157 #ifdef _INTL_REDIRECT_MACROS |
163 locale. */ | 167 locale. */ |
164 #ifdef _INTL_REDIRECT_INLINE | 168 #ifdef _INTL_REDIRECT_INLINE |
165 extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, | 169 extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, |
166 int __category) | 170 int __category) |
167 _INTL_MAY_RETURN_STRING_ARG (2); | 171 _INTL_MAY_RETURN_STRING_ARG (2); |
168 static inline char *dcgettext (const char *__domainname, const char *__msgid, | 172 static inline |
169 int __category) | 173 _INTL_MAY_RETURN_STRING_ARG (2) |
174 char *dcgettext (const char *__domainname, const char *__msgid, int __category) | |
170 { | 175 { |
171 return libintl_dcgettext (__domainname, __msgid, __category); | 176 return libintl_dcgettext (__domainname, __msgid, __category); |
172 } | 177 } |
173 #else | 178 #else |
174 #ifdef _INTL_REDIRECT_MACROS | 179 #ifdef _INTL_REDIRECT_MACROS |
186 number N. */ | 191 number N. */ |
187 #ifdef _INTL_REDIRECT_INLINE | 192 #ifdef _INTL_REDIRECT_INLINE |
188 extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, | 193 extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, |
189 unsigned long int __n) | 194 unsigned long int __n) |
190 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); | 195 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); |
191 static inline char *ngettext (const char *__msgid1, const char *__msgid2, | 196 static inline |
192 unsigned long int __n) | 197 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2) |
198 char *ngettext (const char *__msgid1, const char *__msgid2, | |
199 unsigned long int __n) | |
193 { | 200 { |
194 return libintl_ngettext (__msgid1, __msgid2, __n); | 201 return libintl_ngettext (__msgid1, __msgid2, __n); |
195 } | 202 } |
196 #else | 203 #else |
197 #ifdef _INTL_REDIRECT_MACROS | 204 #ifdef _INTL_REDIRECT_MACROS |
208 number N. */ | 215 number N. */ |
209 #ifdef _INTL_REDIRECT_INLINE | 216 #ifdef _INTL_REDIRECT_INLINE |
210 extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, | 217 extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, |
211 const char *__msgid2, unsigned long int __n) | 218 const char *__msgid2, unsigned long int __n) |
212 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); | 219 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); |
213 static inline char *dngettext (const char *__domainname, const char *__msgid1, | 220 static inline |
214 const char *__msgid2, unsigned long int __n) | 221 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3) |
222 char *dngettext (const char *__domainname, const char *__msgid1, | |
223 const char *__msgid2, unsigned long int __n) | |
215 { | 224 { |
216 return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); | 225 return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); |
217 } | 226 } |
218 #else | 227 #else |
219 #ifdef _INTL_REDIRECT_MACROS | 228 #ifdef _INTL_REDIRECT_MACROS |
232 #ifdef _INTL_REDIRECT_INLINE | 241 #ifdef _INTL_REDIRECT_INLINE |
233 extern char *libintl_dcngettext (const char *__domainname, | 242 extern char *libintl_dcngettext (const char *__domainname, |
234 const char *__msgid1, const char *__msgid2, | 243 const char *__msgid1, const char *__msgid2, |
235 unsigned long int __n, int __category) | 244 unsigned long int __n, int __category) |
236 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); | 245 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); |
237 static inline char *dcngettext (const char *__domainname, | 246 static inline |
238 const char *__msgid1, const char *__msgid2, | 247 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3) |
239 unsigned long int __n, int __category) | 248 char *dcngettext (const char *__domainname, |
249 const char *__msgid1, const char *__msgid2, | |
250 unsigned long int __n, int __category) | |
240 { | 251 { |
241 return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); | 252 return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); |
242 } | 253 } |
243 #else | 254 #else |
244 #ifdef _INTL_REDIRECT_MACROS | 255 #ifdef _INTL_REDIRECT_MACROS |