Re: speed up unicode normalization quick check - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: speed up unicode normalization quick check
Date
Msg-id CA+fd4k5Kozdgo2OR8Hty-JBsHoYDMUsAFCaCfcOp_5uo=F1eTw@mail.gmail.com
Whole thread Raw
In response to Re: speed up unicode normalization quick check  (Michael Paquier <michael@paquier.xyz>)
Responses Re: speed up unicode normalization quick check  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, 12 Oct 2020 at 15:27, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Mon, Oct 12, 2020 at 02:43:06PM +0900, Masahiko Sawada wrote:
> > The following warning recently started to be shown in my
> > environment(FreeBSD clang 8.0.1). Maybe it is relevant with this
> > commit:
> >
> > unicode_norm.c:478:12: warning: implicit declaration of function
> > 'htonl' is invalid in C99 [-Wimplicit-function-declaration]
> >         hashkey = htonl(ch);
> >                   ^
>
> Thanks, it is of course relevant to this commit.  None of the
> BSD animals complain here.  So, while it would be tempting to have an
> extra include with arpa/inet.h, I think that it would be better to
> just use pg_hton32() in pg_bswap.h, as per the attached.  Does that
> take care of your problem?

Thank you for the patch!

Yes, this patch resolves the problem.

Regards,

-- 
Masahiko Sawada            http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: Add Information during standby recovery conflicts