Re: further #include cleanup (IWYU)

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: further #include cleanup (IWYU)
Date: 2024-10-20 09:53:13
Message-ID: 202410200953.xa4sobo4mbra@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024-Oct-20, Peter Eisentraut wrote:

> diff --git a/src/bin/pg_dump/pg_backup_utils.c b/src/bin/pg_dump/pg_backup_utils.c
> index a0045cf5e58..80715979a1a 100644
> --- a/src/bin/pg_dump/pg_backup_utils.c
> +++ b/src/bin/pg_dump/pg_backup_utils.c
> @@ -13,7 +13,9 @@
> */
> #include "postgres_fe.h"
>
> +#ifdef WIN32
> #include "parallel.h"
> +#endif
> #include "pg_backup_utils.h"

This seems quite weird and I think it's just because exit_nicely() wants
to do _endthreadex(). Maybe it'd be nicer to add a WIN32-specific
on_exit_nicely_list() callback that does that in parallel.c, and do away
with the inclusion of parallel.h in pg_backup_utils.c entirely?

> diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c
> index a09247fae47..78e91f6e2dc 100644
> --- a/src/bin/pg_dump/parallel.c
> +++ b/src/bin/pg_dump/parallel.c
> @@ -63,7 +63,9 @@
> #include "fe_utils/string_utils.h"
> #include "parallel.h"
> #include "pg_backup_utils.h"
> +#ifdef WIN32
> #include "port/pg_bswap.h"
> +#endif

This looks really strange, but then parallel.c seems to have embedded
its own portability layer within itself.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-10-20 10:14:10 Re: Add pg_ownerships and pg_privileges system views
Previous Message Alvaro Herrera 2024-10-20 09:37:36 Re: further #include cleanup (IWYU)