From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id E05B61F5A2 for ; Thu, 6 Feb 2020 21:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727570AbgBFVLZ (ORCPT ); Thu, 6 Feb 2020 16:11:25 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:53239 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727499AbgBFVLY (ORCPT ); Thu, 6 Feb 2020 16:11:24 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id A5F9A44713; Thu, 6 Feb 2020 16:11:23 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=hv39PaurBqep hzoxlKhMx1Oars8=; b=JZvCJTftlth3dkMHQHi0we56/Cee/9U/g1xY05sqzJO8 EwSFY3B3k3aSgbB17qLI7bk8M8jExVStz7ekyHXQ694fk5/YvO9IZN1sMGguUhwL ntLmRmI1sZhRBmjW+0G7+npM8o8BsuV9cDO7ozeQcS45h6PWwdNao9U1JmcCwvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=aoL2NA TtrkvC7wCNTHq0xYbk9TEYf5TC1AXNk0qA8HJiUtChThkOW8SM2DAqCHZmhXcN1F u57pgsX4xAEYcIZrIOfFgczk7NlNf1bHDRe/HXAqiHbhGf+lQZoa+Bb17ytWdKWp zoe3i5fR9v9Rq4twbAvL3cic/Y/7ivmwR/7OA= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 9C25044712; Thu, 6 Feb 2020 16:11:23 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id F09B344711; Thu, 6 Feb 2020 16:11:22 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Martin =?utf-8?Q?=C3=85gren?= Cc: Han-Wen Nienhuys , git Subject: Re: Printing a uint64_t portably in Git? References: Date: Thu, 06 Feb 2020 13:11:21 -0800 In-Reply-To: ("Martin =?utf-8?Q?=C3=85gren=22's?= message of "Thu, 6 Feb 2020 19:00:02 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 3A5D2C1E-4925-11EA-91E9-D1361DBA3BAF-77302942!pb-smtp2.pobox.com Content-Transfer-Encoding: quoted-printable Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Martin =C3=85gren writes: > On Thu, 6 Feb 2020 at 18:54, Han-Wen Nienhuys wrote= : >> What is the right incantation to do printf of a uint64_t on OSX ? >> >> Apparently PRIuMAX is to be used for "uintmax_t", and not for "long >> long unsigned int". > > You could cast it? Grepping around, that seems to be how PRIuMAX is > used: > > printf("%"PRIuMAX"\n", (uintmax_t)var); Yup, that is used already in existing code in our codebase, so it is just as portable as the rest of Git is ;-) Thanks.