Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f39418e

Browse files
committed
Switch dependency order of libpgcommon and libpgport
Continuing 63f32f3, 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.
1 parent ed632ab commit f39418e

File tree

11 files changed

+14
-15
lines changed

11 files changed

+14
-15
lines changed

src/Makefile.global.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ endif
510510

511511
LIBOBJS = @LIBOBJS@
512512

513-
LIBS := -lpgport -lpgcommon $(LIBS)
513+
LIBS := -lpgcommon -lpgport $(LIBS)
514514

515515
# to make ws2_32.lib the last library, and always link with shfolder,
516516
# so SHGetFolderName isn't picked up from shell32.dll

src/bin/initdb/nls.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# src/bin/initdb/nls.mk
22
CATALOG_NAME = initdb
33
AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru zh_CN
4-
GETTEXT_FILES = findtimezone.c initdb.c ../../common/fe_memutils.c ../../port/dirmod.c ../../port/exec.c ../../port/wait_error.c
4+
GETTEXT_FILES = findtimezone.c initdb.c ../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c ../../port/dirmod.c
55
GETTEXT_TRIGGERS = simple_prompt

src/bin/pg_config/nls.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# src/bin/pg_config/nls.mk
22
CATALOG_NAME = pg_config
33
AVAIL_LANGUAGES = cs de es fr it ja ko nb pl pt_BR ro ru sv ta tr zh_CN zh_TW
4-
GETTEXT_FILES = pg_config.c ../../port/exec.c
4+
GETTEXT_FILES = pg_config.c ../../common/exec.c

src/bin/pg_ctl/nls.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# src/bin/pg_ctl/nls.mk
22
CATALOG_NAME = pg_ctl
33
AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru sv zh_CN zh_TW
4-
GETTEXT_FILES = pg_ctl.c ../../common/fe_memutils.c ../../port/exec.c ../../port/wait_error.c
4+
GETTEXT_FILES = pg_ctl.c ../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c

src/bin/pg_dump/nls.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GETTEXT_FILES = pg_backup_archiver.c pg_backup_db.c pg_backup_custom.c \
77
pg_dump.c common.c pg_dump_sort.c \
88
pg_restore.c pg_dumpall.c \
99
parallel.c parallel.h pg_backup_utils.c pg_backup_utils.h \
10-
../../common/fe_memutils.c ../../port/exec.c
10+
../../common/exec.c ../../common/fe_memutils.c
1111
GETTEXT_TRIGGERS = write_msg:2 exit_horribly:2 simple_prompt \
1212
ExecuteSqlCommand:3 ahlog:3 warn_or_exit_horribly:3
1313
GETTEXT_FLAGS = \

src/bin/psql/nls.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ AVAIL_LANGUAGES = cs de es fr it ja pl pt_BR ru zh_CN zh_TW
44
GETTEXT_FILES = command.c common.c copy.c help.c input.c large_obj.c \
55
mainloop.c print.c psqlscan.c startup.c describe.c sql_help.h sql_help.c \
66
tab-complete.c variables.c \
7-
../../common/fe_memutils.c ../../port/exec.c ../../port/wait_error.c
7+
../../common/exec.c ../../common/fe_memutils.c ../../common/wait_error.c
88
GETTEXT_TRIGGERS = N_ psql_error simple_prompt
99
GETTEXT_FLAGS = psql_error:1:c-format

src/common/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ include $(top_builddir)/src/Makefile.global
2323
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
2424
LIBS += $(PTHREAD_LIBS)
2525

26-
OBJS_COMMON = relpath.o
26+
OBJS_COMMON = exec.o relpath.o wait_error.o
2727

2828
OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o
2929

src/port/exec.c renamed to src/common/exec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* src/port/exec.c
12+
* src/common/exec.c
1313
*
1414
*-------------------------------------------------------------------------
1515
*/

src/port/wait_error.c renamed to src/common/wait_error.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* src/port/wait_error.c
12+
* src/common/wait_error.c
1313
*
1414
*-------------------------------------------------------------------------
1515
*/

src/port/Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ include $(top_builddir)/src/Makefile.global
3030
override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
3131
LIBS += $(PTHREAD_LIBS)
3232

33-
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o exec.o fls.o inet_net_ntop.o \
33+
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o fls.o inet_net_ntop.o \
3434
noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o \
3535
pgstrcasecmp.o pqsignal.o \
36-
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o \
37-
wait_error.o
36+
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o
3837

3938
# foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND
4039
OBJS_SRV = $(OBJS:%.o=%_srv.o)

src/tools/msvc/Mkvcbuild.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ sub mkvcbuild
6767
our @pgportfiles = qw(
6868
asprintf.c chklocale.c crypt.c fls.c fseeko.c getrusage.c inet_aton.c random.c
6969
srandom.c getaddrinfo.c gettimeofday.c inet_net_ntop.c kill.c open.c
70-
erand48.c snprintf.c strlcat.c strlcpy.c dirmod.c exec.c noblock.c path.c
70+
erand48.c snprintf.c strlcat.c strlcpy.c dirmod.c noblock.c path.c
7171
pgcheckdir.c pg_crc.c pgmkdirp.c pgsleep.c pgstrcasecmp.c pqsignal.c
7272
qsort.c qsort_arg.c quotes.c
73-
sprompt.c tar.c thread.c wait_error.c getopt.c getopt_long.c dirent.c rint.c win32env.c
73+
sprompt.c tar.c thread.c getopt.c getopt_long.c dirent.c rint.c win32env.c
7474
win32error.c win32setlocale.c);
7575

7676
our @pgcommonallfiles = qw(
77-
relpath.c);
77+
exec.c relpath.c wait_error.c);
7878

7979
our @pgcommonfrontendfiles = (@pgcommonallfiles, qw(fe_memutils.c));
8080

0 commit comments

Comments
 (0)