Re: [PATCH 01/24] inet_net_pton.3: Use 'PRIx32' rather than "%x" when printing 'uint32_t' values

From: Michael Kerrisk (man-pages)
Date: Fri Sep 11 2020 - 06:00:09 EST

Hi Alex,

On 9/11/20 11:39 AM, Alejandro Colomar wrote:
> Hi Michael,


>> So, I'm in a little bit of doubt about patches 01 and 02. Does
>> this really win us anything? On the one hand, %"PRIx32" is more
>> difficult to read than %x. On the other, does it win us anything
>> in terms of portability? At first glance, the answers seems to me
>> to be "no". Your thoughts?
>> Thanks,
>> Michael
> On 16-bit systems 'unsigned int' might be shorter than 'uint32_t'.
> There it would make a difference, I guess.

I guess. But even un the 80s, when (I think) htonl() appeared,
I kind of doubt that there were many such systems. I think
I'll skip these patches.



Michael Kerrisk
Linux man-pages maintainer;
Linux/UNIX System Programming Training: