summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-08-13 14:30:59 -0700
committerElliott Hughes <enh@google.com>2013-08-13 14:30:59 -0700
commit5e9b20f7212c23110693a4bd1f122ccac3fece80 (patch)
tree0403b176141a8c3ce111dbe04301c96dfd8e6845 /libc/stdlib
parentc933493ac28c40558f369d175da738ba601d8499 (diff)
downloadbionic-5e9b20f7212c23110693a4bd1f122ccac3fece80.zip
bionic-5e9b20f7212c23110693a4bd1f122ccac3fece80.tar.gz
bionic-5e9b20f7212c23110693a4bd1f122ccac3fece80.tar.bz2
Make ctype.h a little less unhygienic.
This caused trouble for stlport. Change-Id: Id40787c5a2b7a3a4e12fb557efe549778a01cbbd
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/ctype_.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libc/stdlib/ctype_.c b/libc/stdlib/ctype_.c
index cf32f16..3703f64 100644
--- a/libc/stdlib/ctype_.c
+++ b/libc/stdlib/ctype_.c
@@ -36,6 +36,15 @@
#include <ctype.h>
#include "ctype_private.h"
+#define _U _CTYPE_U
+#define _L _CTYPE_L
+#define _N _CTYPE_N
+#define _S _CTYPE_S
+#define _P _CTYPE_P
+#define _C _CTYPE_C
+#define _X _CTYPE_X
+#define _B _CTYPE_B
+
const char _C_ctype_[1 + CTYPE_NUM_CHARS] = {
0,
_C, _C, _C, _C, _C, _C, _C, _C,
@@ -77,6 +86,8 @@ const char _C_ctype_[1 + CTYPE_NUM_CHARS] = {
const char *_ctype_ = _C_ctype_;
+// TODO: fix the header file so we don't have to duplicate all this inlined stuff.
+
#if 1 /* ndef NDEBUG */
int isalnum(int c)
{
@@ -155,4 +166,3 @@ int toascii(int c)
#endif /* __BSD_VISIBLE || __XPG_VISIBLE */
#endif /* !NDBEUG */
-