[systemd-devel] [PATCH] shared/util.h: portable sizeof(long) == sizeof(int) test

Emil Renner Berthing systemd at esmil.dk
Fri Sep 19 13:56:20 PDT 2014


On 19 September 2014 22:19, David Herrmann <dh.herrmann at gmail.com> wrote:
> On Fri, Sep 19, 2014 at 8:26 PM, Emil Renner Berthing <systemd at esmil.dk> wrote:
>> Don't rely on __WORDSIZE, but just standard LONG_MAX
>> and INT_MAX from limits.h.
>
> Why? The commit message lacks any explanation of that change.

Ah, sorry. This is a better version of the [RFC 5/25] patch I sent earlier.
The point is that __WORDSIZE is not portable, but both
LONG_MAX and INT_MAX are mandated in limits.h.

I can resend with this explanation in the commit message if you want.

/Emil


More information about the systemd-devel mailing list