Skip to content

Commit 3f27ec4

Browse files
committed
Build every ECPG library with -DFRONTEND.
Each of the libraries incorporates src/port files, which often check FRONTEND. Build systems disagreed on whether to build libpgtypes this way. Only libecpg incorporates files that rely on it today. Back-patch to 9.0 (all supported versions) to forestall surprises.
1 parent 223a946 commit 3f27ec4

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/interfaces/ecpg/compatlib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
1818
SO_MINOR_VERSION= 2
1919

2020
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
21-
-I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS)
21+
-I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils -DFRONTEND $(CPPFLAGS)
2222
override CFLAGS += $(PTHREAD_CFLAGS)
2323

2424
SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \

src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
1818
SO_MINOR_VERSION= 1
1919

2020
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
21-
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
21+
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS)
2222
override CFLAGS += $(PTHREAD_CFLAGS)
2323

2424
# Need to recompile any libpgport object files

src/tools/msvc/Mkvcbuild.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ sub mkvcbuild
241241

242242
my $libecpgcompat =
243243
$solution->AddProject('libecpg_compat','dll','interfaces','src\interfaces\ecpg\compatlib');
244+
$libecpgcompat->AddDefine('FRONTEND');
244245
$libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include');
245246
$libecpgcompat->AddIncludeDir('src\interfaces\libpq');
246247
$libecpgcompat->UseDef('src\interfaces\ecpg\compatlib\compatlib.def');

0 commit comments

Comments
 (0)