Re: automating pg_config.h.win32 maintenance

2019-12-20 Thread Michael Paquier
On Fri, Dec 20, 2019 at 09:17:14AM +0100, Peter Eisentraut wrote: > committed with that comment removed Yeah, thanks! -- Michael signature.asc Description: PGP signature

Re: automating pg_config.h.win32 maintenance

2019-12-20 Thread Peter Eisentraut
On 2019-12-19 08:49, Michael Paquier wrote: On Thu, Dec 19, 2019 at 08:31:05AM +0100, Peter Eisentraut wrote: On 2019-12-19 04:59, Michael Paquier wrote: This part needs a comment. Like it is the equivalent of what src/common/'s Makefile does or something like that? This was meant to be

Re: automating pg_config.h.win32 maintenance

2019-12-18 Thread Michael Paquier
On Thu, Dec 19, 2019 at 08:31:05AM +0100, Peter Eisentraut wrote: > On 2019-12-19 04:59, Michael Paquier wrote: >> This part needs a comment. Like it is the equivalent of what >> src/common/'s Makefile does or something like that? > > This was meant to be addressed by >

Re: automating pg_config.h.win32 maintenance

2019-12-18 Thread Peter Eisentraut
On 2019-12-19 04:59, Michael Paquier wrote: On Tue, Dec 17, 2019 at 11:56:17AM +0100, Peter Eisentraut wrote: Yeah, good idea. Attached patch is refactored so all three header files managed by AC_CONFIG_HEADERS are processed the same way. Looks good. I just have one comment. + # XXX +

Re: automating pg_config.h.win32 maintenance

2019-12-18 Thread Michael Paquier
On Tue, Dec 17, 2019 at 11:56:17AM +0100, Peter Eisentraut wrote: > Yeah, good idea. Attached patch is refactored so all three header files > managed by AC_CONFIG_HEADERS are processed the same way. Looks good. I just have one comment. + # XXX + open(my $f, '>>', 'src/include/pg_config.h')

Re: automating pg_config.h.win32 maintenance

2019-12-17 Thread Peter Eisentraut
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

Re: automating pg_config.h.win32 maintenance

2019-12-16 Thread Michael Paquier
On Mon, Dec 16, 2019 at 01:12:27PM +0100, Peter Eisentraut wrote: > OK, here is an updated patch set that has all defines in one big Perl hash, > and also requires that all symbols in pg_config.h.in are accounted for. > (The indentation is from pgperltidy.) The patch looks pretty clean. I have a

Re: automating pg_config.h.win32 maintenance

2019-12-16 Thread Peter Eisentraut
On 2019-12-13 14:56, Tom Lane wrote: One thing that disturbs me slightly is that the plan seems to be to not mention variables in this list at all if they're to be undefined on Windows. I realize that we've frequently done that by omission in pg_config.h.win32, but I don't think it's good

Re: automating pg_config.h.win32 maintenance

2019-12-13 Thread Peter Eisentraut
On 2019-12-13 14:44, Michael Paquier wrote: It would be nice to put a comment close to FLEXIBLE_ARRAY_MEMBER, where you use "/* */" as a way to emulate an empty value which is still defined. Or would it be cleaner to just use an empty string? That's just the way Autoconf does it. I haven't

Re: automating pg_config.h.win32 maintenance

2019-12-13 Thread Tom Lane
Michael Paquier writes: > On Fri, Dec 13, 2019 at 03:14:08PM +0200, Heikki Linnakangas wrote: >> On 13/12/2019 14:51, Peter Eisentraut wrote: >>> Keeping pg_config.h.win32 up to date with pg_config.h.in is a gratuitous >>> annoyance. >> Hear hear! > Youpi. +1 >> I don't think this

Re: automating pg_config.h.win32 maintenance

2019-12-13 Thread Michael Paquier
On Fri, Dec 13, 2019 at 03:14:08PM +0200, Heikki Linnakangas wrote: > On 13/12/2019 14:51, Peter Eisentraut wrote: >> Keeping pg_config.h.win32 up to date with pg_config.h.in is a gratuitous >> annoyance. > > Hear hear! Youpi. > I don't think this @simple_defines is really any better than

Re: automating pg_config.h.win32 maintenance

2019-12-13 Thread Heikki Linnakangas
On 13/12/2019 14:51, Peter Eisentraut wrote: Keeping pg_config.h.win32 up to date with pg_config.h.in is a gratuitous annoyance. Hear hear! My proposal is that we essentially emulate what config.status does in Perl code. config.status gets a list of defines discovered by configure and

automating pg_config.h.win32 maintenance

2019-12-13 Thread Peter Eisentraut
Keeping pg_config.h.win32 up to date with pg_config.h.in is a gratuitous annoyance. This setup dates back to the minimal client-only Windows builds using win32.mak files, which has been removed in PG10. The MSVC build system has the power of Perl available, so we can do better. My proposal