Move CRC tables to libpgport, and provide them in a separate include file.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 5c02a00d440b90ead12658ce6ec9f4eee95dd0a3
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-02-29T00:53:39Z
Releases: 9.2.0
Move CRC tables to libpgport, and provide them in a separate include file.

This makes it much more convenient to build tools for Postgres that are
separately compiled and require a matching CRC implementation.

To prevent multiple copies of the CRC polynomial tables being introduced
into the postgres binaries, they are now included in the static library
libpgport that is mainly meant for replacement system functions.  That
seems like a bit of a kludge, but there's no better place.

This cleans up building of the tools pg_controldata and pg_resetxlog,
which previously had to build their own copies of pg_crc.o.

In the future, external programs that need access to the CRC tables can
include the tables directly from the new header file pg_crc_tables.h.

Daniel Farina, reviewed by Abhijit Menon-Sen and Tom Lane

Files

PathChange+/−
src/backend/utils/hash/Makefile modified +1 −1
src/bin/pg_controldata/.gitignore modified +0 −2
src/bin/pg_controldata/Makefile modified +2 −5
src/bin/pg_resetxlog/.gitignore modified +0 −2
src/bin/pg_resetxlog/Makefile modified +2 −5
src/include/utils/pg_crc_tables.h (from src/backend/utils/hash/pg_crc.c) renamed +11 −9
src/port/Makefile modified +2 −2
src/port/pg_crc.c added +21 −0
src/tools/msvc/Project.pm modified +2 −2