Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 2008 22:07:32 -0500 (CDT)
From:      "Sean C. Farley" <scf@FreeBSD.org>
To:        Ivan Voras <ivoras@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: strftime's %c warning?
Message-ID:  <alpine.BSF.2.00.0810082204580.30485@thor.farley.org>
In-Reply-To: <gcj4lj$jr0$1@ger.gmane.org>
References:  <gcj4lj$jr0$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Oct 2008, Ivan Voras wrote:

> I'm trying to use the %c formatter in strftime(3), documented as:
>
> "
>     %c    is replaced by national representation of time and date.
> "
>
> ... which looks useful, except that in code in which WFORMAT is defined
> as "1" I get this error:
>
> 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?

Sean
-- 
scf@FreeBSD.org



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