Re: pgsql: Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.
Date: 2017-10-02 00:10:56
Message-ID: CAB7nPqS+d4gwwA+RP2q-HDa-1ZAYKe0GRuYNq_8twP5iv0gQKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, Oct 2, 2017 at 8:08 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.
>
> All postgres internal usages are replaced, it's just libpq example
> usages that haven't been converted. External users of libpq can't
> generally rely on including postgres internal headers.
>
> Note that this includes replacing open-coded byte swapping of 64bit
> integers (using two 32 bit swaps) with a single 64bit swap.
>
> Where it looked applicable, I have removed netinet/in.h and
> arpa/inet.h usage, which previously provided the relevant
> functionality. It's perfectly possible that I missed other reasons for
> including those, the buildfarm will tell.

Thanks for taking the time to improve that! I was looking for a 64b
equivalent not long ago for pg_rewind... Those changes look good to me
at quick glance.
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2017-10-02 00:45:19 pgsql: Correct include file name in inet_aton fallback.
Previous Message Andres Freund 2017-10-01 23:08:13 pgsql: Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.