diff --git a/ChangeLog b/ChangeLog index 73ea01bf52..6455a968c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-10-14 Ulrich Drepper + [BZ #1468] + * sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: Fix values for + oFPREGS, oSIGMASK, oFPREGSMEM, and oMXCSR. + Patch by Nicholas Miell . + [BZ #1460] * time/asctime.c (asctime_internal): New function, derived from asctime_r. Takes additional parameter which is the buffer length. diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 504ba5eb4c..00bf9ea7be 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,10 @@ +2005-10-14 Ulrich Drepper + + [BZ #870] + * locales/ku_TR: New file. + * SUPPORTED (SUPPORTED-LOCALES): Add ku_TR.ISO-8859-9 and + ku_TR.UTF-8. + 2005-10-13 Ulrich Drepper [BZ #533] diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED index b9634853fb..d263e91f56 100644 --- a/localedata/SUPPORTED +++ b/localedata/SUPPORTED @@ -226,6 +226,8 @@ km_KH/UTF-8 \ kn_IN/UTF-8 \ ko_KR.EUC-KR/EUC-KR \ ko_KR.UTF-8/UTF-8 \ +ku_TR.UTF-8/UTF-8 \ +ku_TR/ISO-8859-9 \ kw_GB.UTF-8/UTF-8 \ kw_GB/ISO-8859-1 \ ky_KG/UTF-8 \ diff --git a/localedata/locales/ku_TR b/localedata/locales/ku_TR new file mode 100644 index 0000000000..b1486f9b12 --- /dev/null +++ b/localedata/locales/ku_TR @@ -0,0 +1,215 @@ +escape_char / +comment_char % + +% Kurdish (latin) language locale for Turkey +% Source: Kader DILSIZ +% Contact: Kader DILSIZ, Pablo Saratxaga +% Email: kader@ikader.com, pablo@mandrakesoft.com +% Tel: +% Fax: +% Language: ku +% Territory: TR +% Revision: 0.1 +% Date: 2003-07-27 +% Users: general +% Charset: UTF-8 +% Distribution and use is free, also +% for commercial purposes. +% History: + +LC_IDENTIFICATION +title "Kurdish (latin) locale for Turkey" +source "Kader DILSIZ" +address "" +contact "Kader DILSIZ, Pablo Saratxaga" +email "kader@ikader.com, pablo@mandrakesoft.com" +tel "" +fax "" +language "Kurdish" +territory "Turkey" +revision "0.1" +date "2003-07-27" +% +category "ku_TR:2000";LC_IDENTIFICATION +category "ku_TR:2000";LC_CTYPE +category "ku_TR:2000";LC_COLLATE +category "ku_TR:2000";LC_TIME +category "ku_TR:2000";LC_NUMERIC +category "ku_TR:2000";LC_MONETARY +category "ku_TR:2000";LC_MESSAGES +category "ku_TR:2000";LC_PAPER +category "ku_TR:2000";LC_NAME +category "ku_TR:2000";LC_ADDRESS +category "ku_TR:2000";LC_TELEPHONE +category "ku_TR:2000";LC_MEASUREMENT + +END LC_IDENTIFICATION + +LC_CTYPE +copy "tr_TR" +END LC_CTYPE + +LC_COLLATE +copy "iso14651_t1" + +%% a b c c, d e e> f g h i i> j k l m n o p q r s s, t u u> v w x y z + +collating-symbol +collating-symbol > +collating-symbol +collating-symbol > +collating-symbol +collating-symbol > + +reorder-after + +reorder-after +> +reorder-after + + +> +reorder-after + +reorder-after +> + +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE + +reorder-after + >;;;IGNORE +reorder-after + >;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + >;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + >;;;IGNORE + +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE + +reorder-after + >;;;IGNORE +reorder-after + >;;;IGNORE + +reorder-end + +END LC_COLLATE + +LC_MONETARY +copy "tr_TR" +END LC_MONETARY + +LC_NUMERIC +copy "tr_TR" +END LC_NUMERIC + +LC_TIME +abday "";"";/ + "";"";/ + "";"";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% format: %A %d %B %Y %T %Z +d_t_fmt "" +% format: %d/%m/%Y +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +% format: %A %d %B %Y +date_fmt "" +END LC_TIME + +LC_MESSAGES +yesstr "" +nostr "" +% eEdDyY +yesexpr "" +% nN +noexpr "" +END LC_MESSAGES + +LC_PAPER +copy "tr_TR" +END LC_PAPER + +LC_TELEPHONE +copy "tr_TR" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "tr_TR" +END LC_MEASUREMENT + +LC_NAME +% format: %d%t%g%t%m%t%f +name_fmt "/ +" +% TODO +% Sayżn +name_gen "" +% "M." +name_mr "" +% "Jne" +name_mrs "" +name_ms "" +% "Kc,k" +name_miss "" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +% TODO +country_name "" +country_post "TR" +country_ab2 "TR" +country_ab3 "TUR" +country_num 792 +country_isbn 975 +country_car "TR" +% "kurdi" +lang_name "" +lang_ab "ku" +lang_term "kur" +lang_lib "kur" +END LC_ADDRESS diff --git a/stdlib/Makefile b/stdlib/Makefile index 9a9ff8bd45..fa65c95121 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -63,7 +63,8 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ test-canon test-canon2 tst-strtoll tst-environ \ tst-xpg-basename tst-random tst-random2 tst-bsearch \ tst-limits tst-rand48 bug-strtod tst-setcontext \ - test-a64l tst-qsort tst-system testmb2 bug-strtod2 + test-a64l tst-qsort tst-system testmb2 bug-strtod2 \ + tst-ucontext-off include ../Makeconfig diff --git a/stdlib/tst-ucontext-off.c b/stdlib/tst-ucontext-off.c new file mode 100644 index 0000000000..2e97f21aba --- /dev/null +++ b/stdlib/tst-ucontext-off.c @@ -0,0 +1,35 @@ +#include +#include +#include + +#include + +static int +do_test (void) +{ + int nerrors = 0; + int ntests = 0; + +#define TEST(member, val) \ + do { \ + if (offsetof (struct ucontext, member) != val) \ + { \ + printf ("offsetof(%s) = %zu, %s = %zu\n", \ + #member, offsetof (struct ucontext, member), \ + #val, (size_t) val); \ + ++nerrors; \ + } \ + ++ntests; \ + } while (0) + +#ifdef TESTS + TESTS +#endif + + printf ("%d errors in %d tests\n", nerrors, ntests); + + return nerrors != 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/sysdeps/unix/sysv/linux/i386/ucontext_i.h b/sysdeps/unix/sysv/linux/i386/ucontext_i.h index d6efca41b1..c6319f2391 100644 --- a/sysdeps/unix/sysv/linux/i386/ucontext_i.h +++ b/sysdeps/unix/sysv/linux/i386/ucontext_i.h @@ -1,6 +1,6 @@ /* Offsets and other constants needed in the *context() function implementation. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2005 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 @@ -39,3 +39,23 @@ #define oFPREGS 96 #define oSIGMASK 108 #define oFPREGSMEM 236 + +/* Tests run in stdlib/tst-ucontext-off. */ +#define TESTS \ + TEST (uc_link, oLINK); \ + TEST (uc_stack.ss_sp, oSS_SP); \ + TEST (uc_stack.ss_size, oSS_SIZE); \ + TEST (uc_mcontext.gregs[REG_GS], oGS); \ + TEST (uc_mcontext.gregs[REG_FS], oFS); \ + TEST (uc_mcontext.gregs[REG_EDI], oEDI); \ + TEST (uc_mcontext.gregs[REG_ESI], oESI); \ + TEST (uc_mcontext.gregs[REG_EBP], oEBP); \ + TEST (uc_mcontext.gregs[REG_ESP], oESP); \ + TEST (uc_mcontext.gregs[REG_EBX], oEBX); \ + TEST (uc_mcontext.gregs[REG_EDX], oEDX); \ + TEST (uc_mcontext.gregs[REG_ECX], oECX); \ + TEST (uc_mcontext.gregs[REG_EAX], oEAX); \ + TEST (uc_mcontext.gregs[REG_EIP], oEIP); \ + TEST (uc_mcontext.fpregs, oFPREGS); \ + TEST (uc_sigmask, oSIGMASK); \ + TEST (__fpregs_mem, oFPREGSMEM); diff --git a/sysdeps/unix/sysv/linux/x86_64/ucontext_i.h b/sysdeps/unix/sysv/linux/x86_64/ucontext_i.h index 5451a308ee..e5099084cf 100644 --- a/sysdeps/unix/sysv/linux/x86_64/ucontext_i.h +++ b/sysdeps/unix/sysv/linux/x86_64/ucontext_i.h @@ -1,6 +1,6 @@ /* Offsets and other constants needed in the *context() function implementation for Linux/x86-64. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2005 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 @@ -41,7 +41,29 @@ #define oRAX 144 #define oRCX 152 #define oRIP 168 -#define oFPREGS 208 -#define oSIGMASK 280 -#define oFPREGSMEM 408 -#define oMXCSR 432 +#define oFPREGS 224 +#define oSIGMASK 296 +#define oFPREGSMEM 424 +#define oMXCSR 448 + +/* Tests run in stdlib/tst-ucontext-off. */ +#define TESTS \ + TEST (uc_mcontext.gregs[REG_RBP], oRBP); \ + TEST (uc_mcontext.gregs[REG_RSP], oRSP); \ + TEST (uc_mcontext.gregs[REG_RBX], oRBX); \ + TEST (uc_mcontext.gregs[REG_R8], oR8); \ + TEST (uc_mcontext.gregs[REG_R9], oR9); \ + TEST (uc_mcontext.gregs[REG_R12], oR12); \ + TEST (uc_mcontext.gregs[REG_R13], oR13); \ + TEST (uc_mcontext.gregs[REG_R14], oR14); \ + TEST (uc_mcontext.gregs[REG_R15], oR15); \ + TEST (uc_mcontext.gregs[REG_RDI], oRDI); \ + TEST (uc_mcontext.gregs[REG_RSI], oRSI); \ + TEST (uc_mcontext.gregs[REG_RDX], oRDX); \ + TEST (uc_mcontext.gregs[REG_RAX], oRAX); \ + TEST (uc_mcontext.gregs[REG_RCX], oRCX); \ + TEST (uc_mcontext.gregs[REG_RIP], oRIP); \ + TEST (uc_mcontext.fpregs, oFPREGS); \ + TEST (uc_sigmask, oSIGMASK); \ + TEST (__fpregs_mem, oFPREGSMEM); \ + TEST (__fpregs_mem.mxcsr, oMXCSR); diff --git a/time/bug-asctime_r.c b/time/bug-asctime_r.c index 2579a6a3b0..86651ef1c5 100644 --- a/time/bug-asctime_r.c +++ b/time/bug-asctime_r.c @@ -13,12 +13,18 @@ do_test (void) tp->tm_year = 10000 - 1900; char buf[1000]; errno = 0; + buf[26] = '\xff'; char *s = asctime_r (tp, buf); if (s != NULL || errno != EOVERFLOW) { puts ("asctime_r did not fail correctly"); result = 1; } + if (buf[26] != '\xff') + { + puts ("asctime_r overwrote 27th byte in buffer"); + result = 1; + } return result; }