Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8269ad4

Browse files
committed
Force PG client applications to link to non-shared libpgport before
linking to libpq. This insulates applications from changes in libpq'susage of libpgport functions.Backpatched to 8.0.X.
1 parent208ec47 commit8269ad4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎src/Makefile.global.in

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.209 2005/01/26 19:23:59 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.210 2005/03/24 19:33:32 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -306,7 +306,17 @@ libpq_srcdir = $(top_srcdir)/src/interfaces/libpq
306306
libpq_builddir =$(top_builddir)/src/interfaces/libpq
307307
endif
308308

309-
libpq = -L$(libpq_builddir) -lpq
309+
# Force clients to pull symbols from the non-shared library libpgport
310+
# rather than pulling some libpgport symbols from libpq just because
311+
# libpq uses those functions too. This makes applications less
312+
# dependent on changes in libpq's usage of pgport. To do this we link to
313+
# pgport before libpq. This does cause duplicate -lpgport's to appear
314+
# on client link lines.
315+
ifdefPGXS
316+
libpq = -L$(libdir) -lpgport -L$(libpq_builddir) -lpq
317+
else
318+
libpq = -L$(top_builddir)/src/port -lpgport -L$(libpq_builddir) -lpq
319+
endif
310320

311321
# If doing static linking, shared library dependency can't be
312322
# used so we specify pthread libs for every usage of libpq

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp