Re: [PATCH] parse-datetime: use labs for long int

2017-04-22 Thread Paul Eggert
Pádraig Brady wrote: using PRIuMAX may be best? That would be too easy :-). I installed the attached. From 8edebfe6f97d0e378d042accb2475a32a53f100f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 22 Apr 2017 15:13:24 -0700 Subject: [PATCH] parse-datetime: fix %z and prefer signed int MIM

Re: [PATCH] parse-datetime: use labs for long int

2017-04-22 Thread Pádraig Brady
On 22/04/17 02:18, Paul Eggert wrote: > Thanks for the heads-up. That code has long been on my list of things to > clean FYI I'm currently running date(1) with this change + ASAN enabled, through the latest AFL fuzzer, seeded with the coreutils test corpus.

Re: [PATCH] parse-datetime: use labs for long int

2017-04-22 Thread Pádraig Brady
Wow impressive improvements! On 22/04/17 02:18, Paul Eggert wrote: > (date): Fix printf of size_t to use %z. In coreutils we explicitly disallow the C99 %j and %z specifiers due to portability issues on solaris 8 for example: http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.23-75-g7d1fe88

Re: [PATCH] parse-datetime: use labs for long int

2017-04-22 Thread Rüdiger Meier
On 04/22/2017 11:18 AM, Paul Eggert wrote: Thanks for the heads-up. That code has long been on my list of things to clean up, and your message prompted me to go about it. I installed the attached, which fixes the runtime problem corresponding to the diagnostic you mentioned, along with a lot of o

Re: [PATCH] parse-datetime: use labs for long int

2017-04-22 Thread Paul Eggert
Thanks for the heads-up. That code has long been on my list of things to clean up, and your message prompted me to go about it. I installed the attached, which fixes the runtime problem corresponding to the diagnostic you mentioned, along with a lot of other problems. Please give it a try. I hop

[PATCH] parse-datetime: use labs for long int

2017-04-07 Thread Ruediger Meier
From: Ruediger Meier clang warns about this: lib/parse-date.y:909:16: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] Signed-off-by: Ruediger Meier --- lib/parse-datetime