From: Ulrich Drepper Date: Sat, 6 Dec 2008 02:13:20 +0000 (+0000) Subject: 2008-12-05 Joseph Myers X-Git-Tag: upstream/2.30~13941 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8680179fdbaa69ba5c3d6056adf32c68d98e171a;p=external%2Fglibc.git 2008-12-05 Joseph Myers Ulrich Drepper * scripts/firstversion.awk: Use custom comparison function to compare version numbers. * scripts/versions.awk: Use sort invocation which can handle multi-digit sub-version numbers. --- diff --git a/ChangeLog b/ChangeLog index 004af8f..ab3454f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-05 Joseph Myers + Ulrich Drepper + + * scripts/firstversion.awk: Use custom comparison function to compare + version numbers. + * scripts/versions.awk: Use sort invocation which can handle + multi-digit sub-version numbers. + 2008-12-04 Ulrich Drepper * locale/programs/ld-address.c (DEFINE_LANGUAGE_CODE2): Define. diff --git a/localedata/ChangeLog b/localedata/ChangeLog index bc339ff..754d880 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2008-12-05 Ulrich Drepper + + * locales/hne_IN: New file. + Contributed by Pravin Satpute . + 2008-10-31 Ulrich Drepper [BZ #6920] diff --git a/localedata/locales/hne_IN b/localedata/locales/hne_IN new file mode 100644 index 0000000..b32398a --- /dev/null +++ b/localedata/locales/hne_IN @@ -0,0 +1,180 @@ +comment_char % +escape_char / +% Chhattisgarhi language locale for India. +% Contributed by Pravin Satpute and +% Ravishankar Shrivastava . + +LC_IDENTIFICATION +title "Chhattisgarhi language locale for India" +source "Red Hat, Pune" +address "Marisfot III, Marigold Premises, East-Wing, Kalyaninagar, Pune, India-411014" +contact "" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Chhattisgarhi" +territory "India" +revision "1.0" +date "2008-12-03" +% +category "hne_IN:2008";LC_IDENTIFICATION +category "hne_IN:2008";LC_CTYPE +category "hne_IN:2008";LC_COLLATE +category "hne_IN:2008";LC_TIME +category "hne_IN:2008";LC_NUMERIC +category "hne_IN:2008";LC_MONETARY +category "hne_IN:2008";LC_MESSAGES +category "hne_IN:2008";LC_PAPER +category "hne_IN:2008";LC_NAME +category "hne_IN:2008";LC_ADDRESS +category "hne_IN:2008";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "hi_IN" +END LC_CTYPE + +LC_COLLATE +copy "hi_IN" +END LC_COLLATE + +LC_MONETARY +copy "hi_IN" +END LC_MONETARY + + +LC_NUMERIC +copy "hi_IN" +END LC_NUMERIC + + +LC_TIME +% This is the POSIX Locale definition for the LC_TIME category. +% These are generated based on XML base Locale difintion file +% for IBM Class for Unicode/Java +% +% Abbreviated weekday names (%a) +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Full weekday names (%A) +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Abbreviated month names (%b) +abmon "";/ + "";/ + "";/ + "";/ + "";"";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Full month names (%B) +mon "";/ + "";/ + "";/ + "";/ + "";"";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% +% Equivalent of AM PM +am_pm "";/ + "" +% +% Appropriate date and time representation +% %A %d %b %Y%I:%M:%S %Z +d_t_fmt "/ +/ +" +% +% Appropriate date representation +% %A %d %b %Y +d_fmt "/ +" +% +% Appropriate time representation +% %I:%M:%S %Z +t_fmt "/ +" +% +% Appropriate 12 h time representation (%r) +t_fmt_ampm "/ +" +% +date_fmt "/ +/ +" +END LC_TIME + + +LC_MESSAGES +yesexpr "" +noexpr "" +yesstr "" +nostr "" +END LC_MESSAGES + + +LC_PAPER +copy "hi_IN" +END LC_PAPER + + +LC_NAME +% This is the ISO_IEC TR14652 Locale definition for the +% LC_NAME category. +% +name_fmt "/ +" +name_gen "" +name_mr "" +name_mrs "" +name_miss "" +name_ms "" + +END LC_NAME + + +LC_ADDRESS +% This is the ISO_IEC TR14652 Locale definition for the +% LC_ADDRESS +postal_fmt "/ +" + +country_ab2 "" +country_ab3 "" +country_num 356 +lang_term "" + +END LC_ADDRESS + + +LC_TELEPHONE +copy "hi_IN" +END LC_TELEPHONE + + +LC_MEASUREMENT +copy "hi_IN" +END LC_MEASUREMENT diff --git a/scripts/firstversions.awk b/scripts/firstversions.awk index 8da92ae..4a20fc0 100644 --- a/scripts/firstversions.awk +++ b/scripts/firstversions.awk @@ -1,6 +1,31 @@ # Script to preprocess Versions.all lists based on "earliest version" # specifications in the shlib-versions file. +# Return -1, 0 or 1 according to whether v1 is less than, equal to or +# greater than v2 as a version string. Simplified from GNU Autoconf +# version; this one does not need to handle .0x fraction-style versions. +function vers_compare (v1, v2) +{ + while (length(v1) && length(v2)) { + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue; + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue; + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1); + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1); + d1 += 0; + d2 += 0; + } else { + d1 = substr(v1, 1, 1); v1 = substr(v1, 2); + d2 = substr(v2, 1, 1); v2 = substr(v2, 2); + } + if (d1 < d2) return -1; + if (d1 > d2) return 1; + } + if (length(v2)) return -1; + if (length(v1)) return 1; + return 0; +} + NF > 2 && $2 == ":" { for (i = 0; i <= NF - 3; ++i) firstversion[$1, i] = $(3 + i); @@ -25,10 +50,8 @@ $1 == "}" { { if ((thislib, idx[thislib]) in firstversion) { - # XXX relative string comparison loses if we ever have multiple digits - # between dots in GLIBC_x.y[.z] names. f = v = firstversion[thislib, idx[thislib]]; - while ($1 >= v) { + while (vers_compare($1, v) >= 0) { delete firstversion[thislib, idx[thislib]]; idx[thislib]++; if ((thislib, idx[thislib]) in firstversion) @@ -39,7 +62,7 @@ $1 == "}" { if ($1 == v || $1 == f) # This version was the specified earliest version itself. print; - else if ($1 < v) { + else if (vers_compare($1, v) < 0) { # This version is older than the specified earliest version. print " " $1, "=", v; # Record that V has been referred to, so we will be sure to emit it diff --git a/scripts/versions.awk b/scripts/versions.awk index e642b3d..22b1c8e 100644 --- a/scripts/versions.awk +++ b/scripts/versions.awk @@ -28,10 +28,8 @@ BEGIN { close(defsfile); tmpfile = buildroot "Versions.tmp"; - # Note this sorting presumes only single digits between dots for proper - # numeric ordering. sort -n doesn't do quite the right thing either, - # and in some non-GNU sort implementations does not sort at all. - sort = "sort > " tmpfile; + # POSIX sort needed. + sort = "sort -t. -k 1,1 -k 2n,2n -k 3 > " tmpfile; } # Remove comment lines. @@ -135,5 +133,5 @@ END { printf("\n"); closeversion(oldver, veryoldver); close_and_move(outfile, real_outfile); - system("rm -f " tmpfile); + #system("rm -f " tmpfile); }