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

Commit6b1c5ca

Browse files
committed
Remove logging.c from the shared library of src/common/
As fe0a1dc has proved, it is not a good concept to add to libpqdependencies that would enforce the error output to a central loggingfacility because it breaks the promise of reporting the error back toan application in a consistent way, with the application to potentiallyexit() suddenly if using pieces from for example jsonapi.c. prairiedoghas allowed to report an actual design problem with fe0a1dc, but it willnot be around forever, so removing logging.c from libpgcommon_shlib is asimple and much better long-term way to prevent any attempt to load thecentral logging in libraries with general purposes.Author: Michael PaquierReviewed-by: Tom LaneDiscussion:https://postgr.es/m/20200928073330.GC2316@paquier.xyz
1 parent7b28913 commit6b1c5ca

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/common/Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,21 @@ OBJS_COMMON += sha2.o
8888
endif
8989

9090
# A few files are currently only built for frontend, not server
91-
# (Mkvcbuild.pm has a copy of this list, too)
92-
OBJS_FRONTEND =\
91+
# (Mkvcbuild.pm has a copy of this list, too). logging.c is excluded
92+
# from OBJS_FRONTEND_SHLIB (shared library) as a matter of policy,
93+
# because it is not appropriate for general purpose libraries such
94+
# as libpq to report errors directly.
95+
OBJS_FRONTEND_SHLIB =\
9396
$(OBJS_COMMON)\
9497
fe_memutils.o\
95-
logging.o\
9698
restricted_token.o\
9799
sprompt.o
100+
OBJS_FRONTEND =\
101+
$(OBJS_FRONTEND_SHLIB)\
102+
logging.o
98103

99104
# foo.o, foo_shlib.o, and foo_srv.o are all built from foo.c
100-
OBJS_SHLIB =$(OBJS_FRONTEND:%.o=%_shlib.o)
105+
OBJS_SHLIB =$(OBJS_FRONTEND_SHLIB:%.o=%_shlib.o)
101106
OBJS_SRV =$(OBJS_COMMON:%.o=%_srv.o)
102107

103108
# where to find gen_keywordlist.pl and subsidiary files

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp