This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: classic_table


I've sent mail to the NetBSD maintainer. If he doesn't respond within
24hrs, I'll check this in.

-benjamin

>The test 22_locale/ctype/cons/char/1.cc fails on NetBSD due to differences
>between ctype<char>::classic_table and the _M_table stuff in
>ctype<char>::ctype.
>
>While this is easily fixed (by the patch below), I'm not sure what is the
>correct thing to do here.  The current NetBSD implementation returns
>the table for the current locale, but looking at the FreeBSD code shows
>that it just returns 0.  And the Linux code does a setlocale song-and-dance
>to get a pointer to the "C" locale.
>
>Am I correct to believe that it is the Linux code that does the correct
>thing, so that I should modify the NetBSD code to return the table for
>the C locale?
>
>   /Krister
>
>
>
>Index: netbsd/ctype_noninline.h
>===================================================================
>RCS file: /cvs/gcc/gcc/libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h,v
>retrieving revision 1.1
>diff -c -3 -p -r1.1 ctype_noninline.h
>*** netbsd/ctype_noninline.h	24 Jun 2002 05:48:58 -0000	1.1
>--- netbsd/ctype_noninline.h	11 May 2003 23:11:53 -0000
>***************
>*** 1,6 ****
>  // Locale support -*- C++ -*-
>
>! // Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
>  //
>  // This file is part of the GNU ISO C++ Library.  This library is free
>  // software; you can redistribute it and/or modify it under the
>--- 1,6 ----
>  // Locale support -*- C++ -*-
>
>! // Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
>  //
>  // This file is part of the GNU ISO C++ Library.  This library is free
>  // software; you can redistribute it and/or modify it under the
>***************
>*** 35,41 ****
>
>    const ctype_base::mask*
>    ctype<char>::classic_table() throw()
>!   { return 0; }
>
>    ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
>  		     size_t __refs)
>--- 35,41 ----
>
>    const ctype_base::mask*
>    ctype<char>::classic_table() throw()
>!   { return _ctype_ + 1; }
>
>    ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
>  		     size_t __refs)
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]