From owner-freebsd-questions@FreeBSD.ORG Mon Jan 21 05:47:29 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 00650546 for ; Mon, 21 Jan 2013 05:47:28 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by mx1.freebsd.org (Postfix) with ESMTP id C4E6FB0D for ; Mon, 21 Jan 2013 05:47:28 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id v19so5628747obq.0 for ; Sun, 20 Jan 2013 21:47:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding :x-gm-message-state; bh=wXR6p4JROr24e9jWMNjLe+Z14KViGXX/tY9OH1kuFKQ=; b=OWmOCboE1EdRyZEdff3q8oRWObtrsx/3EVcyZek8IYjurdocVGjq7od/EWjx1mXUb3 mNFwSoi0oeX2hi8bI3H1kdJ0BPQ9oAF/hrF3dyzYe6Ue1LzhVAH1FIprBzHPWjACdXeb 6RFZBPjH8yXMGcL2fUtRFBE0PeFHXQY7+GtbPjWmNJ6BwQW1rwIu4XeA99Vz6O8zSGv5 gTw14rn57/5GXWGiovPNcSiIZvmXfGVj0PAjC6u1QeC17hOsc+6EicplBd336HTGWgzJ mLw1HVVhh7lmGzQ3aklRlO5Ef+l1BHjbNewj2AC7b0MHaE8lHjBHs5KacyFRYW6hCKhG 1xzg== MIME-Version: 1.0 X-Received: by 10.60.0.165 with SMTP id 5mr13280825oef.128.1358747248168; Sun, 20 Jan 2013 21:47:28 -0800 (PST) Received: by 10.60.10.136 with HTTP; Sun, 20 Jan 2013 21:47:28 -0800 (PST) In-Reply-To: <50FCBEFB.3010102@FreeBSD.org> References: <50F5A189.7000701@speakeasy.org> <20130116120015.3b8d0db4@mr129166> <50F6EDFB.70501@speakeasy.org> <50FCBEFB.3010102@FreeBSD.org> Date: Sun, 20 Jan 2013 21:47:28 -0800 Message-ID: Subject: Re: time_t definition From: Michael Sierchio To: Garance A Drosehn Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnNlFWMrv/2Sj26TRHCQXF8pjsb1TMAsYU8gJ/SaNkVNLv7GmlbLCdNDFb1kHnCdENHIIUa Cc: "Thomas D. Dean" , "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: Mon, 21 Jan 2013 05:47:29 -0000 On Sun, Jan 20, 2013 at 8:07 PM, Garance A Drosehn wrote: > Yes, this means that the only reliable way to printf a time_t is > to use a cast. That has been true for at least a decade. It may > be true that you happened to avoid this issue before, but the only > *RELIABLE* platform-independent way to print time_t's is via a cast. Especially for variadic functions like printf. You can reasonably assume that arithmetic expressions will automagically promote a type to the proper size, but you (Garance) ably reinforce what we've been trying to convey about this particular example. Well, Brahma said, even after ten thousand explanations, a fool is no wiser, but an intelligent man requires only two thousand five hundred. - The Mah=C4=81bh=C4=81rata.