From 38e68573bc08179bb9418038e7c2db7e576eaea5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Feb 2003 20:53:16 +0000 Subject: Update. 2003-02-01 Ulrich Drepper * time/tzfile.c (__tzfile_compute): Change return value type to void. Adjust return statements. * include/time.h (__tzfile_compute): Adjust prototype. 2003-02-01 Jim Meyering * time/tzset.c (__tz_convert): Remove dead code; __tzfile_compute always returns 1. 2003-01-31 Steven Munroe * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c [!__ASSUME_NEW_PRCTL_SYSCALL]: Noop prctl syscall and set ENOSYS. 2003-01-31 Steven Munroe * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Generate ENOSYS stub. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Likewise. 2003-01-31 Steven Munroe * sysdeps/unix/sysv/linux/configure.in: Change arch_minimum_kernel back to 2.4.19 for powerpc64. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_NEW_PRCTL_SYSCALL): Define for powerpc64. (__ASSUME_NEW_RT_SIGRETURN_SYSCALL): Define for powerpc64. 2003-02-01 Ulrich Drepper * wcsmbs/wcscpy.c (wcscpy): Add alternative implementation for platforms with strange alignment requirements on wchar_t. --- ChangeLog | 40 ++++ include/time.h | 6 +- localedata/locales/ml_IN | 207 +++++++++++++++++++++ sysdeps/unix/sysv/linux/configure.in | 2 +- sysdeps/unix/sysv/linux/kernel-features.h | 13 ++ .../unix/sysv/linux/powerpc/powerpc64/fe_nomask.c | 5 +- .../unix/sysv/linux/powerpc/powerpc64/getcontext.S | 14 +- .../sysv/linux/powerpc/powerpc64/makecontext.S | 16 ++ .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 18 +- .../sysv/linux/powerpc/powerpc64/swapcontext.S | 18 +- time/tzfile.c | 8 +- time/tzset.c | 9 +- wcsmbs/wcscpy.c | 35 +++- 13 files changed, 362 insertions(+), 29 deletions(-) create mode 100644 localedata/locales/ml_IN diff --git a/ChangeLog b/ChangeLog index 1f9fa22aff..80df15dc09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,43 @@ +2003-02-01 Ulrich Drepper + + * time/tzfile.c (__tzfile_compute): Change return value type to + void. Adjust return statements. + * include/time.h (__tzfile_compute): Adjust prototype. + +2003-02-01 Jim Meyering + + * time/tzset.c (__tz_convert): Remove dead code; __tzfile_compute + always returns 1. + +2003-01-31 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c + [!__ASSUME_NEW_PRCTL_SYSCALL]: Noop prctl syscall and set ENOSYS. + +2003-01-31 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S + [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Generate ENOSYS stub. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S + [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S + [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S + [!__ASSUME_NEW_RT_SIGRETURN_SYSCALL]: Likewise. + +2003-01-31 Steven Munroe + + * sysdeps/unix/sysv/linux/configure.in: Change arch_minimum_kernel + back to 2.4.19 for powerpc64. + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_NEW_PRCTL_SYSCALL): Define for powerpc64. + (__ASSUME_NEW_RT_SIGRETURN_SYSCALL): Define for powerpc64. + +2003-02-01 Ulrich Drepper + + * wcsmbs/wcscpy.c (wcscpy): Add alternative implementation for + platforms with strange alignment requirements on wchar_t. + 2003-01-31 Andreas Schwab * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove __GI_* diff --git a/include/time.h b/include/time.h index aedef2dd67..daf4c27495 100644 --- a/include/time.h +++ b/include/time.h @@ -36,9 +36,9 @@ extern int __use_tzfile attribute_hidden; extern void __tzfile_read (const char *file, size_t extra, char **extrap); -extern int __tzfile_compute (time_t timer, int use_localtime, - long int *leap_correct, int *leap_hit, - struct tm *tp); +extern void __tzfile_compute (time_t timer, int use_localtime, + long int *leap_correct, int *leap_hit, + struct tm *tp); extern void __tzfile_default (const char *std, const char *dst, long int stdoff, long int dstoff); diff --git a/localedata/locales/ml_IN b/localedata/locales/ml_IN new file mode 100644 index 0000000000..3da216f3b3 --- /dev/null +++ b/localedata/locales/ml_IN @@ -0,0 +1,207 @@ +comment_char % +escape_char / +% Malayalam language locale for India. +% Contributed by Free Software Foundation of India http://gnu.org.in +% E-Mail : gnu@gnu.org.in + +LC_IDENTIFICATION +title " Malayalam language locale for India" +source "Free Software Foundation of India, Trivandrum" +address "" +contact "" +email "bug-glibc@gnu.org" +tel "" +fax "" +language "Malayalam" +territory "India" +revision "0.1" +date "2003-February-01" +% +category "ml_IN:2000";LC_IDENTIFICATION +category "ml_IN:2000";LC_CTYPE +category "ml_IN:2000";LC_COLLATE +category "ml_IN:2000";LC_TIME +category "ml_IN:2000";LC_NUMERIC +category "ml_IN:2000";LC_MONETARY +category "ml_IN:2000";LC_MESSAGES +category "ml_IN:2000";LC_PAPER +category "ml_IN:2000";LC_NAME +category "ml_IN:2000";LC_ADDRESS +category "ml_IN:2000";LC_TELEPHONE +category "ml_IN:2000";LC_MEASUREMENT +END LC_IDENTIFICATION +LC_CTYPE +copy "i18n" +translit_start +include "translit_combining";"" +translit_end +END LC_CTYPE +% +% +LC_COLLATE + +% Copy the template from ISO/IEC 14651 +copy "iso14651_t1" + +END LC_COLLATE +LC_MONETARY +% This is the POSIX Locale definition the LC_MONETARY category +% generated by IBM Basic CountryPack Transformer. +% These are generated based on XML base Locale defintion file +% for IBM Class for Unicode. +% +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;2 +positive_sign "" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 1 +p_sep_by_space 1 +n_cs_precedes 1 +n_sep_by_space 1 +p_sign_posn 1 +n_sign_posn 1 +% +END LC_MONETARY +% +LC_NUMERIC +% This is the POSIX Locale definition for the LC_NUMERIC category. +% +decimal_point "" +thousands_sep "" +grouping 3;2 +% +END LC_NUMERIC +% +LC_TIME +% This is the POSIX Locale definition for the LC_TIME category +% generated by IBM Basic CountryPack Transformer. +% These are generated based on XML base Locale difintion file +% for IBM Class for Unicode. +% +% 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 "" +% +END LC_TIME +% +LC_MESSAGES +% This is the POSIX Locale definition for the LC_MESSAGES category +% generated by IBM Basic CountryPack Transformer. +% These are generated based on XML base Locale difintion file +% for IBM Class for Unicode. +% +% ^[\u0d05\u0d24\u0d46] +yesexpr "" +% +% +% ^[\u0d05\u0d32\u0d4d\u0d32] +noexpr "" +% +% \u0d05\u0d24\u0d46 +yesstr "" +% +% \u0d05\u0d32\u0d4d\u0d32 +nostr "" +% +END LC_MESSAGES +% +LC_PAPER +% This is the ISO_IEC TR14652 Locale definition for the LC_PAPER category +% generated by IBM Basic CountryPack Transformer. +height 297 +width 210 +END LC_PAPER +% +LC_NAME +% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category +% generated by IBM Basic CountryPack Transformer. +% +% +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 category +% generated by IBM Basic CountryPack Transformer. +postal_fmt "" +END LC_ADDRESS +% +LC_TELEPHONE +% This is the ISO_IEC TR14652 Locale definition for the LC_TELEPHONE +% generated by IBM Basic CountryPack Transformer. +tel_int_fmt "" +END LC_TELEPHONE +% +LC_MEASUREMENT +% This is the ISO_IEC TR14652 Locale definition for the LC_MEASUREMENT +% category generated by IBM Basic CountryPack Transformer. +measurement 1 +END LC_MEASUREMENT +% \ No newline at end of file diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in index 7947743f1a..462965f4f6 100644 --- a/sysdeps/unix/sysv/linux/configure.in +++ b/sysdeps/unix/sysv/linux/configure.in @@ -80,7 +80,7 @@ case "$machine" in arch_minimum_kernel=2.0.10 ;; powerpc/powerpc64) - arch_minimum_kernel=2.4.21 + arch_minimum_kernel=2.4.19 ;; s390/s390-32) libc_cv_gcc_unwind_find_fde=yes diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 3159dd1ada..45cd3e59c8 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -210,6 +210,19 @@ # define __ASSUME_MMAP2_SYSCALL 1 #endif +/* Starting with 2.4.21 PowerPC64 implements the new prctl syscall. + This allows applications to get/set the Floating Point Exception Mode. */ +#if __LINUX_KERNEL_VERSION >= (132096+21) && defined __powerpc64__ +# define __ASSUME_NEW_PRCTL_SYSCALL 1 +#endif + +/* Starting with 2.4.21 PowerPC64 implements the new rt_sigreturn syscall. + The new rt_sigreturn takes an ucontext pointer allowing rt_sigreturn + to be used in the set/swapcontext implementation. */ +#if __LINUX_KERNEL_VERSION >= (132096+21) && defined __powerpc64__ +# define __ASSUME_NEW_RT_SIGRETURN_SYSCALL 1 +#endif + /* On x86, the set_thread_area syscall was introduced in 2.5.29, but its semantics was changed in 2.5.30, and again after 2.5.31. */ #if __LINUX_KERNEL_VERSION >= 132384 && defined __i386__ diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c index 16619cddd2..6a0a82c703 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c @@ -26,8 +26,11 @@ const fenv_t * __fe_nomask_env (void) { +#ifdef __ASSUME_NEW_PRCTL_SYSCALL INTERNAL_SYSCALL_DECL (err); INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); - +#else + __set_errno (ENOSYS); +#endif return FE_ENABLED_ENV; } diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S index 59dfb82ef5..ddbf40b8d9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S @@ -21,9 +21,11 @@ #define __ASSEMBLY__ #include +#include #include "ucontext_i.h" ENTRY(__getcontext) +#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 @@ -126,8 +128,18 @@ ENTRY(__getcontext) addi r5,r3,UCONTEXT_SIGMASK li r4,0 li r3,SIG_BLOCK - bl .sigprocmask + bl JUMPTARGET(sigprocmask) nop +#else + /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub. */ + mflr r0 + std r0,FRAME_LR_SAVE(r1) + stdu r1,-128(r1) + li r3,ENOSYS + bl JUMPTARGET(__syscall_error) + nop + li r3,-1 +#endif ld r0,128+FRAME_LR_SAVE(r1) addi r1,r1,128 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S index 29dd17ffe4..08ce90177b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S @@ -22,8 +22,10 @@ #define __ASSEMBLY__ #include #include "ucontext_i.h" +#include ENTRY(__makecontext) +#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL /* Save parameters into the parameter save area of callers frame. */ std r3,FRAME_PARM1_SAVE(r1) /* ucontext_t *ucp */ std r4,FRAME_PARM2_SAVE(r1) /* void (*func)(void) */ @@ -156,6 +158,20 @@ L(gotexitcodeaddr): addi r1,r1,128 mtlr r0 blr +#else + /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub. */ + mflr r0 + std r0,FRAME_LR_SAVE(r1) + stdu r1,-128(r1) + li r3,ENOSYS + bl JUMPTARGET(__syscall_error) + nop + li r3,-1 + ld r0,128+FRAME_LR_SAVE(r1) + addi r1,r1,128 + mtlr r0 + blr +#endif END(__makecontext) weak_alias(__makecontext, makecontext) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S index d503cbbf3e..fa37abd6da 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S @@ -22,8 +22,10 @@ #define __ASSEMBLY__ #include #include "ucontext_i.h" +#include ENTRY(__setcontext) +#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL mflr r0 std r31,-8(1) std r0,FRAME_LR_SAVE(r1) @@ -47,7 +49,7 @@ ENTRY(__setcontext) li r5,0 addi r4,r3,UCONTEXT_SIGMASK li r3,SIG_SETMASK - bl .sigprocmask + bl JUMPTARGET(sigprocmask) nop cmpdi r3,0 bne L(error_exit) @@ -156,6 +158,20 @@ L(do_sigret): li r0,SYS_ify(rt_sigreturn) sc /* No return. */ +#else + /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub. */ + mflr r0 + std r0,FRAME_LR_SAVE(r1) + stdu r1,-128(r1) + li r3,ENOSYS + bl JUMPTARGET(__syscall_error) + nop + li r3,-1 + ld r0,128+FRAME_LR_SAVE(r1) + addi r1,r1,128 + mtlr r0 + blr +#endif PSEUDO_END(__setcontext) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index 23422fb948..b1bcd44af1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -22,8 +22,10 @@ #define __ASSEMBLY__ #include #include "ucontext_i.h" +#include ENTRY(__swapcontext) +#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3) std r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3) mflr r0 @@ -128,7 +130,7 @@ ENTRY(__swapcontext) addi r5,r3,UCONTEXT_SIGMASK addi r4,r4,UCONTEXT_SIGMASK li r3,SIG_SETMASK - bl .sigprocmask + bl JUMPTARGET(sigprocmask) nop cmpdi r3,0 bne L(error_exit) @@ -251,6 +253,20 @@ L(do_sigret): li r0,SYS_ify(rt_sigreturn) sc /* No return. */ +#else + /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub. */ + mflr r0 + std r0,FRAME_LR_SAVE(r1) + stdu r1,-128(r1) + li r3,ENOSYS + bl JUMPTARGET(__syscall_error) + nop + li r3,-1 + ld r0,128+FRAME_LR_SAVE(r1) + addi r1,r1,128 + mtlr r0 + blr +#endif PSEUDO_END(__swapcontext) diff --git a/time/tzfile.c b/time/tzfile.c index 24ef18f941..39b3c2f211 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1995-2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1995-2001, 2003 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 @@ -463,7 +463,7 @@ find_transition (time_t timer) return &types[i]; } -int +void __tzfile_compute (time_t timer, int use_localtime, long int *leap_correct, int *leap_hit, struct tm *tp) @@ -513,7 +513,7 @@ __tzfile_compute (time_t timer, int use_localtime, i = num_leaps; do if (i-- == 0) - return 1; + return; while (timer < leaps[i].transition); /* Apply its correction. */ @@ -532,8 +532,6 @@ __tzfile_compute (time_t timer, int use_localtime, --i; } } - - return 1; } static void diff --git a/time/tzset.c b/time/tzset.c index 02940589f7..6de96762e9 100644 --- a/time/tzset.c +++ b/time/tzset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1991-2002, 2003 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 @@ -567,11 +567,8 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp) tzset_internal (tp == &_tmbuf); if (__use_tzfile) - { - if (! __tzfile_compute (*timer, use_localtime, - &leap_correction, &leap_extra_secs, tp)) - tp = NULL; - } + __tzfile_compute (*timer, use_localtime, &leap_correction, + &leap_extra_secs, tp); else { if (! __offtime (timer, 0, tp)) diff --git a/wcsmbs/wcscpy.c b/wcsmbs/wcscpy.c index aeb8abb162..2e52a6c46f 100644 --- a/wcsmbs/wcscpy.c +++ b/wcsmbs/wcscpy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -17,10 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include - -#define __need_ptrdiff_t #include +#include /* Copy SRC to DEST. */ @@ -29,16 +27,33 @@ wcscpy (dest, src) wchar_t *dest; const wchar_t *src; { - wchar_t *wcp = (wchar_t *) src; wint_t c; - const ptrdiff_t off = dest - src - 1; + wchar_t *wcp; - do + if (__alignof__ (wchar_t) >= sizeof (wchar_t)) + { + const ptrdiff_t off = dest - src - 1; + + wcp = (wchar_t *) src; + + do + { + c = *wcp++; + wcp[off] = c; + } + while (c != L'\0'); + } + else { - c = *wcp++; - wcp[off] = c; + wcp = dest; + + do + { + c = *src++; + *wcp++ = c; + } + while (c != L'\0'); } - while (c != L'\0'); return dest; } -- cgit v1.2.3