Re: [PATCH] strptime

From: Hubert Figuière <hfiguiere_at_teaser.fr>
Date: Wed Apr 04 2012 - 20:53:39 CEST

On 04/04/12 11:33 AM, Ingo Brückl wrote:
> I haven't followed the discussion on strptime for Windows, but I'm wondering
> why we are using it for non-Windows builds now.

Simply put, because if you want to make sure we hit the same bug in all
platform it is safer that way.
There are already enough issue with people stripping Gtk off their Linux
machine to save a few bytes...

Shouldn't we either check
> whether it is already available or not, #ifdef WIN32, or definitely use the
> glibc function on Linux?! (And shouldn't it be in src/af/util/win?)
>
> Could someone please check whether the attached patch is ok for Windows?

Not OK. See above for the whole rationale. This was actually explained
in the bug itself.

> And BTW, there seem to be issues with the implementation:

No it is just glibc.
>
> ut_strptime.c:428: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:475: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:500: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:589: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:621: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:636: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:642: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:648: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:658: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:783: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:803: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:808: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:814: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:820: warning: comparison of unsigned expression < 0 is always false
> ut_strptime.c:826: warning: comparison of unsigned expression < 0 is always false
>

Yes these warning are known. I didn't have the time to fix them properly
and I wanted to unbreak Windows.

I'll take a patch to fix these WITHOUT reformatting the whole file.

Hub
Received on Wed Apr 4 20:59:59 2012

This archive was generated by hypermail 2.1.8 : Wed Apr 04 2012 - 20:59:59 CEST