Re: Importing pg_bsd_indent into our source tree

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Importing pg_bsd_indent into our source tree
Date: 2023-02-09 22:14:50
Message-ID: 20230209221450.bkuozhhzlgpupx4d@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-02-09 13:55:32 -0800, Andres Freund wrote:
> ../src/tools/pg_bsd_indent/args.c(179): error C2065: 'PATH_MAX': undeclared identifier
> ../src/tools/pg_bsd_indent/args.c(179): error C2057: expected constant expression
> ../src/tools/pg_bsd_indent/args.c(179): error C2466: cannot allocate an array of constant size 0
> ../src/tools/pg_bsd_indent/args.c(179): error C2133: 'fname': unknown size
> ../src/tools/pg_bsd_indent/args.c(183): warning C4034: sizeof returns 0
> ../src/tools/pg_bsd_indent/args.c(185): warning C4034: sizeof returns 0
> [1557/2161] Compiling C object src/tools/pg_bsd_indent/pg_bsd_indent.exe.p/err.c.obj
> [1558/2161] Precompiling header src/interfaces/ecpg/ecpglib/libecpg.dll.p/meson_pch-c.c
> [1559/2161] Compiling C object src/tools/pg_bsd_indent/pg_bsd_indent.exe.p/indent.c.obj
> FAILED: src/tools/pg_bsd_indent/pg_bsd_indent.exe.p/indent.c.obj
> "cl" "-Isrc\tools/pg_bsd_indent\pg_bsd_indent.exe.p" "-Isrc\tools/pg_bsd_indent" "-I..\src\tools\pg_bsd_indent" "-Isrc\include" "-I..\src\include" "-Ic:\openssl\1.1\include" "-I..\src\include\port\win32" "-I..\src\include\port\win32_msvc" "/MDd" "/nologo" "/showIncludes" "/utf-8" "/W2" "/Od" "/Zi" "/DWIN32" "/DWINDOWS" "/D__WINDOWS__" "/D__WIN32__" "/D_CRT_SECURE_NO_DEPRECATE" "/D_CRT_NONSTDC_NO_DEPRECATE" "/wd4018" "/wd4244" "/wd4273" "/wd4101" "/wd4102" "/wd4090" "/wd4267" "/Fdsrc\tools/pg_bsd_indent\pg_bsd_indent.exe.p\indent.c.pdb" /Fosrc/tools/pg_bsd_indent/pg_bsd_indent.exe.p/indent.c.obj "/c" ../src/tools/pg_bsd_indent/indent.c
> ../src/tools/pg_bsd_indent/indent.c(63): error C2065: 'MAXPATHLEN': undeclared identifier
> ../src/tools/pg_bsd_indent/indent.c(63): error C2057: expected constant expression
> ../src/tools/pg_bsd_indent/indent.c(63): error C2466: cannot allocate an array of constant size 0
>
> This specific issue at least should be easily fixable.

The trivial fix of using MAXPGPATH made it build, without warnings. That
doesn't say anything about actually working. So I guess porting the test would
make sense.

Opinions on whether it would make sense as a shell script?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-02-09 22:19:19 Re: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message Tom Lane 2023-02-09 22:12:52 Re: Importing pg_bsd_indent into our source tree