[pacman-dev] [PATCH] Fix compile error with clang-2.8
dpmcgee at gmail.com
Thu Oct 7 08:51:45 EDT 2010
On Thu, Oct 7, 2010 at 7:50 AM, Dan McGee <dpmcgee at gmail.com> wrote:
> On Wed, Oct 6, 2010 at 8:40 PM, Allan McRae <allan at archlinux.org> wrote:
>> Signed-off-by: Allan McRae <allan at archlinux.org>
>> wint_t appears to be the same as size_t or unsigned long. It probably best if
>> someone checks that is the right format specifier on x86_64 too...
> man wchar.h:
> The implementation shall support one or more programming environments
> in which the width of wint_t is no greater than the width of type long.
> man printf(3):
> l (ell) A following integer conversion corresponds to a
> long int or unsigned long int argument, or a following n conversion
> sponds to a pointer to a long int argument, or a
> following c conversion corresponds to a wint_t argument, or a
> following s con‐
> version corresponds to a pointer to wchar_t argument.
> So we should really be using '%lc', it sounds like clang is busted...
> What does printf("%ls", p) give you? This isn't actually right because
> we don't want to print the full string, just one character, but it
> would be interesting to see if they implemented half of the spec.
And it may have been solved already...
More information about the pacman-dev