summaryrefslogtreecommitdiff
path: root/newlib/libc/ctype/_tolower.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/ctype/_tolower.c')
-rw-r--r--newlib/libc/ctype/_tolower.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/libc/ctype/_tolower.c b/newlib/libc/ctype/_tolower.c
new file mode 100644
index 00000000000..968dcf738c9
--- /dev/null
+++ b/newlib/libc/ctype/_tolower.c
@@ -0,0 +1,9 @@
+#include <_ansi.h>
+#include <ctype.h>
+
+#undef _tolower
+int
+_DEFUN(_tolower,(c),int c)
+{
+ return isupper(c) ? (c) - 'A' + 'a' : c;
+}