Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2002 17:54:55 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Martin Blapp <mb@imp.ch>
Cc:        Garrett Wollman <wollman@lcs.mit.edu>, Thomas David Rivers <rivers@dignus.com>, current@FreeBSD.ORG
Subject:   Re: PATCH: wchar_t is already defined in libstd++
Message-ID:  <3D0E84DF.C836E631@mindspring.com>
References:  <20020618004555.U60170-100000@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D0E84DF.C836E631>