pgsql: Move CRC tables to libpgport, and provide them in a separate inc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move CRC tables to libpgport, and provide them in a separate inc
Date: 2012-02-29 00:54:08
Message-ID: E1S2Xo0-0004uv-FW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5c02a00d440b90ead12658ce6ec9f4eee95dd0a3

Modified Files
--------------
src/backend/utils/hash/Makefile | 2 +-
src/backend/utils/hash/pg_crc.c | 515 ------------------------------------
src/bin/pg_controldata/.gitignore | 2 -
src/bin/pg_controldata/Makefile | 7 +-
src/bin/pg_resetxlog/.gitignore | 2 -
src/bin/pg_resetxlog/Makefile | 7 +-
src/include/utils/pg_crc_tables.h | 517 +++++++++++++++++++++++++++++++++++++
src/port/Makefile | 4 +-
src/port/pg_crc.c | 21 ++
src/tools/msvc/Project.pm | 4 +-
10 files changed, 547 insertions(+), 534 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2012-02-29 03:27:45 pgsql: Fix typo in comment
Previous Message Tom Lane 2012-02-28 23:10:52 pgsql: Fix thinko in new match_join_clauses_to_index() logic.