Bug 6546 - ctype.c defines to many functions
Summary: ctype.c defines to many functions
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 minor
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-22 11:13 UTC by Jan-Erik Dahlin
Modified: 2014-07-03 11:29 UTC (History)
1 user (show)

See Also:
Host: N/A
Target: N/A
Build: N/A
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?