X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fduplocale.c;h=dc28243e3531ab56f8991158da81a778494a21f0;hb=946c971f93d58ec52508dbcc36b59ca9f925bf31;hp=680eeb1a6e0c0d2b1bb3389b3122772e905878ae;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/duplocale.c b/lib/duplocale.c index 680eeb1a6..dc28243e3 100644 --- a/lib/duplocale.c +++ b/lib/duplocale.c @@ -1,5 +1,5 @@ /* Duplicate a locale object. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,12 +32,14 @@ locale_t rpl_duplocale (locale_t locale) { /* Work around crash in the duplocale function in glibc < 2.12. - See . */ + See . + Also, on AIX 7.1, duplocale(LC_GLOBAL_LOCALE) returns (locale_t)0 with + errno set to EINVAL. */ if (locale == LC_GLOBAL_LOCALE) { /* Create a copy of the locale by fetching the name of each locale category, starting with LC_CTYPE. */ - static struct { int cat; int mask; } categories[] = + static struct { int cat; int mask; } const categories[] = { { LC_NUMERIC, LC_NUMERIC_MASK }, { LC_TIME, LC_TIME_MASK },