From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 9 07:17:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D32781065688 for ; Thu, 9 Oct 2008 07:17:07 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by mx1.freebsd.org (Postfix) with ESMTP id A3F9E8FC14 for ; Thu, 9 Oct 2008 07:17:07 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so4327455rvf.43 for ; Thu, 09 Oct 2008 00:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=0DX8GaANugWkcM7GnyLmAmqsXPSwkSmGf39wyB0GLMo=; b=iYXwX0ry3FuPRYBwO8lFoMo7c4Itf2sLzjEJJzyjkWcfSnrmwXDCrHF38WeizY5VCF PY2QfbacASqR2GeS+XtIgeuA1NfUELPL31Eq0bCf3pQXJNEOBUICyd8rMWeAqJEEZeVL e/tAIXgZ8bxthvESOKldgieu0mLvVcOE2Z1+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=fAw+giqXsuD6xst7WM04Jp1Wnk2hLuX3q2W4oOz1od+93OIfzhfN0chihMY2maAQ7v oYCWc6N7thmUhRS2Oti9JX5+Xs3WQGv02Nkje/JbX2G7kXdJbgvglCsnDIedivG67Ve2 DLIH9ZtVvJYVPbhScQF7PWHVJJ591syB2Rosg= Received: by 10.141.43.19 with SMTP id v19mr5836548rvj.154.1223534979268; Wed, 08 Oct 2008 23:49:39 -0700 (PDT) Received: by 10.141.153.13 with HTTP; Wed, 8 Oct 2008 23:49:39 -0700 (PDT) Message-ID: <9bbcef730810082349t733a0295hf9227d35534fdfcb@mail.gmail.com> Date: Thu, 9 Oct 2008 08:49:39 +0200 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Sean C. Farley" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 48b5bce0e845267b Cc: freebsd-hackers@freebsd.org Subject: Re: strftime's %c warning? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 07:17:07 -0000 2008/10/9 Sean C. Farley : > 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?