diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-03 07:44:15 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-03 07:44:15 +0000 |
commit | 5a5367474b6808f488d4b0e74ba30bebfdc882f3 (patch) | |
tree | f52115c051496683e41fd9f7c1f9ad4935e66940 /lib/getdate.y | |
parent | 47bcfc54da3d26655f0c151f214a29cf58711765 (diff) | |
download | coreutils-5a5367474b6808f488d4b0e74ba30bebfdc882f3.tar.xz |
Sync from gnulib.
Diffstat (limited to 'lib/getdate.y')
-rw-r--r-- | lib/getdate.y | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/getdate.y b/lib/getdate.y index ec8c19250..d203c09ae 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -50,6 +50,7 @@ #include <ctype.h> #include <limits.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -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 <stdio.h> - int main (int ac, char **av) { |