From owner-freebsd-current Wed Dec 29 20:44:17 1999 Delivered-To: freebsd-current@freebsd.org Received: from koke.nibb.ac.jp (koke.nibb.ac.jp [133.48.46.82]) by hub.freebsd.org (Postfix) with ESMTP id ED8D914D9B; Wed, 29 Dec 1999 20:44:13 -0800 (PST) (envelope-from tomoaki@biol.s.u-tokyo.ac.jp) Received: from localhost (koke.nibb.ac.jp [127.0.0.1]) by koke.nibb.ac.jp (8.9.3/8.9.3) with ESMTP id NAA33783; Thu, 30 Dec 1999 13:44:06 +0900 (JST) (envelope-from tomoaki@biol.s.u-tokyo.ac.jp) To: freebsd-current@freebsd.org Cc: tomoaki@biol.s.u-tokyo.ac.jp Cc: obrien@freebsd.org Subject: _T defined in ctype.h collides with c++ library From: Tomoaki NISHIYAMA X-Mailer: Mew version 1.94.2pre3 on XEmacs 21.1 (Big Bend) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19991230134406M.tomoaki@koke.nibb.ac.jp> Date: Thu, 30 Dec 1999 13:44:06 +0900 X-Dispatcher: imput version 991025(IM133) Lines: 25 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I reported this issue as PR misc/15127, and posted once to hackers but get no response at all. In FreeBSD, _T and other two letter macros are defined in ctype.h. Some standard c++ library code use _T as local identifiers. I mean the library that come with egcs-2.95.[12] and 2.96 191110. /usr/include/g++/typemacros.h also defines _T. (in 3.3R, I'm not sure on later versions) So, I feel better to remove these two character defines from ctype.h. This procedure would involve also change the code in src/lib/libc/locale/{ctype,table}.c Substitute _T with _CTYPE_T in ctype.h and #define _T _CTYPE_T in src/lib/libc/locale/{ctype,table}.c would reduce the undocumented global namespace pollution. What do you think of this? Is this worth doing, or you won't change that, or any better way to go? I think that the c++ library should not use _T anyway, and the use of _T is reported to libstdc++-v3 group with PR #19. The usage of _T is not very few and I'm not sure I found all of them. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message