Commit f39418e9 authored by Peter Eisentraut's avatar Peter Eisentraut

Switch dependency order of libpgcommon and libpgport

Continuing 63f32f34, libpgcommon should
depend on libpgport, but not vice versa.  But wait_result_to_str() in
wait_error.c depends on pstrdup() in libpgcommon.  So move exec.c and
wait_error.c from libpgport to libpgcommon.  Also switch the link order
in the place that's actually used by the failing ecpg builds.

The function declarations have been left in port.h for now.  That should
perhaps be separated sometime.
parent ed632ab2
......@@ -510,7 +510,7 @@ endif
LIBOBJS = @LIBOBJS@
LIBS := -lpgport -lpgcommon $(LIBS)
LIBS := -lpgcommon -lpgport $(LIBS)
# to make ws2_32.lib the last library, and always link with shfolder,
# so SHGetFolderName isn't picked up from shell32.dll
......
# src/bin/initdb/nls.mk
CATALOG_NAME = initdb
AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru zh_CN
GETTEXT_FILES = findtimezone.c initdb.c ../../common/fe_memutils.c ../../port/dirmod.c ../../port/exec.c ../../port/wait_error.c
GETTEXT_FILES = findtimezone.c initdb.c ../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c ../../port/dirmod.c
GETTEXT_TRIGGERS = simple_prompt
# src/bin/pg_config/nls.mk
CATALOG_NAME = pg_config
AVAIL_LANGUAGES = cs de es fr it ja ko nb pl pt_BR ro ru sv ta tr zh_CN zh_TW
GETTEXT_FILES = pg_config.c ../../port/exec.c
GETTEXT_FILES = pg_config.c ../../common/exec.c
# src/bin/pg_ctl/nls.mk
CATALOG_NAME = pg_ctl
AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru sv zh_CN zh_TW
GETTEXT_FILES = pg_ctl.c ../../common/fe_memutils.c ../../port/exec.c ../../port/wait_error.c
GETTEXT_FILES = pg_ctl.c ../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c
......@@ -7,7 +7,7 @@ GETTEXT_FILES = pg_backup_archiver.c pg_backup_db.c pg_backup_custom.c \
pg_dump.c common.c pg_dump_sort.c \
pg_restore.c pg_dumpall.c \
parallel.c parallel.h pg_backup_utils.c pg_backup_utils.h \
../../common/fe_memutils.c ../../port/exec.c
../../common/exec.c ../../common/fe_memutils.c
GETTEXT_TRIGGERS = write_msg:2 exit_horribly:2 simple_prompt \
ExecuteSqlCommand:3 ahlog:3 warn_or_exit_horribly:3
GETTEXT_FLAGS = \
......
......@@ -4,6 +4,6 @@ AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru zh_CN zh_TW
GETTEXT_FILES = command.c common.c copy.c help.c input.c large_obj.c \
mainloop.c print.c psqlscan.c startup.c describe.c sql_help.h sql_help.c \
tab-complete.c variables.c \
../../common/fe_memutils.c ../../port/exec.c ../../port/wait_error.c
../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c
GETTEXT_TRIGGERS = N_ psql_error simple_prompt
GETTEXT_FLAGS = psql_error:1:c-format
......@@ -23,7 +23,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
LIBS += $(PTHREAD_LIBS)
OBJS_COMMON = relpath.o
OBJS_COMMON = exec.o relpath.o wait_error.o
OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o
......
......@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* src/port/exec.c
* src/common/exec.c
*
*-------------------------------------------------------------------------
*/
......
......@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* src/port/wait_error.c
* src/common/wait_error.c
*
*-------------------------------------------------------------------------
*/
......
......@@ -30,11 +30,10 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
LIBS += $(PTHREAD_LIBS)
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o exec.o fls.o inet_net_ntop.o \
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o fls.o inet_net_ntop.o \
noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o \
pgstrcasecmp.o pqsignal.o \
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o \
wait_error.o
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o
# foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND
OBJS_SRV = $(OBJS:%.o=%_srv.o)
......
......@@ -67,14 +67,14 @@ sub mkvcbuild
our @pgportfiles = qw(
asprintf.c chklocale.c crypt.c fls.c fseeko.c getrusage.c inet_aton.c random.c
srandom.c getaddrinfo.c gettimeofday.c inet_net_ntop.c kill.c open.c
erand48.c snprintf.c strlcat.c strlcpy.c dirmod.c exec.c noblock.c path.c
erand48.c snprintf.c strlcat.c strlcpy.c dirmod.c noblock.c path.c
pgcheckdir.c pg_crc.c pgmkdirp.c pgsleep.c pgstrcasecmp.c pqsignal.c
qsort.c qsort_arg.c quotes.c
sprompt.c tar.c thread.c wait_error.c getopt.c getopt_long.c dirent.c rint.c win32env.c
sprompt.c tar.c thread.c getopt.c getopt_long.c dirent.c rint.c win32env.c
win32error.c win32setlocale.c);
our @pgcommonallfiles = qw(
relpath.c);
exec.c relpath.c wait_error.c);
our @pgcommonfrontendfiles = (@pgcommonallfiles, qw(fe_memutils.c));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment