mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1998-10-26 11:09 Ulrich Drepper <drepper@cygnus.com> * time/Makefile (tests): Add tst-posixtz. * time/tst-posixtz.c: New file. 1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * elf/rtld.c (process_envvars): Accept any non-null value of LD_BIND_NOW, as mandated by the ABI. 1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/unix/sysv/linux/pread.c: Rename __syscall_pread64 to __syscall_pread. * sysdeps/unix/sysv/linux/pwrite.c: Rename __syscall_pwrite64 to __syscall_pwrite. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise. Remove duplicate entries. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Remove s_pread64 and s_pwrite64. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise. 1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/unix/sysv/linux/llseek.c: Use INLINE_SYSCALL. * sysdeps/unix/sysv/linux/arm/syscalls.list: Rename __sys_llseek to __syscall__llseek. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list: Remove entry for __sys_llseek. 1998-10-26 Cristian Gafton <gafton@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add s_setfsgid and s_setfsuid. 1998-10-26 Ulrich Drepper <drepper@cygnus.com> * time/tzset.c (tz_compute): Correct last patch and describe this in a comment.
This commit is contained in:
46
ChangeLog
46
ChangeLog
@ -1,3 +1,49 @@
|
|||||||
|
1998-10-26 11:09 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* time/Makefile (tests): Add tst-posixtz.
|
||||||
|
* time/tst-posixtz.c: New file.
|
||||||
|
|
||||||
|
1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
|
* elf/rtld.c (process_envvars): Accept any non-null value of
|
||||||
|
LD_BIND_NOW, as mandated by the ABI.
|
||||||
|
|
||||||
|
1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/pread.c: Rename __syscall_pread64 to
|
||||||
|
__syscall_pread.
|
||||||
|
* sysdeps/unix/sysv/linux/pwrite.c: Rename __syscall_pwrite64 to
|
||||||
|
__syscall_pwrite.
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise. Remove
|
||||||
|
duplicate entries.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Remove
|
||||||
|
s_pread64 and s_pwrite64.
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise.
|
||||||
|
|
||||||
|
1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/llseek.c: Use INLINE_SYSCALL.
|
||||||
|
* sysdeps/unix/sysv/linux/arm/syscalls.list: Rename __sys_llseek
|
||||||
|
to __syscall__llseek.
|
||||||
|
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/syscalls.list: Remove entry for
|
||||||
|
__sys_llseek.
|
||||||
|
|
||||||
|
1998-10-26 Cristian Gafton <gafton@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add s_setfsgid
|
||||||
|
and s_setfsuid.
|
||||||
|
|
||||||
|
1998-10-26 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* time/tzset.c (tz_compute): Correct last patch and describe this
|
||||||
|
in a comment.
|
||||||
|
|
||||||
1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
1998-10-24 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove
|
* sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove
|
||||||
|
@ -1170,12 +1170,8 @@ process_envvars (enum mode *modep, int *lazyp)
|
|||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
/* Do we bind early? */
|
/* Do we bind early? */
|
||||||
if (memcmp (&envline[3], "BIND_NOW", 8) == 0
|
if (memcmp (&envline[3], "BIND_NOW", 8) == 0)
|
||||||
&& (envline[12] == '1' || envline[12] == 'y'
|
bind_now = envline[12] != '\0';
|
||||||
|| envline[12] == 'Y'
|
|
||||||
|| ((envline[12] == 'o' || envline[12] == 'O')
|
|
||||||
&& (envline[13] == 'n' || envline[13] == 'N'))))
|
|
||||||
bind_now = 1;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
|
@ -93,9 +93,7 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
|
|||||||
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
||||||
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
||||||
s_poll poll poll 3 __syscall_poll
|
s_poll poll poll 3 __syscall_poll
|
||||||
s_pread64 pread64 pread 5 __syscall_pread64
|
|
||||||
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
||||||
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
|
|
||||||
s_reboot reboot reboot 3 __syscall_reboot
|
s_reboot reboot reboot 3 __syscall_reboot
|
||||||
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
||||||
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# File name Caller Syscall name # args Strong name Weak names
|
# File name Caller Syscall name # args Strong name Weak names
|
||||||
|
|
||||||
s_getgroups getgroups getgroups 2 __syscall_getgroups
|
s_getgroups getgroups getgroups 2 __syscall_getgroups
|
||||||
s_llseek llseek _llseek 5 __sys_llseek
|
s_llseek llseek _llseek 5 __syscall__llseek
|
||||||
s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
|
s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
|
||||||
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
|
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
|
||||||
s_setgid setgid setgid 1 __syscall_setgid
|
s_setgid setgid setgid 1 __syscall_setgid
|
||||||
@ -27,9 +27,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
|
|||||||
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
||||||
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
||||||
s_poll poll poll 3 __syscall_poll
|
s_poll poll poll 3 __syscall_poll
|
||||||
s_pread64 pread64 pread 5 __syscall_pread64
|
s_pread64 pread64 pread 5 __syscall_pread
|
||||||
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
||||||
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
|
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
|
||||||
s_reboot reboot reboot 3 __syscall_reboot
|
s_reboot reboot reboot 3 __syscall_reboot
|
||||||
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
||||||
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
# File name Caller Syscall name # args Strong name Weak names
|
# File name Caller Syscall name # args Strong name Weak names
|
||||||
|
|
||||||
modify_ldt EXTRA modify_ldt 3 __modify_ldt modify_ldt
|
modify_ldt EXTRA modify_ldt 3 __modify_ldt modify_ldt
|
||||||
s_llseek llseek _llseek 5 __sys_llseek
|
|
||||||
vm86 - vm86 1 __vm86 vm86
|
vm86 - vm86 1 __vm86 vm86
|
||||||
|
@ -17,11 +17,14 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <sysdep.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
extern int __sys_llseek (int fd, off_t offset_hi, off_t offset_lo,
|
extern int __syscall__llseek (int fd, off_t offset_hi, off_t offset_lo,
|
||||||
loff_t *result, int whence);
|
loff_t *result, int whence);
|
||||||
|
|
||||||
/* Seek to OFFSET on FD, starting from WHENCE. */
|
/* Seek to OFFSET on FD, starting from WHENCE. */
|
||||||
loff_t
|
loff_t
|
||||||
@ -29,9 +32,9 @@ __llseek (int fd, loff_t offset, int whence)
|
|||||||
{
|
{
|
||||||
loff_t result;
|
loff_t result;
|
||||||
|
|
||||||
return (loff_t) (__sys_llseek (fd, (off_t) (offset >> 32),
|
return (loff_t) (INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32),
|
||||||
(off_t) (offset & 0xffffffff),
|
(off_t) (offset & 0xffffffff),
|
||||||
&result, whence) ?: result);
|
&result, whence) ?: result);
|
||||||
}
|
}
|
||||||
weak_alias (__llseek, llseek)
|
weak_alias (__llseek, llseek)
|
||||||
weak_alias (__llseek, __lseek64)
|
weak_alias (__llseek, __lseek64)
|
||||||
|
@ -40,7 +40,7 @@ getresgid - getresgid 3 getresgid
|
|||||||
#
|
#
|
||||||
# There are defined locally because the caller is also defined in this dir.
|
# There are defined locally because the caller is also defined in this dir.
|
||||||
#
|
#
|
||||||
s_llseek llseek _llseek 5 __sys_llseek
|
s_llseek llseek _llseek 5 __syscall__llseek
|
||||||
|
|
||||||
# System calls with wrappers.
|
# System calls with wrappers.
|
||||||
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
|
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
|
||||||
@ -55,9 +55,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
|
|||||||
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
||||||
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
||||||
s_poll poll poll 3 __syscall_poll
|
s_poll poll poll 3 __syscall_poll
|
||||||
s_pread64 pread64 pread 5 __syscall_pread64
|
s_pread64 pread64 pread 5 __syscall_pread
|
||||||
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
||||||
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
|
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
|
||||||
s_reboot reboot reboot 3 __syscall_reboot
|
s_reboot reboot reboot 3 __syscall_reboot
|
||||||
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
||||||
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
s_ioctl ioctl ioctl 3 __syscall_ioctl
|
s_ioctl ioctl ioctl 3 __syscall_ioctl
|
||||||
s_llseek llseek _llseek 5 __sys_llseek
|
s_llseek llseek _llseek 5 __sys_llseek
|
||||||
s_chown chown chown 3 __syscall_chown
|
s_chown chown chown 3 __syscall_chown
|
||||||
s_pread64 pread64 pread 4 __syscall_pread64
|
|
||||||
s_pwrite64 pwrite64 pwrite 4 __syscall_pwrite64
|
|
||||||
|
|
||||||
# System calls with wrappers.
|
# System calls with wrappers.
|
||||||
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
|
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
|
||||||
@ -19,9 +17,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
|
|||||||
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
||||||
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
||||||
s_poll poll poll 3 __syscall_poll
|
s_poll poll poll 3 __syscall_poll
|
||||||
s_pread64 pread64 pread 5 __syscall_pread64 __syscall_pread
|
s_pread64 pread64 pread 5 __syscall_pread
|
||||||
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
||||||
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64 __syscall_pwrite
|
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
|
||||||
s_reboot reboot reboot 3 __syscall_reboot
|
s_reboot reboot reboot 3 __syscall_reboot
|
||||||
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
||||||
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
#ifdef __NR_pread
|
#ifdef __NR_pread
|
||||||
|
|
||||||
extern ssize_t __syscall_pread64 (int fd, void *buf, size_t count,
|
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
|
||||||
off_t offset_hi, off_t offset_lo);
|
off_t offset_hi, off_t offset_lo);
|
||||||
|
|
||||||
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
|
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
|
||||||
off_t offset) internal_function;
|
off_t offset) internal_function;
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
#ifdef __NR_pread
|
#ifdef __NR_pread
|
||||||
|
|
||||||
extern ssize_t __syscall_pread64 (int fd, void *buf, size_t count,
|
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
|
||||||
off_t offset_hi, off_t offset_lo);
|
off_t offset_hi, off_t offset_lo);
|
||||||
|
|
||||||
static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
|
static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
|
||||||
off64_t offset) internal_function;
|
off64_t offset) internal_function;
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
s_getgroups getgroups getgroups 2 __syscall_getgroups
|
s_getgroups getgroups getgroups 2 __syscall_getgroups
|
||||||
s_getpagesize getpagesize getpagesize 0 __syscall_getpagesize
|
s_getpagesize getpagesize getpagesize 0 __syscall_getpagesize
|
||||||
s_llseek llseek _llseek 5 __sys_llseek
|
s_llseek llseek _llseek 5 __syscall__llseek
|
||||||
|
s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
|
||||||
|
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
|
||||||
s_setgid setgid setgid 1 __syscall_setgid
|
s_setgid setgid setgid 1 __syscall_setgid
|
||||||
s_setgroups setgroups setgroups 2 __syscall_setgroups
|
s_setgroups setgroups setgroups 2 __syscall_setgroups
|
||||||
s_setregid setregid setregid 2 __syscall_setregid
|
s_setregid setregid setregid 2 __syscall_setregid
|
||||||
@ -24,9 +26,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
|
|||||||
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
||||||
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
||||||
s_poll poll poll 3 __syscall_poll
|
s_poll poll poll 3 __syscall_poll
|
||||||
s_pread64 pread64 pread 5 __syscall_pread64
|
s_pread64 pread64 pread 5 __syscall_pread
|
||||||
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
||||||
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
|
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
|
||||||
s_reboot reboot reboot 3 __syscall_reboot
|
s_reboot reboot reboot 3 __syscall_reboot
|
||||||
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
||||||
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
||||||
|
@ -47,9 +47,7 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
|
|||||||
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
s_getresgid getresgid getresgid 3 __syscall_getresgid
|
||||||
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
s_getresuid getresuid getresuid 3 __syscall_getresuid
|
||||||
s_poll poll poll 3 __syscall_poll
|
s_poll poll poll 3 __syscall_poll
|
||||||
s_pread64 pread64 pread 5 __syscall_pread64
|
|
||||||
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
s_ptrace ptrace ptrace 4 __syscall_ptrace
|
||||||
s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
|
|
||||||
s_reboot reboot reboot 3 __syscall_reboot
|
s_reboot reboot reboot 3 __syscall_reboot
|
||||||
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
s_sigaction sigaction sigaction 3 __syscall_sigaction
|
||||||
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
s_sigpending sigpending sigpending 1 __syscall_sigpending
|
||||||
|
@ -30,7 +30,7 @@ routines := offtime asctime clock ctime ctime_r difftime \
|
|||||||
stime dysize timegm ftime \
|
stime dysize timegm ftime \
|
||||||
strptime getdate strfxtime
|
strptime getdate strfxtime
|
||||||
|
|
||||||
tests := test_time clocktest
|
tests := test_time clocktest tst-posixtz
|
||||||
|
|
||||||
include ../Rules
|
include ../Rules
|
||||||
|
|
||||||
|
55
time/tst-posixtz.c
Normal file
55
time/tst-posixtz.c
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
time_t when;
|
||||||
|
const char *tz;
|
||||||
|
const char *result;
|
||||||
|
} tests[] =
|
||||||
|
{
|
||||||
|
{ 909312849L, "AEST-10AEDST-11,M10.5.0,M3.5.0",
|
||||||
|
"1998/10/25 21:54:09 dst=1 zone=AEDST" },
|
||||||
|
{ 924864849L, "AEST-10AEDST-11,M10.5.0,M3.5.0",
|
||||||
|
"1999/04/23 20:54:09 dst=0 zone=AEST" },
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
int cnt;
|
||||||
|
|
||||||
|
for (cnt = 0; cnt < sizeof (tests) / sizeof (tests[0]); ++cnt)
|
||||||
|
{
|
||||||
|
char buf[100];
|
||||||
|
struct tm *tmp;
|
||||||
|
|
||||||
|
printf ("TZ = \"%s\", time = %ld => ", tests[cnt].tz, tests[cnt].when);
|
||||||
|
fflush (stdout);
|
||||||
|
|
||||||
|
setenv ("TZ", tests[cnt].tz, 1);
|
||||||
|
|
||||||
|
tmp = localtime (&tests[cnt].when);
|
||||||
|
|
||||||
|
snprintf (buf, sizeof (buf),
|
||||||
|
"%04d/%02d/%02d %02d:%02d:%02d dst=%d zone=%s",
|
||||||
|
tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
|
||||||
|
tmp->tm_hour, tmp->tm_min, tmp->tm_sec, tmp->tm_isdst,
|
||||||
|
tzname[tmp->tm_isdst ? 1 : 0]);
|
||||||
|
|
||||||
|
fputs (buf, stdout);
|
||||||
|
|
||||||
|
if (strcmp (buf, tests[cnt].result) == 0)
|
||||||
|
puts (", OK");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = 1;
|
||||||
|
puts (", FAIL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
@ -524,7 +524,7 @@ tz_compute (timer, tm)
|
|||||||
For the later the daylight saving time ends in the next year.
|
For the later the daylight saving time ends in the next year.
|
||||||
It is easier to detect this after first computing the time for the
|
It is easier to detect this after first computing the time for the
|
||||||
wrong year since now we simply can compare the times to switch. */
|
wrong year since now we simply can compare the times to switch. */
|
||||||
if (tz_rules[0].change < tz_rules[1].change
|
if (tz_rules[0].change > tz_rules[1].change
|
||||||
&& ! compute_change (&tz_rules[1], 1900 + tm->tm_year + 1))
|
&& ! compute_change (&tz_rules[1], 1900 + tm->tm_year + 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user