summary |
shortlog | log |
commit |
commitdiff |
tree
first โ
prev โ
next
Tom Lane [Tue, 20 Jun 2017 19:45:41 +0000 (15:45 -0400)]
Adjust in_decl logic to avoid messing up enum declarations.
This is a workaround for an acknowledged upstream bug; it basically
reverts this logic to the way it was in NetBSD indent. While there
may eventually be a different upstream fix, this will do for our
purposes. Add a regression test case that illustrates the problem,
and tweak declarations.0.stdout for slightly different formatting
produced for a function pointer typedef.
Tom Lane [Tue, 20 Jun 2017 19:27:29 +0000 (15:27 -0400)]
Add feature patch for -tpg/-ntpg.
This switch enables using Postgres' rules for using tabs vs spaces
in indents, to match the output of our old "entab" program.
The FreeBSD maintainer wants no part of this, so we'll have to carry
this as a forked patch. (The alternative is to go over to use-tabs-
whenever-possible rules, but that would result in circa 10K lines of
invisible whitespace diffs in the PG sources, which seems like lots
more pain than is justified.)
Tom Lane [Tue, 20 Jun 2017 19:17:08 +0000 (15:17 -0400)]
Adjust "make check" to actually pass.
The f_decls test doesn't quite pass currently, because there's too
much whitespace in the function return types. We don't particularly
care about this for PG purposes, as NetBSD indent did that too, and
we've always had a fixup step for it in the pgindent wrapper script.
So make the expected output file match what actually happens.
(If this ever does get fixed by upstream, we can take that fixup
step out of pgindent.)
In passing, make the "make check" script less noisy.
Tom Lane [Tue, 20 Jun 2017 19:09:25 +0000 (15:09 -0400)]
Add build infrastructure to build in Postgres environment.
Add a Makefile that works with the PGXS infrastructure.
Add err.h and err.c, taken from FreeBSD 11 and cut down to just
the minimum support needed by indent.
Add README.pg_bsd_indent with simple build instructions,
and .gitignore.
Tom Lane [Tue, 20 Jun 2017 18:56:53 +0000 (14:56 -0400)]
Adjust #include's to build in Postgres rather than FreeBSD environment.
Remove '#include <sys/cdefs.h>', which will fail in many non-BSD
environments, as well as the __FBSDID() FreeBSD-ism. Replace them
with '#include "c.h"', which will allow use of the Postgres
project's portability infrastructure. This is intended to be a
permanent diff between the FreeBSD upstream files and our copy.
Tom Lane [Tue, 20 Jun 2017 18:45:29 +0000 (14:45 -0400)]
Import current development version of FreeBSD indent.
This commit copies Piotr Stefaniak's development repo
https://github.com/pstef/freebsd_indent
as of commit
5d3b621cd54de672983c51d9622dee84d458dd83 (2017-06-18).
But I've omitted Makefile and Makefile.depend, as they are of no use
in non-BSD build environments.