delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/13/12:25:18

Date: Wed, 13 Dec 2000 16:21:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Stephen Silver <djgpp AT argentum DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: ctype.h in C++
In-Reply-To: <001e01c06508$a04b3140$799a7ed4@oemcomputer>
Message-ID: <Pine.SUN.3.91.1001213161750.13035E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 13 Dec 2000, Stephen Silver wrote:

> >Then why doesn't the C++ compiler disable the macros in its <ctype>
> >(or is it <cctype>?) header?
> 
> At the moment, the <cctype> supplied with DJGPP just #includes <ctype.h>.

<cctype> is not part of the DJGPP project, it is part of the GCC port.  I 
wonder how come GCC maintainers didn't pay attention to this issue.

I wonder what happens with other C libraries.  Does glibc, for instance, 
define inline versions depending on __cplusplus?

> Disabling the macros in <cctype> would cause the non-inline versions
> of these functions to be used, so it's not an ideal solution.

You don't need to disable macros by #undef.  You could provide inline 
versions in <cctype>, for example.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019