Bug 6546

Summary: ctype.c defines to many functions
Product: glibc Reporter: Jan-Erik Dahlin <jan-erik.dahlin>
Component: libcAssignee: Ulrich Drepper <drepper.fsp>
Status: RESOLVED INVALID    
Severity: minor CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: N/A Target: N/A
Build: N/A Last reconfirmed:

Description Jan-Erik Dahlin 2008-05-22 11:13:43 UTC
The file ctype.c contains 13 different functions (isalnum, isalpha, iscntrl,
isdigit, islower, isgraph, isprint, ispunct, isspace, isupper, isxdigit,
tolower, and toupper). 

Trying to use other implementations of one or more of those functions, say
toupper and tolower, will cause conflicts during linking if any of the other
functions in ctype.c are used. One has to define __NO_INLINE__ or use some other
way to prevent inlining of the ctype functions for the conflict to occur.
Comment 1 Ulrich Drepper 2008-05-22 14:13:00 UTC
You are not supposed to replace functions. If you do you're on your own and then
don't dare to come here ad complain.
Comment 2 Jan-Erik Dahlin 2008-05-23 06:55:48 UTC
(In reply to comment #1)
> You are not supposed to replace functions. If you do you're on your own and then
> don't dare to come here ad complain.

Ok, I stand corrected and I'm sorry for wasting your time, but...

There are reasons why some people would like to use other implementations of
some function in the C library, typically to reduce the code size. Is there any
point in making that unnecessarily hard to do that?