From 92422e73dbd68f9c4f0efa6d4d34560a08964024 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 2 Nov 2004 19:18:44 +0000 Subject: [PATCH] * getdate.y [!TEST]: Include , since we use sprintf now. (get_date): Overparenthesize to avoid GCC warning. --- lib/ChangeLog | 6 ++++++ lib/getdate.y | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 0234704ee8..540db17d65 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2004-11-02 Derek R. Price + and Paul Eggert + + * getdate.y [!TEST]: Include , since we use sprintf now. + (get_date): Overparenthesize to avoid GCC warning. + 2004-11-02 Bruno Haible * setenv.h (unsetenv): Define as a macro if the system's unsetenv() diff --git a/lib/getdate.y b/lib/getdate.y index ec8c192507..d203c09ae0 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -1307,8 +1308,8 @@ get_date (struct timespec *result, char const *p, struct timespec const *now) int month = tm.tm_mon + pc.rel_month; int day = tm.tm_mday + pc.rel_day; if (((year < tm.tm_year) ^ (pc.rel_year < 0)) - | (month < tm.tm_mon) ^ (pc.rel_month < 0) - | (day < tm.tm_mday) ^ (pc.rel_day < 0)) + | ((month < tm.tm_mon) ^ (pc.rel_month < 0)) + | ((day < tm.tm_mday) ^ (pc.rel_day < 0))) goto fail; tm.tm_year = year; tm.tm_mon = month; @@ -1365,8 +1366,6 @@ get_date (struct timespec *result, char const *p, struct timespec const *now) #if TEST -#include - int main (int ac, char **av) { -- 2.30.2