diff options
-rw-r--r-- | ChangeLog | 40 | ||||
-rw-r--r-- | include/time.h | 6 | ||||
-rw-r--r-- | localedata/locales/ml_IN | 207 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/configure.in | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/kernel-features.h | 13 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S | 16 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S | 18 | ||||
-rw-r--r-- | time/tzfile.c | 8 | ||||
-rw-r--r-- | time/tzset.c | 9 | ||||
-rw-r--r-- | wcsmbs/wcscpy.c | 35 |
13 files changed, 362 insertions, 29 deletions
@@ -1,3 +1,43 @@ +2003-02-01 Ulrich Drepper <drepper@redhat.com> + + * 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 <jim@meyering.net> + + * time/tzset.c (__tz_convert): Remove dead code; __tzfile_compute + always returns 1. + +2003-01-31 Steven Munroe <sjmunroe@us.ibm.com> + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c + [!__ASSUME_NEW_PRCTL_SYSCALL]: Noop prctl syscall and set ENOSYS. + +2003-01-31 Steven Munroe <sjmunroe@us.ibm.com> + + * 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 <sjmunroe@us.ibm.com> + + * 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 <drepper@redhat.com> + + * wcsmbs/wcscpy.c (wcscpy): Add alternative implementation for + platforms with strange alignment requirements on wchar_t. + 2003-01-31 Andreas Schwab <schwab@suse.de> * 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 "<U0049><U004E><U0052><U0020>" +currency_symbol "<U0D30><U0D42>" +mon_decimal_point "<U002E>" +mon_thousands_sep "<U002C>" +mon_grouping 3;2 +positive_sign "" +negative_sign "<U002D>" +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 "<U002E>" +thousands_sep "<U002C>" +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 "<U0D1E><U0D3E>";"<U0D24><U0D3F>";/ +"<U0D1A><U0D4A>";"<U0D2C><U0D41>";/ +"<U0D35><U0D4D><U0D2F><U0D3E>";"<U0D35><U0D46>";/ +"<U0D36>" +% +% Full weekday names (%A) +day "<U0D1E><U0D3E><U0D2F><U0D31><U0D41><U0D4D>";/ +"<U0D24><U0D3F><U0D19><U0D4D><U0D15><U0D33><U0D41><U0D4D>";/ +"<U0D1A><U0D4A><U0D35><U0D4D><U0D35>";/ +"<U0D2C><U0D41><U0D27><U0D28><U0D41><U0D4D>";/ +"<U0D35><U0D4D><U0D2F><U0D3E><U0D34><U0D02>";/ +"<U0D35><U0D46><U0D33><U0D4D><U0D33><U0D3F>";/ +"<U0D36><U0D28><U0D3F>" +% +% Abbreviated month names (%b) +abmon "<U0D1C><U0D28><U0D41>";/ +"<U0D2B><U0D46><U0D2C><U0D4D>";/ +"<U0D2E><U0D3E><U0D31><U0D4D>";/ +"<U0D0F><U0D2A><U0D4D><U0D31><U0D3F><U0D32><U0D4D>";/ +"<U0D46><U0D2E><U0D2F><U0D4D>";/ +"<U0D1C><U0D42><U0D23><U0D4D>";/ +"<U0D1C><U0D42><U0D48><U0D32>";/ +"<U0D06><U0D17>";/ +"<U0D46><U0D38><U0D2A><U0D4D><U0D24><U0D02>";/ +"<U0D12><U0D15><U0D4D><U0D48><U0D1F>";/ +"<U0D28><U0D35><U0D02>";/ +"<U0D21><U0D3F><U0D38><U0D02>" +% +% FULL month names (%B) +mon "<U0D1C><U0D28><U0D41><U0D35><U0D30><U0D3F>";/ +"<U0D2B><U0D46><U0D2C><U0D4D><U0D30><U0D41><U0D35><U0D30><U0D3F>";/ +"<U0D2E><U0D3E><U0D31><U0D41><U0D4D><U0D1A><U0D4D><U0D1A><U0D4D>";/ +"<U0D0F><U0D2A><U0D4D><U0D31><U0D3F><U0D32><U0D41><U0D4D>";/ +"<U0D2E><U0D46><U0D2F><U0D4D>";/ +"<U0D1C><U0D42><U0D23><U0D41><U0D4D>";/ +"<U0D1C><U0D42><U0D32><U0D48>";/ +"<U0D06><U0D17><U0D38><U0D4D><U0D24><U0D4D>";/ +"<U0D38><U0D46><U0D2A><U0D4D><U0D24><U0D02><U0D2C><U0D31><U0D41><U0D4D>";/ +"<U0D12><U0D15><U0D4D><U0D1F><U0D4B><U0D2C><U0D31><U0D41><U0D4D>";/ +"<U0D28><U0D35><U0D02><U0D2C><U0D31><U0D41><U0D4D>";/ +"<U0D21><U0D3F><U0D38><U0D02><U0D2C><U0D31><U0D41><U0D4D>" +% +% +% Equivalent of AM PM +am_pm "<U0D30><U0D3E><U0D35><U0D3F><U0D32><U0D46>";"<U0D35><U0D48><U0D15><U0D41>" +% +% Appropriate date and time representation +% %A %d %B %Y %I:%M:%S %Z +d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>" +% +% Appropriate date representation +% %A %d %B %Y +d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0042><U0020><U0025><U0059>" +% +% Appropriate time representation +% %I:%M:%S %Z +t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0020><U0025><U005A>" +% +% Appropriate 12 h time representation (%r) +t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>" +% +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 "<U005E><U005B><U0D05><U0D24><U0D46><U005D>" +% +% +% ^[\u0d05\u0d32\u0d4d\u0d32] +noexpr "<U005E><U005B><U0D05><U0D32><U0D4D><U0D32><U005D>" +% +% \u0d05\u0d24\u0d46 +yesstr "<U0D05><U0D24><U0D46>" +% +% \u0d05\u0d32\u0d4d\u0d32 +nostr "<U0D05><U0D32><U0D4D><U0D32>" +% +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 "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074><U0025><U0067>" +name_gen "<U0D36><U0D4D><U0D30><U0D40>" +name_mr "<U0D36><U0D4D><U0D30><U0D40><U0D2E><U0D3E><U0D28><U0D41><U0D4D>" +name_mrs "<U0D36><U0D4D><U0D30><U0D40><U0D2E><U0D24><U0D3F>" +name_miss "<U0D15><U0D41><U0D2E><U0D3E><U0D30><U0D3F>" +name_ms "<U0D36><U0D4D><U0D30><U0D40><U0D2E><U0D24><U0D3F>" +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 "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073><U0025><U0062><U0025><U0065><U0025><U0072>" +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 "<U002B><U0025><U0063><U0020><U003B><U0025><U0061><U0020><U003B><U0025><U006C>" +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 <asm/ptrace.h> +#include <asm/errno.h> #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 <asm/ptrace.h> #include "ucontext_i.h" +#include <asm/errno.h> 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 <asm/ptrace.h> #include "ucontext_i.h" +#include <asm/errno.h> 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 <asm/ptrace.h> #include "ucontext_i.h" +#include <asm/errno.h> 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 <drepper@gnu.ai.mit.edu>, 1995. @@ -17,10 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <wchar.h> - -#define __need_ptrdiff_t #include <stddef.h> +#include <wchar.h> /* 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; } |