Skip to content

Commit 5eab0f1

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 b743a8b commit 5eab0f1

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= 4
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= 3
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
@@ -282,6 +282,7 @@ sub mkvcbuild
282282
my $libecpgcompat = $solution->AddProject(
283283
'libecpg_compat', 'dll',
284284
'interfaces', 'src\interfaces\ecpg\compatlib');
285+
$libecpgcompat->AddDefine('FRONTEND');
285286
$libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include');
286287
$libecpgcompat->AddIncludeDir('src\interfaces\libpq');
287288
$libecpgcompat->UseDef('src\interfaces\ecpg\compatlib\compatlib.def');

0 commit comments

Comments
 (0)