Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Oct 2008 08:49:39 +0200
From:      "Ivan Voras" <ivoras@freebsd.org>
To:        "Sean C. Farley" <scf@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: strftime's %c warning?
Message-ID:  <9bbcef730810082349t733a0295hf9227d35534fdfcb@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.0810082204580.30485@thor.farley.org>
References:  <gcj4lj$jr0$1@ger.gmane.org> <alpine.BSF.2.00.0810082204580.30485@thor.farley.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2008/10/9 Sean C. Farley <scf@freebsd.org>:
> On Wed, 8 Oct 2008, Ivan Voras wrote:
>

>> str.c: In function 'ltime':
>> str.c:141: warning: '%c' yields only last 2 digits of year in some
>> locales on non-BSD systems
>> *** Error code 1
>>
>> Since the code I'm developing is definitely BSD-only (patch to pkg_*
>> infrastructure), should I:
>>
>> a) stop using locale-based %c and choose my own date/time format
>> b) remove WFORMAT from the Makefile?
>>
>> The same warning/error is generated by %x and %X, and %+ described in
>> the strftime man page isn't recognized.
>
> You are hitting a gcc builtin.  Have you tried adding
> -fno-builtin-strftime?

The code im working on is part of FreeBSD and uses FreeBSD's
infrastructure for building. I can avoid the warning by defining
WFORMAT to be 0 but I don't know how to add -fno-builtin-strftime
except directly into CFLAGS.

I don't think the original author (John Hubbard) is around anymore so
the question is - should I just remove WFPORMAT from this Makefile?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9bbcef730810082349t733a0295hf9227d35534fdfcb>