Commit
5e13b0f24 used a .c file for a file containing a code fragment,
to avoid adding an exception to headerscheck. That turned out to be
too clever, since it meant installation didn't happen by the usual
mechanism. Make it look like a normal header and add the requisite
exception.
Bug: #19450
Reported-by: RekGRpth <rekgrpth@gmail.com>
Discussion: https://postgr.es/m/19450-
bb0612c50c6786e5@postgresql.org
static uint32
pg_checksum_block_fallback(const PGChecksummablePage *page)
{
-#include "storage/checksum_block.inc.c"
+#include "storage/checksum_block_internal.h"
}
/*
static uint32
pg_checksum_block_avx2(const PGChecksummablePage *page)
{
-#include "storage/checksum_block.inc.c"
+#include "storage/checksum_block_internal.h"
}
#endif /* USE_AVX2_WITH_RUNTIME_CHECK */
/*-------------------------------------------------------------------------
*
- * checksum_block.inc.c
+ * checksum_block_internal.h
* Core algorithm for page checksums, semi-private to checksum_impl.h
* and checksum.c.
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * src/include/storage/checksum_block.inc.c
+ * src/include/storage/checksum_block_internal.h
*
*-------------------------------------------------------------------------
*/
-/* there is deliberately not an #ifndef CHECKSUM_BLOCK_INC_C here */
+/* there is deliberately not an #ifndef CHECKSUM_BLOCK_INTERNAL_H here */
uint32 sums[N_SUMS];
uint32 result = 0;
static uint32
pg_checksum_block(const PGChecksummablePage *page)
{
-#include "storage/checksum_block.inc.c"
+#include "storage/checksum_block_internal.h"
}
#endif
# sepgsql.h depends on headers that aren't there on most platforms.
test "$f" = contrib/sepgsql/sepgsql.h && continue
- # nodetags.h cannot be included standalone: it's just a code fragment.
+ # These files cannot be included standalone, because they contain
+ # code fragments.
test "$f" = src/include/nodes/nodetags.h && continue
test "$f" = src/backend/nodes/nodetags.h && continue
+ test "$f" = src/include/storage/checksum_block_internal.h && continue
# These files are not meant to be included standalone, because
# they contain lists that might have multiple use-cases.