[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of %td in printf
From: |
Eli Zaretskii |
Subject: |
Re: Use of %td in printf |
Date: |
Wed, 03 Jul 2019 11:31:46 +0300 |
> Cc: address@hidden
> From: Paul Eggert <address@hidden>
> Date: Wed, 3 Jul 2019 01:04:33 -0700
>
> Eli Zaretskii wrote:
> > AFAIR, we require a C99 compiler, but not a C99 C library.
>
> That was a while ago. These days it's safe to assume %td and Emacs has been
> doing so for some time without any problems.
Thanks, I just wanted to be sure. I don't really know of any platform
where this could cause problems.
> I should mention that the situation is more complicated than "we require a
> C99
> compiler". Emacs does not require full support for C99, either in the
> compiler
> or the library. (If it did, we couldn't use Microsoft's C compiler, which
> does
> not support all of C99.)
We don't support building with the Microsoft compiler for quite some
time now. The MS-Windows port is built using GCC, not MSVC.
> While we're on the topic, one of these days I was thinking of removing
> printmax_t and related types and macros from src/lisp.h, as %jd is
> considerably
> simpler and should be universal by now. Even when I added that stuff back in
> 2011 the concern about portability to old C libraries lacking %jd support was
> mostly theoretical; I think the last holdout was Solaris 8, which Oracle
> stopped
> supporting in 2012. Nowadays those pre-C99 libraries are museum pieces and we
> can drop the printmax_t hacks.
If all the platforms we care about support that, fine.