As suggested at [0], we can move the computation of MAXIMUM_ALIGNOF from
configure.ac and meson.build to c.h. This eliminates code duplication.
(For example, the AIX patch contemplates some changes, so it would be
good to make those in only one place.) Also, it used to be more
complicated, but now it's not really a computation anymore, it's just a
#define and two static assertions, so it's just much easier and natural
this way. (For example, doing a symbol lookup on MAXIMUM_ALIGNOF will
take you to a place with useful context, instead of to pg_config.h.)
The only trick is that the there are some ordering problems in c.h.
MAXIMUM_ALIGNOF is used in the definition of the int128, which comes
very early, before the alignment handling. I moved the int128 stuff to
later in the file, near other types with alignment dependencies. (If
you look closer, you will find other opportunities for a more
comprehensive reshuffling in c.h, but maybe that should be a separate
project.)
[0]:
https://www.postgresql.org/message-id/CA%2BhUKGLQUivg-NC7dHdbRAPmG0Hapg1gGnygM5KgDfDM2a_TMg%40mail.gmail.com