summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-12 03:12:43 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-12 03:12:43 +0000
commit537e7234f77be5ceab819b701fb173fb859e0605 (patch)
treee41492fb8920cbf169ede6ec5dd8dfcd5f3835a1 /time
parent8bf139c95b0d14b942307006120a6c7d084c7aa9 (diff)
downloadglibc-537e7234f77be5ceab819b701fb173fb859e0605.tar.gz
* grp/putgrent.c (putgrent): Don't write 0 as group
ID if groupname starts with + or -. * pwd/putpwent.c (putpwent): Don't write 0 as user or group ID if user name starts with + or -. 2005-01-09 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add sh variants. * sysdeps/elf/tst-auditmod1.c: Add sh support. * sysdeps/sh/bits/link.h: New. * sysdeps/sh/dl-machine.h: Remove trampoline code here. Define ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT. Remove obsolete comments. (RTLD_START): Define __fpscr_values. * sysdeps/sh/dl-trampoline.S: New file. * sysdeps/sh/sh4/dl-trampoline.S: New file. * sysdeps/sh/sh4/Versions [ld]: Add __fpscr_values. * sysdeps/sh/sh4/dl-machine.h: Remove. 2005-01-10 Jakub Jelinek <jakub@redhat.com> * time/tst-strptime.c (day_tests): Add 2 new tests. (test_tm, main): Issue an error instead of segfaulting if strptime returns NULL. 2005-01-10 H.J. Lu <hongjiu.lu@intel.com> * sysdeps/alpha/libc-tls.c (__tls_get_addr): Updated for dtv_t union. * sysdeps/ia64/libc-tls.c (__tls_get_addr): Likewise.
Diffstat (limited to 'time')
-rw-r--r--time/tst-strptime.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/time/tst-strptime.c b/time/tst-strptime.c
index a0b2ebedd2..6356aa0d41 100644
--- a/time/tst-strptime.c
+++ b/time/tst-strptime.c
@@ -42,6 +42,10 @@ static const struct
{ "C", "19990502123412", "%Y%m%d%H%M%S", 0, 121, 4, 2 },
{ "C", "2001 20 Mon", "%Y %U %a", 1, 140, 4, 21 },
{ "C", "2001 21 Mon", "%Y %W %a", 1, 140, 4, 21 },
+ { "ja_JP.EUC-JP", "2000-01-01 08:12:21 AM", "%Y-%m-%d %I:%M:%S %p",
+ 6, 0, 0, 1 },
+ { "en_US.ISO-8859-1", "2000-01-01 08:12:21 PM", "%Y-%m-%d %I:%M:%S %p",
+ 6, 0, 0, 1 },
{ "ja_JP.EUC-JP", "2001 20 \xb7\xee", "%Y %U %a", 1, 140, 4, 21 },
{ "ja_JP.EUC-JP", "2001 21 \xb7\xee", "%Y %W %a", 1, 140, 4, 21 },
};
@@ -73,7 +77,14 @@ test_tm (void)
{
memset (&tm, '\0', sizeof (tm));
- if (*strptime (tm_tests[i].input, tm_tests[i].format, &tm) != '\0')
+ char *ret = strptime (tm_tests[i].input, tm_tests[i].format, &tm);
+ if (ret == NULL)
+ {
+ printf ("strptime returned NULL for `%s'\n", tm_tests[i].input);
+ result = 1;
+ continue;
+ }
+ else if (*ret != '\0')
{
printf ("not all of `%s' read\n", tm_tests[i].input);
result = 1;
@@ -127,7 +138,14 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- if (*strptime (day_tests[i].input, day_tests[i].format, &tm) != '\0')
+ char *ret = strptime (day_tests[i].input, day_tests[i].format, &tm);
+ if (ret == NULL)
+ {
+ printf ("strptime returned NULL for `%s'\n", day_tests[i].input);
+ result = 1;
+ continue;
+ }
+ else if (*ret != '\0')
{
printf ("not all of `%s' read\n", day_tests[i].input);
result = 1;