From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Move code shared between libpq and backend from backend/libpq/ t |
Date: | 2016-09-02 10:52:31 |
Message-ID: | E1bfm5H-0001Sa-1N@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)iki(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-09-02 21:30:20 | pgsql: Don't require dynamic timezone abbreviations to match underlying |
Previous Message | Heikki Linnakangas | 2016-09-02 08:52:10 | pgsql: Speed up SUM calculation in numeric aggregates. |