xref: /freebsd/contrib/llvm-project/libcxx/include/cctype (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_CCTYPE
11#define _LIBCPP_CCTYPE
12
13/*
14    cctype synopsis
15
16namespace std
17{
18
19int isalnum(int c);
20int isalpha(int c);
21int isblank(int c);  // C99
22int iscntrl(int c);
23int isdigit(int c);
24int isgraph(int c);
25int islower(int c);
26int isprint(int c);
27int ispunct(int c);
28int isspace(int c);
29int isupper(int c);
30int isxdigit(int c);
31int tolower(int c);
32int toupper(int c);
33
34}  // std
35*/
36
37#include <__config>
38
39#include <ctype.h>
40
41#ifndef _LIBCPP_CTYPE_H
42#   error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
43          This usually means that your header search paths are not configured properly.  \
44          The header search paths should contain the C++ Standard Library headers before \
45          any C Standard Library.
46#endif
47
48#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
49#  pragma GCC system_header
50#endif
51
52_LIBCPP_BEGIN_NAMESPACE_STD
53
54#ifdef isalnum
55#  undef isalnum
56#endif
57
58#ifdef isalpha
59#  undef isalpha
60#endif
61
62#ifdef isblank
63#  undef isblank
64#endif
65
66#ifdef iscntrl
67#  undef iscntrl
68#endif
69
70#ifdef isdigit
71#  undef isdigit
72#endif
73
74#ifdef isgraph
75#  undef isgraph
76#endif
77
78#ifdef islower
79#  undef islower
80#endif
81
82#ifdef isprint
83#  undef isprint
84#endif
85
86#ifdef ispunct
87#  undef ispunct
88#endif
89
90#ifdef isspace
91#  undef isspace
92#endif
93
94#ifdef isupper
95#  undef isupper
96#endif
97
98#ifdef isxdigit
99#  undef isxdigit
100#endif
101
102#ifdef tolower
103#  undef tolower
104#endif
105
106#ifdef toupper
107#  undef toupper
108#endif
109
110using ::isalnum _LIBCPP_USING_IF_EXISTS;
111using ::isalpha _LIBCPP_USING_IF_EXISTS;
112using ::isblank _LIBCPP_USING_IF_EXISTS;
113using ::iscntrl _LIBCPP_USING_IF_EXISTS;
114using ::isdigit _LIBCPP_USING_IF_EXISTS;
115using ::isgraph _LIBCPP_USING_IF_EXISTS;
116using ::islower _LIBCPP_USING_IF_EXISTS;
117using ::isprint _LIBCPP_USING_IF_EXISTS;
118using ::ispunct _LIBCPP_USING_IF_EXISTS;
119using ::isspace _LIBCPP_USING_IF_EXISTS;
120using ::isupper _LIBCPP_USING_IF_EXISTS;
121using ::isxdigit _LIBCPP_USING_IF_EXISTS;
122using ::tolower _LIBCPP_USING_IF_EXISTS;
123using ::toupper _LIBCPP_USING_IF_EXISTS;
124
125_LIBCPP_END_NAMESPACE_STD
126
127#endif // _LIBCPP_CCTYPE
128