Alright, I just sent a patch that replaces time_t with long instead. I
tested it on x86, x86-x32, x86-64.
Alex
On Wed, 8 Dec 2021 at 16:31, Mark Wielaard wrote:
> Hi Alexander,
>
> On Sun, 2021-12-05 at 21:45 +0100, Alexander Kanavin wrote:
> > I'm not sure; the point of this patch is simply to
time_t is platform dependent and some of architectures e.g.
x32, riscv32, arc use 64bit time_t even while they are 32bit
architectures, therefore directly using integer printf formats will not
work portably.
Use a plain long everywhere as the intervals are small enough
that it will not be problema
xander Kanavin via
> Elfutils-devel wrote:
> > From: Alexander Kanavin
> >
> > Use intmax_t to print time_t
> >
> > time_t is platform dependent and some of architectures e.g.
> > x32, riscv32, arc use 64bit time_t even while they are 32bit
> > architec
According to 'man 3 printf' %j appeared in glibc 2.1 and seems to be C99
feature. That's decidedly ancient.
And may I be allowed to suggest, unless elfutils is tested in upstream CI
with decade-old toolchains, you should not be considering its compatibility
with them.
Alex
On Thu, 25 Nov 2021 at
From: Alexander Kanavin
Use intmax_t to print time_t
time_t is platform dependent and some of architectures e.g.
x32, riscv32, arc use 64bit time_t even while they are 32bit
architectures, therefore directly using integer printf formats will not
work portably, use intmax_t to typecast time_t int
On Sat, 20 Nov 2021 at 05:13, Érico Nogueira wrote:
> For what it's worth, most of the time64 support patches that I have seen
> use "%lld" and `long long` as the type for portable representation of
> time, instead of intmax_t, but each should work just as well as the
> other.
>
My original vers
From: Alexander Kanavin
Use intmax_t to print time_t
time_t is platform dependent and some of architectures e.g.
x32, riscv32, arc use 64bit time_t even while they are 32bit
architectures, therefore directly using integer printf formats will not
work portably, use intmax_t to typecast time_t int