pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Move code shared between libpq and backend from backend/libpq/ t
Date: Fri, 02 Sep 2016 10:52:31 +0000
Message-ID: <E1bfm5H-0001Sa-1N@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1bfm5H-0001Sa-1N@gemulon.postgresql.org>
Permalink:  ../E1bfm5H-0001Sa-1N@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1bfm5H-0001Sa-1N@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Move code shared between libpq and backend from backend/libpq/ t
  In-Reply-To: <E1bfm5H-0001Sa-1N@gemulon.postgresql.org>
  References: <E1bfm5H-0001Sa-1N@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox