Linux: Assume and consolidate shutdown wire-up syscall
[glibc.git] / include / ctype.h
blob493a6f80ce8e8b8edc75578a0d33ba34551a7ace
1 #ifndef _CTYPE_H
3 #include <ctype/ctype.h>
5 #ifndef _ISOMAC
6 /* Initialize ctype locale data. */
7 extern void __ctype_init (void);
8 libc_hidden_proto (__ctype_init)
10 /* ctype/ctype.h defined this as a macro and we don't want to #undef it.
11 So defeat macro expansion with parens for this declaration. */
12 extern int (__isctype) (int __c, int __mask);
14 libc_hidden_proto (tolower)
15 libc_hidden_proto (toupper)
17 # if IS_IN (libc)
19 /* These accessors are used by the optimized macros to find the
20 thread-local cache of ctype information from the current thread's
21 locale. For inside libc, define them as inlines using the _NL_CURRENT
22 accessors. We don't use _NL_CURRENT_LOCALE->__ctype_b here because we
23 want to cause a link-time ref to _nl_current_LC_CTYPE under
24 NL_CURRENT_INDIRECT. */
26 # include "../locale/localeinfo.h"
27 # include <libc-tsd.h>
29 # ifndef CTYPE_EXTERN_INLINE /* Used by ctype/ctype-info.c, which see. */
30 # define CTYPE_EXTERN_INLINE extern inline
31 # endif
33 __libc_tsd_define (extern, const uint16_t *, CTYPE_B)
34 __libc_tsd_define (extern, const int32_t *, CTYPE_TOUPPER)
35 __libc_tsd_define (extern, const int32_t *, CTYPE_TOLOWER)
38 CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
39 __ctype_b_loc (void)
41 return __libc_tsd_address (const uint16_t *, CTYPE_B);
44 CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
45 __ctype_toupper_loc (void)
47 return __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
50 CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
51 __ctype_tolower_loc (void)
53 return __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
56 # ifndef __NO_CTYPE
57 /* The spec says that isdigit must only match the decimal digits. We
58 can check this without a memory access. */
59 # undef isdigit
60 # define isdigit(c) ({ int __c = (c); __c >= '0' && __c <= '9'; })
61 # undef isdigit_l
62 # define isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
63 # undef __isdigit_l
64 # define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
65 # endif /* Not __NO_CTYPE. */
67 # endif /* IS_IN (libc). */
68 #endif /* Not _ISOMAC. */
70 #endif /* ctype.h */