On Sun, Mar 20, 2011 at 12:42:23AM +0100, Stefan Sperling wrote:
> On Sat, Mar 19, 2011 at 05:58:31PM +0100, Mark Kettenis wrote:
> > > Date: Sun, 13 Mar 2011 16:49:01 +0100
> > > From: Stefan Sperling <s...@openbsd.org>
> > > 
> > > Marc Espie reminded me a while back that we'll also need to make sure that
> > > nothing in base will suddenly start using this (e.g. code in gnu/).
> > 
> > Well, it shouldn't be a problem if stuff in base started using this
> > code.  But we should check libstdc++ and bump its major if this has
> > any effect there.
> 
> In a wprintf ports bulk build run by landry, devel/boost errored out with:
> 
> libs/regex/src/../src/wide_posix_api.cpp: In function 'boost::regsize_t 
> boost::regerrorW(int, const boost::regex_tW*, wchar_t*, boost::regsize_t)':
> libs/regex/src/../src/wide_posix_api.cpp:185: error: 'swprintf' is not a 
> member of 'std'
> libs/regex/src/../src/wide_posix_api.cpp:199: error: 'swprintf' is not a 
> member of 'std'
> 
> I haven't looked into it yet. But it looks like we'll need to change
> something in libstdc++ to fix this.

This makes boost happy on amd64.

I don't know if we'll need to do anything for gcc2 arches.
In egcs, libstdc++ simply includes wchar.h. So maybe it just works?

Index: include/c_std/std_cwchar.h
===================================================================
RCS file: /cvs/src/gnu/gcc/libstdc++-v3/include/c_std/std_cwchar.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 std_cwchar.h
--- include/c_std/std_cwchar.h  15 Oct 2009 17:11:32 -0000      1.1.1.1
+++ include/c_std/std_cwchar.h  27 Mar 2011 20:27:48 -0000
@@ -151,8 +151,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   using ::fputwc;
   using ::fputws;
   using ::fwide;
-#if !defined(__OpenBSD__)
   using ::fwprintf;
+#if !defined(__OpenBSD__)
   using ::fwscanf;
 #endif
   using ::getwc;
@@ -163,26 +163,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   using ::mbsrtowcs;
   using ::putwc;
   using ::putwchar;
-#if !defined(__OpenBSD__)
   using ::swprintf;
+#if !defined(__OpenBSD__)
   using ::swscanf;
 #endif
   using ::ungetwc;
-#if !defined(__OpenBSD__)
   using ::vfwprintf;
-#endif
 #if _GLIBCXX_HAVE_VFWSCANF
   using ::vfwscanf;
 #endif
-#if !defined(__OpenBSD__)
   using ::vswprintf;
-#endif
 #if _GLIBCXX_HAVE_VSWSCANF
   using ::vswscanf;
 #endif
-#if !defined(__OpenBSD__)
   using ::vwprintf;
-#endif
 #if _GLIBCXX_HAVE_VWSCANF
   using ::vwscanf;
 #endif
@@ -214,8 +208,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   using ::wmemcpy;
   using ::wmemmove;
   using ::wmemset;
-#if !defined(__OpenBSD__)
   using ::wprintf;
+#if !defined(__OpenBSD__)
   using ::wscanf;
 #endif

Reply via email to