Build every ECPG library with -DFRONTEND.
authorNoah Misch <[email protected]>
Fri, 24 Apr 2015 23:29:02 +0000 (19:29 -0400)
committerNoah Misch <[email protected]>
Fri, 24 Apr 2015 23:29:02 +0000 (19:29 -0400)
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.

src/interfaces/ecpg/compatlib/Makefile
src/interfaces/ecpg/pgtypeslib/Makefile
src/tools/msvc/Mkvcbuild.pm

index ce01df356ce4f56e85b60c7a8ddb8f00d57601dd..e0b0474ada1a8479372748e704ac9e8dd1ac9a49 100644 (file)
@@ -19,7 +19,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 7
 
 override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-       -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS)
+       -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils -DFRONTEND $(CPPFLAGS)
 override CFLAGS += $(PTHREAD_CFLAGS)
 
 SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \
index 80595b1021bd4045ce28069346228fea52bcd062..52c83be3c0f0e0289061e4f2d5b4540e7cf2f59c 100644 (file)
@@ -19,7 +19,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 6
 
 override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-       -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
+       -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS)
 override CFLAGS += $(PTHREAD_CFLAGS)
 
 # Need to recompile any libpgport object files
index 8654bfe3ce75854ddd4e161f1a595d3be23035e7..9d0cf8d01ecf15e9e1c156404332b5b45c40d3c0 100644 (file)
@@ -354,6 +354,7 @@ sub mkvcbuild
        my $libecpgcompat = $solution->AddProject(
                'libecpg_compat', 'dll',
                'interfaces',     'src\interfaces\ecpg\compatlib');
+       $libecpgcompat->AddDefine('FRONTEND');
        $libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include');
        $libecpgcompat->AddIncludeDir('src\interfaces\libpq');
        $libecpgcompat->UseDef('src\interfaces\ecpg\compatlib\compatlib.def');