From owner-freebsd-questions@FreeBSD.ORG Wed Jan 16 21:32:12 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B4C4C253 for ; Wed, 16 Jan 2013 21:32:12 +0000 (UTC) (envelope-from tomdean@speakeasy.org) Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mx1.freebsd.org (Postfix) with ESMTP id 9087BF49 for ; Wed, 16 Jan 2013 21:32:12 +0000 (UTC) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.53]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 11F86A714B7 for ; Wed, 16 Jan 2013 16:32:06 -0500 (EST) Received: (qmail 1692 invoked from network); 16 Jan 2013 21:32:05 -0000 Received: by simscan 1.4.0 ppid: 18242, pid: 12981, t: 0.4450s scanners: clamav: 0.88.2/m:52/d:13495 spam: 3.0.4 Received: from unknown (HELO [192.168.2.7]) (tomdean@[24.113.104.91]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 16 Jan 2013 21:32:05 -0000 Message-ID: <50F71C5E.9040207@speakeasy.org> Date: Wed, 16 Jan 2013 13:32:14 -0800 From: "Thomas D. Dean" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 Subject: Re: time_t definition References: <201301161841.r0GIfgWS054810@mail.r-bonomi.com> In-Reply-To: <201301161841.r0GIfgWS054810@mail.r-bonomi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail8.sea5 X-Spam-Level: X-Spam-Status: No, score=0.8 required=8.0 tests=RATWARE_GECKO_BUILD autolearn=disabled version=3.0.4 Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2013 21:32:12 -0000 On 01/16/13 10:41, Robert Bonomi wrote: > *precisely* and the format string had "%ld". > this IS a type mismatch, if a 'long' is a 64-bit value. The original code was compiled on a 32-bit machine for a 32-bit target. I tried %d, %ld, and %lld with the same result. > > FALSE. Calculation is OK. I/O format conversion is problematic. In the simple example I posted, gcc did not complain of a format mismatch. But, in the case of time_t gcc does complain of a format mismatch. Both cases had the same number of typedef levels to get to a basic type and used the same compile command. Should have the same result... I am attempting to understand the difference. Tom Dean