diff options
| author | Heikki Linnakangas | 2015-02-09 09:17:56 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2015-02-09 09:17:56 +0000 |
| commit | c619c2351f7ec429b6ddce519c939f7b8465d711 (patch) | |
| tree | eabcc2b0f7a82b65e7b7e227926a9ab304133225 /src/port | |
| parent | 40bede5477bb5bce98ce9548841cb414634c26f7 (diff) | |
Move pg_crc.c to src/common, and remove pg_crc_tables.h
To get CRC functionality in a client program, you now need to link with
libpgcommon instead of libpgport. The CRC code has nothing to do with
portability, so libpgcommon is a better home. (libpgcommon didn't exist
when pg_crc.c was originally moved to src/port.)
Remove the possibility to get CRC functionality by just #including
pg_crc_tables.h. I'm not aware of any extensions that actually did that and
couldn't simply link with libpgcommon.
This also moves the pg_crc.h header file from src/include/utils to
src/include/common, which will require changes to any external programs
that currently does #include "utils/pg_crc.h". That seems acceptable, as
include/common is clearly the right home for it now, and the change needed
to any such programs is trivial.
Diffstat (limited to 'src/port')
| -rw-r--r-- | src/port/Makefile | 2 | ||||
| -rw-r--r-- | src/port/pg_crc.c | 21 |
2 files changed, 1 insertions, 22 deletions
diff --git a/src/port/Makefile b/src/port/Makefile index 1be4ff57a2..a0908bf5e3 100644 --- a/src/port/Makefile +++ b/src/port/Makefile @@ -31,7 +31,7 @@ override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS) LIBS += $(PTHREAD_LIBS) OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o fls.o inet_net_ntop.o \ - noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o \ + noblock.o path.o pgcheckdir.o pgmkdirp.o pgsleep.o \ pgstrcasecmp.o pqsignal.o \ qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o diff --git a/src/port/pg_crc.c b/src/port/pg_crc.c deleted file mode 100644 index b944be10a7..0000000000 --- a/src/port/pg_crc.c +++ /dev/null @@ -1,21 +0,0 @@ -/*------------------------------------------------------------------------- - * - * pg_crc.c - * PostgreSQL CRC support - * - * This file simply #includes the CRC table definitions so that they are - * available to programs linked with libpgport. - * - * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * src/port/pg_crc.c - * - *------------------------------------------------------------------------- - */ - -#include "c.h" - -#include "utils/pg_crc_tables.h" |
