summaryrefslogtreecommitdiff
path: root/src/tools/pg_bsd_indent/indent.h
diff options
context:
space:
mode:
authorTom Lane2023-02-12 17:22:21 +0000
committerTom Lane2023-02-12 17:22:21 +0000
commit156c049beed9d3f243cdceaf89456ea6a2995493 (patch)
treef3fcb3b7f3734123e0c5f767763cfea3761f198f /src/tools/pg_bsd_indent/indent.h
parentb44e5fced3e5a6d3d971a51757a306eacc349bf3 (diff)
Integrate pg_bsd_indent into our build/test infrastructure.
Update the Makefile and build directions for in-tree build, and add Meson build infrastructure. Also convert the ad-hoc test target into a TAP test. Currently, the Make build system will not build pg_bsd_indent by default, while the Meson system will. Both will test it during "make check-world" or "ninja test". Neither will install it automatically. (We might change some of these decisions later.) Also fix a few portability nits noted during early testing. Also, exclude pg_bsd_indent from pgindent's purview; at least for now, we'll leave it formatted similarly to the FreeBSD original. Tom Lane and Andres Freund Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/tools/pg_bsd_indent/indent.h')
-rw-r--r--src/tools/pg_bsd_indent/indent.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/pg_bsd_indent/indent.h b/src/tools/pg_bsd_indent/indent.h
index 1708dbc19f9..d9fff8ccd6d 100644
--- a/src/tools/pg_bsd_indent/indent.h
+++ b/src/tools/pg_bsd_indent/indent.h
@@ -28,7 +28,7 @@
__FBSDID("$FreeBSD: head/usr.bin/indent/indent.h 303746 2016-08-04 15:27:09Z pfg $");
#endif
-#define nitems(array) (sizeof (array) / sizeof (array[0]))
+#define nitems(x) (sizeof((x)) / sizeof((x)[0]))
void add_typename(const char *);
void alloc_typenames(void);