summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-05-27 16:55:57 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-05-27 16:55:57 +0000
commitdc798c87712902a115d067b099582c811d9f6951 (patch)
tree19acced0b55fa1d27099f69f4808a3ffe83411e7 /libc
parentf56b42ffd93eb64a1f1aefe7c4f2bd4e2eccafe1 (diff)
Merge changes between r13953 and r14014 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@14015 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc')
-rw-r--r--libc/ChangeLog26
-rw-r--r--libc/NEWS4
-rw-r--r--libc/iconvdata/Makefile2
-rw-r--r--libc/iconvdata/bug-iconv9.c68
-rw-r--r--libc/iconvdata/iso-2022-jp.c12
-rw-r--r--libc/po/ja.po77
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/resource.h10
-rw-r--r--libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h10
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h2
9 files changed, 153 insertions, 58 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index 5f359bbba..34df6baea 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,29 @@
+2011-05-27 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12814]
+ * iconvdata/Makefile (tests): Add bug-iconv9.
+ * iconvdata/bug-iconv9.c: New file.
+
+2011-05-27 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #12814]
+ * iconvdata/iso-2022-jp.c (BODY): Fix invalid variable shadowing.
+
+2011-05-25 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/sys/user.h
+ (struct user_regs_struct): Change intcs field back to cs.
+
+2011-05-25 Ulrich Drepper <drepper@gmail.com>
+
+ * po/ja.po: Update from translation team.
+
+2011-05-23 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12795]
+ * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_RTTIME): Define.
+ * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise.
+
2011-05-20 Andreas Schwab <schwab@redhat.com>
* stdlib/longlong.h: Update from GCC.
diff --git a/libc/NEWS b/libc/NEWS
index f3150f2aa..2cdb0cc42 100644
--- a/libc/NEWS
+++ b/libc/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-5-22
+GNU C Library NEWS -- history of user-visible changes. 2011-5-27
Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -17,7 +17,7 @@ Version 2.14
12545, 12551, 12582, 12583, 12587, 12597, 12601, 12611, 12625, 12626,
12631, 12650, 12653, 12655, 12660, 12671, 12681, 12685, 12711, 12713,
12714, 12717, 12723, 12724, 12734, 12738, 12746, 12766, 12775, 12777,
- 12782, 12788, 12792
+ 12782, 12788, 12792, 12795, 12814
* The RPC implementation in libc is obsoleted. Old programs keep working
but new programs cannot be linked with the routines in libc anymore.
diff --git a/libc/iconvdata/Makefile b/libc/iconvdata/Makefile
index f4e393d1f..5f1893f97 100644
--- a/libc/iconvdata/Makefile
+++ b/libc/iconvdata/Makefile
@@ -71,7 +71,7 @@ include ../Makeconfig
ifeq (yes,$(build-shared))
tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
- tst-iconv6 bug-iconv5 bug-iconv8
+ tst-iconv6 bug-iconv5 bug-iconv8 bug-iconv9
tests-$(OPTION_EGLIBC_LOCALE_CODE) += bug-iconv6 tst-iconv7
ifeq ($(have-thread-library),yes)
tests += bug-iconv3
diff --git a/libc/iconvdata/bug-iconv9.c b/libc/iconvdata/bug-iconv9.c
new file mode 100644
index 000000000..e4ffd593e
--- /dev/null
+++ b/libc/iconvdata/bug-iconv9.c
@@ -0,0 +1,68 @@
+// BZ 12814
+#include <errno.h>
+#include <iconv.h>
+#include <stdio.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+ iconv_t h = iconv_open ("ISO-2022-JP-2", "UTF-8");
+ if (h == (iconv_t) -1)
+ {
+ printf ("cannot load iconv module: %m\n");
+ return 1;
+ }
+
+ // Euro sign
+ static const char inbuf[] = "\xe2\x82\xac";
+ char *in = (char *) inbuf;
+ size_t inlen = sizeof (inbuf) - 1;
+
+ char outbuf[100];
+ char *out = outbuf;
+ size_t outlen = sizeof (outbuf);
+
+ int res = 0;
+ size_t n = iconv (h, &in, &inlen, &out, &outlen);
+ if (n == (size_t) -1)
+ {
+ printf ("iconv failed with %d: %m\n", errno);
+ return 1;
+ }
+ if (n != 0)
+ {
+ printf ("iconv returned %zu, expected zero\n", n);
+ res = 1;
+ }
+ if (in != inbuf + sizeof (inbuf) - 1)
+ {
+ printf ("in advanced by %jd, expected %zu\n",
+ in - inbuf, sizeof (inbuf) - 1);
+ res = 1;
+ }
+ static const char expected[] = "\x1b\x2e\x46\x1b\x4e\x24";
+ if (out - outbuf != sizeof (expected) - 1
+ || memcmp (outbuf, expected, sizeof (expected) - 1) != 0)
+ {
+ fputs ("generated sequence is: \"", stdout);
+ for (size_t i = 0; i < out - outbuf; ++i)
+ printf ("\\x%02hhx", outbuf[i]);
+ fputs ("\", expected \"", stdout);
+ for (size_t i = 0; i < sizeof (expected) - 1; ++i)
+ printf ("\\x%02hhx", expected[i]);
+ puts ("\"");
+ res = 1;
+ }
+
+ if (iconv_close (h) != 0)
+ {
+ puts ("failed closing iconv module");
+ res = 1;
+ }
+
+ return res;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/libc/iconvdata/iso-2022-jp.c b/libc/iconvdata/iso-2022-jp.c
index e14b79615..38e4f6284 100644
--- a/libc/iconvdata/iso-2022-jp.c
+++ b/libc/iconvdata/iso-2022-jp.c
@@ -1,5 +1,5 @@
/* Conversion module for ISO-2022-JP and ISO-2022-JP-2.
- Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000-2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -664,7 +664,7 @@ static const cvlist_t conversion_lists[4] =
\
*outptr++ = ESC; \
*outptr++ = 'N'; \
- *outptr++ = res; \
+ *outptr++ = res & 0x7f; \
written = 3; \
} \
} \
@@ -706,7 +706,7 @@ static const cvlist_t conversion_lists[4] =
\
/* At the beginning of a line, G2 designation is cleared. */ \
if (var == iso2022jp2 && ch == 0x0a) \
- set2 = UNSPECIFIED_set; \
+ set2 = UNSPECIFIED_set; \
} \
else \
{ \
@@ -764,9 +764,9 @@ static const cvlist_t conversion_lists[4] =
++rp; \
if (ch >= rp->start) \
{ \
- unsigned char res = \
+ unsigned char ch2 = \
iso88597_from_ucs4[ch - 0xa0 + rp->idx]; \
- if (res != '\0') \
+ if (ch2 != '\0') \
{ \
if (set2 != ISO88597_set) \
{ \
@@ -789,7 +789,7 @@ static const cvlist_t conversion_lists[4] =
} \
*outptr++ = ESC; \
*outptr++ = 'N'; \
- *outptr++ = res; \
+ *outptr++ = ch2 - 0x80; \
res = __GCONV_OK; \
break; \
} \
diff --git a/libc/po/ja.po b/libc/po/ja.po
index 7ad8fd2cc..cbc7a690b 100644
--- a/libc/po/ja.po
+++ b/libc/po/ja.po
@@ -7,9 +7,10 @@ msgid ""
msgstr ""
"Project-Id-Version: libc 2.11.1\n"
"POT-Creation-Date: 2009-02-06 12:40-0800\n"
-"PO-Revision-Date: 2011-01-08 15:24+0900\n"
+"PO-Revision-Date: 2011-05-25 09:59+0900\n"
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
+"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -3679,9 +3680,9 @@ msgid "cannot change socket to nonblocking mode: %s"
msgstr "ソケットを非ブロッキングモードに変更できません: %s"
#: nscd/connections.c:930
-#, fuzzy, c-format
+#, c-format
msgid "cannot set socket to close on exec: %s"
-msgstr "接続を受け付けるソケットを有効にできません: %s"
+msgstr ""
#: nscd/connections.c:943
#, c-format
@@ -4131,7 +4132,7 @@ msgid "Haven't found \"%s\" in password cache!"
msgstr "パスワードキャッシュ内に \"%s\" が見つかりません!"
#: nscd/pwdcache.c:445
-#, fuzzy, c-format
+#, c-format
msgid "Reloading \"%s\" in password cache!"
msgstr "パスワードキャッシュ内の \"%s\" を再ロードしています!"
@@ -4596,24 +4597,23 @@ msgid "out of memory\n"
msgstr "メモリが足りなくなりました\n"
#: sunrpc/auth_unix.c:350
-#, fuzzy
msgid "auth_unix.c: Fatal marshalling problem"
-msgstr "auth_none.c - 致命的な整列の問題"
+msgstr ""
#: sunrpc/clnt_perr.c:105 sunrpc/clnt_perr.c:121
-#, fuzzy, c-format
+#, c-format
msgid "%s: %s; low version = %lu, high version = %lu"
-msgstr "; low バージョン = %lu, high バージョン = %lu"
+msgstr "%s: %s; low バージョン = %lu、high バージョン = %lu"
#: sunrpc/clnt_perr.c:112
-#, fuzzy, c-format
+#, c-format
msgid "%s: %s; why = %s\n"
-msgstr "; 理由 = "
+msgstr "%s: %s; 理由 = %s\n"
#: sunrpc/clnt_perr.c:114
-#, fuzzy, c-format
+#, c-format
msgid "%s: %s; why = (unknown authentication error - %d)\n"
-msgstr "(不明な認証エラー - %d)"
+msgstr "%s: %s; 理由 = (不明な認証エラーです - %d)\n"
#: sunrpc/clnt_perr.c:159
msgid "RPC: Success"
@@ -4724,14 +4724,12 @@ msgid "Failed (unspecified error)"
msgstr "失敗しました(原因不特定のエラー)"
#: sunrpc/clnt_raw.c:117
-#, fuzzy
msgid "clnt_raw.c: fatal header serialization error"
-msgstr "clnt_raw.c - ヘッダの直列化で致命的エラー."
+msgstr ""
#: sunrpc/pm_getmaps.c:83
-#, fuzzy
msgid "pmap_getmaps.c: rpc problem"
-msgstr "pmap_getmaps rpc が問題です"
+msgstr "pmap_getmaps.c: rpc 問題が発生しました"
#: sunrpc/pmap_clnt.c:129
msgid "Cannot register service"
@@ -4792,9 +4790,9 @@ msgid "%s: C preprocessor failed with exit code %d\n"
msgstr "%s: C プリプロセッサは終了コード %d で失敗しました\n"
#: sunrpc/rpc_main.c:464
-#, fuzzy, c-format
+#, c-format
msgid "illegal nettype: `%s'\n"
-msgstr "不正な nettype です:`%s'\n"
+msgstr "不正な nettype です: `%s'\n"
#: sunrpc/rpc_main.c:1130
#, c-format
@@ -4954,9 +4952,9 @@ msgid "-N\t\tsupports multiple arguments and call-by-value\n"
msgstr ""
#: sunrpc/rpc_main.c:1485
-#, fuzzy, c-format
+#, c-format
msgid "-o outfile\tname of the output file\n"
-msgstr "出力ファイルを生成できません"
+msgstr "-o outfile\t出力ファイルの名前を設定する\n"
#: sunrpc/rpc_main.c:1486
#, c-format
@@ -4989,9 +4987,9 @@ msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
msgstr ""
#: sunrpc/rpc_main.c:1492
-#, fuzzy, c-format
+#, c-format
msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
-msgstr "どのような C プリプロセッサも見つかりません (cpp)\n"
+msgstr "-Y path\t\tC プリプロセッサ (cpp) を見つけるためのディレクトリ名\n"
#: sunrpc/rpc_scan.c:114
msgid "constant or identifier expected"
@@ -5093,9 +5091,8 @@ msgid "rpcinfo: %s is unknown host\n"
msgstr "rpcinfo: %sは不明なホストです\n"
#: sunrpc/svc_run.c:70
-#, fuzzy
msgid "svc_run: - out of memory"
-msgstr "svctcp_create: メモリが足りません\n"
+msgstr "mesvc_run: - メモリが足りません"
#: sunrpc/svc_run.c:90
msgid "svc_run: - poll failed"
@@ -6287,19 +6284,18 @@ msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
msgstr ""
#: timezone/zdump.c:279
-#, fuzzy, c-format
+#, c-format
msgid "%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
-msgstr "%s: 使用法 %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n"
+msgstr "%s: 使用法: %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
#: timezone/zdump.c:296
-#, fuzzy, c-format
+#, c-format
msgid "%s: wild -c argument %s\n"
-msgstr "%s: 引数が多すぎます\n"
+msgstr ""
#: timezone/zdump.c:387
-#, fuzzy
msgid "Error writing to standard output"
-msgstr "エラーを標準出力に書き出し中"
+msgstr ""
#: timezone/zdump.c:410
#, c-format
@@ -6326,13 +6322,13 @@ msgid "warning: "
msgstr "警告: "
#: timezone/zic.c:459
-#, fuzzy, c-format
+#, c-format
msgid ""
"%s: usage is %s [ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
msgstr ""
-"%s: 使用法 %s [ --version ] [ -s ] [ -v ] [ -l ローカル時刻 ] [ -p posixrules ] \\\n"
-"\t[ -d ディレクトリ ] [ -L 閏秒 ] [ -y yearistype ] [ ファイル名 ... ]\n"
+"%s: 使用法: %s [ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
+"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
#: timezone/zic.c:494
msgid "wild compilation-time specification of zic_t"
@@ -6364,9 +6360,8 @@ msgid "%s: More than one -L option specified\n"
msgstr "%s: -L オプションが複数指定されています\n"
#: timezone/zic.c:600
-#, fuzzy
msgid "link to link"
-msgstr "行が長すぎます"
+msgstr ""
#: timezone/zic.c:665
msgid "hard link failed, symbolic link used"
@@ -6606,9 +6601,8 @@ msgid "too many local time types"
msgstr "ローカル時間形式が多すぎます"
#: timezone/zic.c:2268
-#, fuzzy
msgid "UTC offset out of range"
-msgstr "チャンネル番号が範囲外です"
+msgstr "UTC オフセットが範囲外です"
#: timezone/zic.c:2296
msgid "too many leap seconds"
@@ -6811,7 +6805,7 @@ msgstr "%s: %d は正しく記号を拡張しませんでした\n"
#~ msgstr "\"%s\" ファイルの書き込み中にエラーが発生しました"
#~ msgid "Java compiler not found, try installing gcj or set $JAVAC"
-#~ msgstr "Java コンパイラが見つかりません。 gcj をインストールするか、またはt $JAVAC を設定してみてください"
+#~ msgstr "Java コンパイラが見つかりません。 gcj をインストールするか、または $JAVAC を設定してみてください"
#~ msgid "Java virtual machine not found, try installing gij or set $JAVA"
#~ msgstr "Java 仮想マシンが見つかりません。 gij をインストールするか、または $JAVA を設定してみてください"
@@ -7054,13 +7048,8 @@ msgstr "%s: %d は正しく記号を拡張しませんでした\n"
#~ msgid "%s%s argument `%s' too large"
#~ msgstr "引数 `%3$s' に対する %1$s%2$s が大きすぎます"
-#, fuzzy
#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr ""
-#~ "#-#-#-#-# gnulib-2.0.0.3462.e9796.ja.po (gnulib 2.0.0.3462.e9796) #-#-#-#-#\n"
-#~ "%s: 不正なオプション -- %c\n"
-#~ "#-#-#-#-# libc-2.11.1.ja.po.orig (libc 2.11.1) #-#-#-#-#\n"
-#~ "%s: 不正なオプションです -- %c\n"
+#~ msgstr "%s: 不正なオプションです -- %c\n"
#~ msgid "block size"
#~ msgstr "ブロックサイズ"
diff --git a/libc/sysdeps/unix/sysv/linux/bits/resource.h b/libc/sysdeps/unix/sysv/linux/bits/resource.h
index ca2c9f016..336c19211 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/resource.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994, 1996-2000, 2004, 2005, 2008, 2009, 2010
+ Copyright (C) 1994, 1996-2000, 2004, 2005, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -100,7 +100,13 @@ enum __rlimit_resource
__RLIMIT_RTPRIO = 14,
#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
- __RLIMIT_NLIMITS = 15,
+ /* Maximum CPU time in µs that a process scheduled under a real-time
+ scheduling policy may consume without making a blocking system
+ call before being forcibly descheduled. */
+ __RLIMIT_RTTIME = 15,
+#define RLIMIT_RTTIME __RLIMIT_RTTIME
+
+ __RLIMIT_NLIMITS = 16,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
#define RLIM_NLIMITS __RLIM_NLIMITS
diff --git a/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
index 6e4fc97e5..04d33e4aa 100644
--- a/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
+++ b/libc/sysdeps/unix/sysv/linux/sparc/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux/SPARC version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2008, 2009
+ Copyright (C) 1994, 1996-2000, 2004, 2005, 2008, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -100,7 +100,13 @@ enum __rlimit_resource
__RLIMIT_RTPRIO = 14,
#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
- __RLIMIT_NLIMITS = 15,
+ /* Maximum CPU time in µs that a process scheduled under a real-time
+ scheduling policy may consume without making a blocking system
+ call before being forcibly descheduled. */
+ __RLIMIT_RTTIME = 15,
+#define RLIMIT_RTTIME __RLIMIT_RTTIME
+
+ __RLIMIT_NLIMITS = 16,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
#define RLIM_NLIMITS __RLIM_NLIMITS
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h b/libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h
index c54cca80a..e4423cf43 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sys/user.h
@@ -61,7 +61,7 @@ struct user_regs_struct
unsigned long int rdi;
unsigned long int orig_rax;
unsigned long int rip;
- unsigned long int intcs;
+ unsigned long int cs;
unsigned long int eflags;
unsigned long int rsp;
unsigned long int ss;