This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] libstdc++/22131
Gabriel Dos Reis wrote:
>Paolo Carlini <pcarlini@suse.de> writes:
>
>| *** 1,6 ****
>| // Wrapper for underlying C-language localization -*- C++ -*-
>|
>| ! // Copyright (C) 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
>| --- 1,6 ----
>| // Wrapper for underlying C-language localization -*- C++ -*-
>|
>| ! // Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
> ^
>I was under the impression that all years must be listed, as the
>question of whether the files ceased to be copyrighted FSF in 2004 may
>be raised (pleaee, I'm not a lawyer so don't ask me why anybody would
>do that :-))
>
>
Agreed, I will add 2004.
Actually I'm afraid we have quite a few other instances of this trivial
problem. I will audit asap.
>| __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
>| const __c_locale&)
>| {
>| ! // Assumes __s formatted for "C" locale.
>| ! char* __old = strdup(setlocale(LC_ALL, NULL));
>| ! setlocale(LC_ALL, "C");
>| ! char* __sanity;
>| ! errno = 0;
>
>I know this is not introduced by your patch, but I'm wondering whether
>there is a reason why we would not want to preserve the value errno
>had before making the internal call to strdup.
>
>
Yes, I will change that, seems a good idea to me. Well, everything
related to strdup is a little bit "fuzzy" not being part of the C
standard, but setting errno = 0 at the outset cannot hurt anyway.
Thanks,
Paolo.