From owner-freebsd-current Mon Jun 17 17:57:11 2002 Delivered-To: freebsd-current@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id 87B0137B409 for ; Mon, 17 Jun 2002 17:57:05 -0700 (PDT) Received: from pool0435.cvx40-bradley.dialup.earthlink.net ([216.244.43.180] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 17K7HT-0002TK-00; Mon, 17 Jun 2002 17:55:36 -0700 Message-ID: <3D0E84DF.C836E631@mindspring.com> Date: Mon, 17 Jun 2002 17:54:55 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Martin Blapp Cc: Garrett Wollman , Thomas David Rivers , current@FreeBSD.ORG Subject: Re: PATCH: wchar_t is already defined in libstd++ References: <20020618004555.U60170-100000@levais.imp.ch> Content-Type: multipart/mixed; boundary="------------CA68868557010680A797E5E2" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------CA68868557010680A797E5E2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Martin Blapp wrote: > > Wait my previous version was wrong ... > > This is more correct ... > > Since of works for gcc and g++ before 3, and it works for > gcc in 3. : Garrett is right. The correct answer is to not define _BSD_WCHAR_T_ in scope for C++. I'm not sure about _BSD_WINT_T_. In any case, here is a patch for i386; you will need similar patches for the other architectures. -- Terry --------------CA68868557010680A797E5E2 Content-Type: text/plain; charset=us-ascii; name="ansi.h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ansi.h.diff" Index: ansi.h =================================================================== RCS file: /usr/cvs/src/sys/i386/include/ansi.h,v retrieving revision 1.18.2.4 diff -c -r1.18.2.4 ansi.h *** ansi.h 3 Jun 2001 17:15:54 -0000 1.18.2.4 --- ansi.h 18 Jun 2002 01:02:30 -0000 *************** *** 56,62 **** --- 56,64 ---- #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ long /* time()... */ #define _BSD_TIMER_T_ int /* timer_gettime()... */ + #if __GNUC__ > 2 && !defined(__cplusplus) #define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */ + #endif #define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */ /* --------------CA68868557010680A797E5E2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message