aboutsummaryrefslogtreecommitdiff
path: root/time/tst-getdate.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-02 09:02:02 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-15 10:42:11 -0300
commit8af344feb5ae3e6e3374a6cf2175b44cc904a94e (patch)
treed10bf6233515a791dcf9bcb3d764d61c965a0008 /time/tst-getdate.c
parent7446e896334cdb5431997dcc30d7ca13768b467d (diff)
downloadglibc-8af344feb5ae3e6e3374a6cf2175b44cc904a94e.tar
glibc-8af344feb5ae3e6e3374a6cf2175b44cc904a94e.tar.gz
glibc-8af344feb5ae3e6e3374a6cf2175b44cc904a94e.tar.bz2
glibc-8af344feb5ae3e6e3374a6cf2175b44cc904a94e.zip
time: Add 64-bit time support for getdate
The getdate is basically a wrapper localtime and mktime. The 64-bit time support is done calling the 64-bit internal functions, there is no need to add a new symbol version. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'time/tst-getdate.c')
-rw-r--r--time/tst-getdate.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/time/tst-getdate.c b/time/tst-getdate.c
index c37ba3083a..3bb0e96707 100644
--- a/time/tst-getdate.c
+++ b/time/tst-getdate.c
@@ -115,20 +115,14 @@ do_test (void)
{
setenv ("TZ", tests[i].tz, 1);
- int expected_err;
- if (sizeof (time_t) == 4 && tests[i].time64)
- expected_err = 8;
- else
- expected_err = 0;
-
tm = getdate (tests[i].str);
- TEST_COMPARE (getdate_err, expected_err);
- if (getdate_err != expected_err)
+ TEST_COMPARE (getdate_err, 0);
+ if (getdate_err != 0)
{
support_record_failure ();
printf ("%s\n", report_date_error ());
}
- else if (getdate_err == 0)
+ else
{
TEST_COMPARE (tests[i].tm.tm_mon, tm->tm_mon);
TEST_COMPARE (tests[i].tm.tm_year, tm->tm_year);
@@ -139,7 +133,7 @@ do_test (void)
}
struct tm tms;
- TEST_COMPARE (getdate_r (tests[i].str, &tms), expected_err);
+ TEST_COMPARE (getdate_r (tests[i].str, &tms), 0);
if (getdate_err == 0)
{
TEST_COMPARE (tests[i].tm.tm_mon, tms.tm_mon);