pgsql: Move code shared between libpq and backend from backend/libpq/ t - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Move code shared between libpq and backend from backend/libpq/ t
Date
Msg-id E1bfm5H-0001Sa-1N@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Move code shared between libpq and backend from backend/libpq/ to common/.

When building libpq, ip.c and md5.c were symlinked or copied from
src/backend/libpq into src/interfaces/libpq, but now that we have a
directory specifically for routines that are shared between the server and
client binaries, src/common/, move them there.

Some routines in ip.c were only used in the backend. Keep those in
src/backend/libpq, but rename to ifaddr.c to avoid confusion with the file
that's now in common.

Fix the comment in src/common/Makefile to reflect how libpq actually links
those files.

There are two more files that libpq symlinks directly from src/backend:
encnames.c and wchar.c. I don't feel compelled to move those right now,
though.

Patch by Michael Paquier, with some changes by me.

Discussion: <69938195-9c76-8523-0af8-eb718ea5b36e@iki.fi>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ec136d19b21791c845b1deeff43df137add0639e

Modified Files
--------------
contrib/passwordcheck/passwordcheck.c |   2 +-
src/backend/commands/user.c           |   2 +-
src/backend/libpq/Makefile            |   2 +-
src/backend/libpq/auth.c              |   4 +-
src/backend/libpq/crypt.c             |   2 +-
src/backend/libpq/hba.c               |   3 +-
src/backend/libpq/ifaddr.c            | 597 +++++++++++++++++++++++++
src/backend/libpq/ip.c                | 819 ----------------------------------
src/backend/libpq/md5.c               | 345 --------------
src/backend/libpq/pqcomm.c            |   2 +-
src/backend/postmaster/pgstat.c       |   2 +-
src/backend/postmaster/postmaster.c   |   2 +-
src/backend/utils/adt/network.c       |   2 +-
src/backend/utils/adt/pgstatfuncs.c   |   2 +-
src/backend/utils/adt/varlena.c       |   2 +-
src/common/Makefile                   |  10 +-
src/common/ip.c                       | 260 +++++++++++
src/common/md5.c                      | 348 +++++++++++++++
src/include/common/ip.h               |  37 ++
src/include/common/md5.h              |  30 ++
src/include/libpq/ifaddr.h            |  30 ++
src/include/libpq/ip.h                |  51 ---
src/include/libpq/md5.h               |  30 --
src/interfaces/libpq/Makefile         |   8 +-
src/interfaces/libpq/fe-auth.c        |   2 +-
src/interfaces/libpq/fe-connect.c     |   2 +-
src/tools/ifaddrs/Makefile            |   4 +-
src/tools/ifaddrs/test_ifaddrs.c      |   2 +-
src/tools/msvc/Mkvcbuild.pm           |   4 +-
29 files changed, 1334 insertions(+), 1272 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Speed up SUM calculation in numeric aggregates.
Next
From: Tom Lane
Date:
Subject: pgsql: Don't require dynamic timezone abbreviations to match underlying