Bug 15127

Summary: _T is defined in ctype.h and breaks c++ library using "typename _T..."
Product: Base System Reporter: tomoaki <tomoaki>
Component: miscAssignee: David E. O'Brien <obrien>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description tomoaki 1999-11-28 04:40:01 UTC
ctype.h defines _T as 
#define _T      0x00100000L             /* Special */
and leave it defined.
Many c++ codes including libstdc++ uses the identifier _T, which will
be confused by this #define.

Fix: #undef _T and other unnecessary defines before returning from the header.
How-To-Repeat: $ cat test.c
#include <ctype.h>
_T
$ cc -E test.c |tail -1
0x00100000L
Comment 1 tomoaki 1999-11-28 06:57:14 UTC
Sorry, the fix I proposed in the pr misc/15127 will break up
the is* macros.
I would alternatively propose to substitute
_? to _CTYPE_?.
for example
substitute _T with _CTYPE_T
-- 
Tomoaki Nishiyama
  e-mail:tomoaki@biol.s.u-tokyo.ac.jp
         Department of Biological Sciences,
Graduate School of Science, The University of Tokyo
Comment 2 David E. O'Brien freebsd_committer freebsd_triage 2000-02-10 07:38:32 UTC
State Changed
From-To: open->closed

problem fixed in 4-CURRENT 
. 


Comment 3 David E. O'Brien freebsd_committer freebsd_triage 2000-02-10 07:38:32 UTC
Responsible Changed
From-To: freebsd-bugs->obrien

I took care of the problem.