On Wed, Jan 28, 2026 at 12:33:01PM -0500, Andres Freund wrote:
> Unfortunately I suspect that'll cause issues with make builds, because there
> the files are generated in a different place (src/backend/activity) and then
> only wait_event_types.h is copied to src/include. So including the files as
> utils/ won't work.

Sorry for the crickets and the delay in replying.

> I'd fix that aspect by doing the same thing in the autoconf build as we do in
> meson, i.e. keep the file in the include dir. We already do that e.g. for
> guc_tables.inc.c, see this src/backend/utils/Makefile stanza:
> 
> # These generated headers must be symlinked into src/include/.
> # We use header-stamp to record that we've done this because the symlinks
> # themselves may appear older than fmgr-stamp.
> $(top_builddir)/src/include/utils/header-stamp: fmgr-stamp errcodes.h 
> probes.h guc_tables.inc.c
>       cd '$(dir $@)' && for file in fmgroids.h fmgrprotos.h errcodes.h 
> probes.h guc_tables.inc.c; do \
>         rm -f $$file && $(LN_S) "../../../$(subdir)/$$file" . ; \
>       done
>       touch $@

Yeah, using this route would be sensible, removing the trick with the
incorrect include dir.  Let me a couple of hours to see if I can sort
out a patch..

Should any of these be backpatched, actually?  Based on the lack of
complaints, it does not seem so to me, but if we are targetting a
backpatch of the AIX port, that would be required.

> Alternatively: I'm not a fan of including .c files that are not actually
> working C.  You could just make wait_event_funcs_data.c be a complete C file,
> defining waitEventData, that is then built as a standalone file.

FWIW, that does not strike me as an issue.  We do some of that already
in src/backend/nodes/ for the switch files.  It comes down to simpler
scripts generating the code.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to