summaryrefslogtreecommitdiff
path: root/lib/libc/ctype/toupper.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/ctype/toupper.c')
-rw-r--r--lib/libc/ctype/toupper.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/ctype/toupper.c b/lib/libc/ctype/toupper.c
new file mode 100644
index 00000000..e952acd9
--- /dev/null
+++ b/lib/libc/ctype/toupper.c
@@ -0,0 +1,14 @@
+#include <libc.h>
+#include <ctype.h>
+
+int toupper(int c)
+{
+ if (islower(c))
+ return c & 0x5f;
+ return c;
+}
+
+int toupper_l(int c, locale_t unused locale)
+{
+ return toupper(c);
+}