All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Petr Vorel <petr.vorel@gmail.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/nfs-utils: Backport yet another printf fix
Date: Mon, 2 Aug 2021 22:13:41 +0200	[thread overview]
Message-ID: <20210802221341.760ffbf0@windsurf> (raw)
In-Reply-To: <YQhEuH0okQM/3P03@pevik>

On Mon, 2 Aug 2021 21:17:12 +0200
Petr Vorel <petr.vorel@gmail.com> wrote:

> > And thank you for fixing this :-)  
> Yw. I see time_t printf format is more tricky than I expected, your traditional
> approach with casting to long long would not require this change to uint64_t :).

Actually, we have this printf() / time_t issue on other packages, on
32-bit architectures where time_t is a 64-bit value (RISC-V 32-bit for
example). What is the correct solution in the end?

Apparently, the really standard solution is simply to *not* print a
time_t, as it's supposed to be an opaque type, which can be different
things depending on the underlying implementation. But in practice, a
lot of packages do printf() time_t values.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

  parent reply	other threads:[~2021-08-02 20:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 17:21 [Buildroot] [PATCH 1/1] package/nfs-utils: Backport yet another printf fix Petr Vorel
2021-08-02 18:42 ` Giulio Benetti
2021-08-02 19:17   ` Petr Vorel
2021-08-02 19:29     ` Giulio Benetti
2021-08-02 20:13     ` Thomas Petazzoni [this message]
2021-08-02 22:06       ` Petr Vorel
2021-08-03  6:57         ` Thomas Petazzoni
2021-08-03 17:17           ` Petr Vorel
2021-08-03 21:00             ` Arnout Vandecappelle
2021-08-03 21:23               ` Petr Vorel
2021-08-03  8:20 ` Maxim Kochetkov via buildroot
2021-08-03 20:47 ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210802221341.760ffbf0@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=petr.vorel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.