From d89fdec51b5849ebdf8000ff1c2fb49878004f39 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 2 Jul 2014 21:16:05 -0400 Subject: consolidate *_l ctype/wctype functions into their non-_l source files the main practical purposes of this commit are to remove a huge amount of clutter from the src/locale directory, to cut down on the length of the $(AR) and $(LD) command lines, and to reduce the amount of space wasted by object file headers in the static libc.a. build time may also be reduced, though this has not been measured. as an additional justification, if there ever were a need for the behavior of these functions to vary by locale, it would be necessary for the non-_l versions to call the _l versions, so that linking the former without the latter would not be possible anyway. --- src/ctype/tolower.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ctype/tolower.c') diff --git a/src/ctype/tolower.c b/src/ctype/tolower.c index b56f3c50..362d6b2b 100644 --- a/src/ctype/tolower.c +++ b/src/ctype/tolower.c @@ -1,7 +1,15 @@ #include +#include "libc.h" int tolower(int c) { if (isupper(c)) return c | 32; return c; } + +int __tolower_l(int c, locale_t l) +{ + return tolower(c); +} + +weak_alias(__tolower_l, tolower_l); -- cgit v1.2.1