From 1e545d0185072ac0d4646223d509c3692cbe550a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Jan 2009 04:33:02 +0000 Subject: [PATCH] [BZ #9705] 2009-01-08 Ulrich Drepper [BZ #9705] * locales/el_CY: Cyprus uses the Euro. --- localedata/ChangeLog | 5 +++++ localedata/locales/el_CY | 4 ++-- nss/nss_files/files-parse.c | 20 +++++++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 7fb68e4f46..7c8da1482b 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2009-01-08 Ulrich Drepper + + [BZ #9705] + * locales/el_CY: Cyprus uses the Euro. + 2008-12-31 Ulrich Drepper * locales/iso14651_t1_common: Fix sorting of U+0AB3. diff --git a/localedata/locales/el_CY b/localedata/locales/el_CY index 66acb12508..7213924233 100644 --- a/localedata/locales/el_CY +++ b/localedata/locales/el_CY @@ -44,8 +44,8 @@ copy "el_GR" END LC_MESSAGES LC_MONETARY -int_curr_symbol "" -currency_symbol "" +int_curr_symbol "" +currency_symbol "" mon_decimal_point "" mon_thousands_sep "" mon_grouping 3 diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c index 3ba37c8941..66615da26c 100644 --- a/nss/nss_files/files-parse.c +++ b/nss/nss_files/files-parse.c @@ -1,5 +1,5 @@ /* Common code for file-based database parsers in nss_files module. - Copyright (C) 1996-2000, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2000, 2003, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -127,10 +127,24 @@ nss_files_parse_hidden_def (parse_line) } \ } +/* Helper function. */ +static inline uint32_t +__attribute__ ((always_inline)) +strtou32 (const char *nptr, char **endptr, int base) +{ + unsigned long int val = strtoul (nptr, endptr, base); + + /* Match the 32-bit behavior on 64-bit platforms. */ + if (sizeof (long int) > 4 && val > 0xffffffff) + val = 0xffffffff; + + return val; +} + # define INT_FIELD(variable, terminator_p, swallow, base, convert) \ { \ char *endp; \ - variable = convert (strtoul (line, &endp, base)); \ + variable = convert (strtou32 (line, &endp, base)); \ if (endp == line) \ return 0; \ else if (terminator_p (*endp)) \ @@ -148,7 +162,7 @@ nss_files_parse_hidden_def (parse_line) if (*line == '\0') \ /* We expect some more input, so don't allow the string to end here. */ \ return 0; \ - variable = convert (strtoul (line, &endp, base)); \ + variable = convert (strtou32 (line, &endp, base)); \ if (endp == line) \ variable = default; \ if (terminator_p (*endp)) \ -- 2.11.4.GIT