Open /etc/resolv.conf with FD_CLOEXEC
[glibc.git] / include / ctype.h
blob4b5abda375b6d044c4405b4c72c2d262fd1f53f4
1 #ifndef _CTYPE_H
3 /* Initialize ctype locale data. */
4 extern void __ctype_init (void);
5 libc_hidden_proto (__ctype_init)
7 extern int __isctype (int __c, int __mask);
9 # ifndef NOT_IN_libc
11 /* These accessors are used by the optimized macros to find the
12 thread-local cache of ctype information from the current thread's
13 locale. For inside libc, define them as inlines using the _NL_CURRENT
14 accessors. We don't use _NL_CURRENT_LOCALE->__ctype_b here because we
15 want to cause a link-time ref to _nl_current_LC_CTYPE under
16 NL_CURRENT_INDIRECT. */
18 # include "../locale/localeinfo.h"
19 # include <bits/libc-tsd.h>
21 # ifndef CTYPE_EXTERN_INLINE /* Used by ctype/ctype-info.c, which see. */
22 # define CTYPE_EXTERN_INLINE extern inline
23 # endif
25 __libc_tsd_define (extern, const uint16_t *, CTYPE_B)
26 __libc_tsd_define (extern, const int32_t *, CTYPE_TOUPPER)
27 __libc_tsd_define (extern, const int32_t *, CTYPE_TOLOWER)
30 CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
31 __ctype_b_loc (void)
33 return __libc_tsd_address (const uint16_t *, CTYPE_B);
36 CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
37 __ctype_toupper_loc (void)
39 return __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
42 CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
43 __ctype_tolower_loc (void)
45 return __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
48 # endif /* Not NOT_IN_libc. */
50 # include <ctype/ctype.h>
52 # if !defined __NO_CTYPE && !defined NOT_IN_libc
53 /* The spec says that isdigit must only match the decimal digits. We
54 can check this without a memory access. */
55 # undef isdigit
56 # define isdigit(c) ({ int __c = (c); __c >= '0' && __c <= '9'; })
57 # undef isdigit_l
58 # define isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
59 # undef __isdigit_l
60 # define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
61 # endif
63 #endif /* ctype.h */