Move CRC tables to libpgport, and provide them in a separate include file.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 29 Feb 2012 00:53:39 +0000 (19:53 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 29 Feb 2012 00:53:39 +0000 (19:53 -0500)
commit5c02a00d440b90ead12658ce6ec9f4eee95dd0a3
tree8211e45b554a6b4a3c35b2d919bdcc8cbd8c344c
parent0140a11b9ba5b22e1e4807e178bca770d46c3e28
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
src/backend/utils/hash/Makefile
src/bin/pg_controldata/.gitignore
src/bin/pg_controldata/Makefile
src/bin/pg_resetxlog/.gitignore
src/bin/pg_resetxlog/Makefile
src/include/utils/pg_crc_tables.h [moved from src/backend/utils/hash/pg_crc.c with 98% similarity]
src/port/Makefile
src/port/pg_crc.c [new file with mode: 0644]
src/tools/msvc/Project.pm