bug-gnulib
[Top][All Lists]
Advanced

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

Re: printf functions without INT_MAX limitation


From: Paul Eggert
Subject: Re: printf functions without INT_MAX limitation
Date: Sun, 21 Apr 2024 10:31:37 -0700
User-agent: Mozilla Thunderbird

On 2024-04-21 09:27, Bruno Haible wrote:
2) Introduce variants of *printf functions, that return a 'ptrdiff_t' instead
    of 'int'. (For results longer than PTRDIFF_MAX, they will fail with error
    ENOMEM, not EOVERFLOW.) This gives rise to several new gnulib modules.

This sounds like a good idea. However, shouldn't output-oriented functions like 'printf' return off_t rather than ptrdiff_t?

Also, I'm tempted to use "#define printf zprintf" and leave most of the source code alone. Perhaps there should be a Gnulib option for that.



reply via email to

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