diff options
author | Jim Meyering <meyering@redhat.com> | 2012-07-04 12:58:07 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-07-04 12:58:07 +0200 |
commit | d8f90adf5f01512958b6da46bd5eea01294a434e (patch) | |
tree | a893b72d7893ad2b063b9be0a2774d6ff8ba0679 /m4/parse-datetime.m4 | |
parent | d0ea2a12f6fb377f930886d404f3dfc2a732537d (diff) | |
download | gnulib-d8f90adf5f01512958b6da46bd5eea01294a434e.tar.gz |
parse-datetime: fix failure to diagnose invalid input
date -d "$(printf '\xb0')" would print 00:00:00 with today's date
rather than diagnosing the invalid input. Now it reports this:
date: invalid date '\260'
* lib/parse-datetime.y (to_uchar): Define.
(yylex): Don't sign-extend "other" bytes.
* m4/parse-datetime.m4: Require AC_C_INLINE for first use of "inline".
Thanks to Bruno Haible for the patch to this file.
* tests/test-parse-datetime.c (main): Add a test to trigger the bug.
Peter Evans reported the bug in GNU date: http://bugs.gnu.org/11843
Diffstat (limited to 'm4/parse-datetime.m4')
-rw-r--r-- | m4/parse-datetime.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/parse-datetime.m4 b/m4/parse-datetime.m4 index 8efefbe8cb..3fb2d2b55e 100644 --- a/m4/parse-datetime.m4 +++ b/m4/parse-datetime.m4 @@ -1,4 +1,4 @@ -# parse-datetime.m4 serial 19 +# parse-datetime.m4 serial 20 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -32,6 +32,7 @@ AC_DEFUN([gl_PARSE_DATETIME], dnl Prerequisites of lib/parse-datetime.y. AC_REQUIRE([gl_BISON]) + AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([gl_C_COMPOUND_LITERALS]) AC_STRUCT_TIMEZONE AC_REQUIRE([gl_CLOCK_TIME]) |