[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts
From: |
Eli Zaretskii |
Subject: |
bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts |
Date: |
Thu, 07 Apr 2011 21:31:55 +0300 |
> Date: Thu, 07 Apr 2011 00:33:44 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> This patch assumes that vsnprintf works.
Bother: using `vsnprintf' here could cause problems when `error' is
used to format messages with non-ASCII characters. `doprnt' was
careful in these cases, e.g., it would take care of truncating
multibyte strings only on character boundaries. It also supported %c
format for converting a multibyte character to its integer
representation. Can we trust `vsnprintf' to not misbehave in these
cases, and DTRT with the entire repertory of characters supported by
Emacs?
There's also an issue with old pre-C99 implementations of `vsnprintf'
which returned -1 when the buffer was too small. However, I think
catering for those would be a trivial change in `verror', so that's
not a big deal.
> I assume that vsnprintf works on Windows, so the presence or absence
> of the vsnprintf module shouldn't matter for Windows.
Yes, the MinGW build will have no problem. The MSVC build will need
the above-mentioned change in `verror', because the Microsoft
runtime's version of `vsnprintf' is not compatible with ISO C99. But
that can be fixed later, if needed.
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/06
- Message not available
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/07
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Andy Moreton, 2011/04/07
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts,
Eli Zaretskii <=
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/07
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/08
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/08
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Stefan Monnier, 2011/04/10
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/10