[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of %td in printf

From: Paul Eggert
Subject: Re: Use of %td in printf
Date: Wed, 3 Jul 2019 01:04:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

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.

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.) Emacs does assume many C99 features, though, and %td has been one of these features for a while.

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]