Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2024-11-26T06:12:29Z
Lists: pgsql-hackers

Attachments

On Tue, Nov 19, 2024 at 2:37 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Tue, Nov 19, 2024 at 1:14 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> >
> > On 19/11/2024 01:20, Masahiko Sawada wrote:
> > > I realized that building test_radixtree.c with TEST_SHARED_RT fails
> > > because it eventually sets RT_SHMEM when #include'ing radixtree.h but
> > > it's missing some header files to include. I've attached a patch to
> > > include necessary header files in radixtree.h to make it
> > > self-contained.
> >
> > If those includes are only needed when RT_SHMEM is defined, I suggest
> > they should be guarded by #ifdef RT_SHMEM, per Peter E's IWYU efforts
> > lately.
>
> Indeed. I'll incorporate it in the next version.
>

I've attached the updated patches. Please review them.

I think we should backpatch the fix for radixtree.h so I kept these
changes separated from other changes.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Commits

  1. Include necessary header files in radixtree.h.