Re: automating pg_config.h.win32 maintenance - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: automating pg_config.h.win32 maintenance
Date
Msg-id ebe2ccfe-ab5b-f7e2-242d-988daf594346@2ndquadrant.com
Whole thread Raw
In response to Re: automating pg_config.h.win32 maintenance  (Michael Paquier <michael@paquier.xyz>)
Responses Re: automating pg_config.h.win32 maintenance
List pgsql-hackers
On 2019-12-17 07:30, Michael Paquier wrote:
> The patch looks pretty clean.  I have a few minor comments.
> 
> -       if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/)
> +       if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\]/)
>          {
> Why did you remove the bit about "PostgreSQL"?

Just to make it more general.  If we're going to parse the arguments, 
why not parse all of them the same way.

> +       open(my $i, '<', "src/include/pg_config.h.in")
> +         || confess "Could not open pg_config.h.in\n";
> +       open(my $o, '>', "src/include/pg_config.h")
> +         || confess "Could not write to pg_config.h\n";
> Failure to open pg_config.h.
> 
> Wouldn't it be better to remove pg_config_ext.h.win32 as well?

Yeah, good idea.  Attached patch is refactored so all three header files 
managed by AC_CONFIG_HEADERS are processed the same way.

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

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: archive status ".ready" files may be created too early
Next
From: Dmitry Dolgov
Date:
Subject: Re: Extracting only the columns needed for a query