]> granicus.if.org Git - postgresql/commitdiff
Build every ECPG library with -DFRONTEND.
authorNoah Misch <noah@leadboat.com>
Fri, 24 Apr 2015 23:29:02 +0000 (19:29 -0400)
committerNoah Misch <noah@leadboat.com>
Fri, 24 Apr 2015 23:29:27 +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 c8e294a3a377bc27c01eeaab087edcad6e9021c4..350ee3d7c84a3fc1343b606870daa411235947b1 100644 (file)
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 4
 
 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 41f7cc0a874a382aee26536aa651157a4649fe67..4158b2b666f951e7e5e824114640fec69a0de68c 100644 (file)
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 3
 
 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 973ed824dba7229d1b659f1c879aca77f5489cdd..2fafec240ccc218689938da8c23d47ab2cfdf7ea 100644 (file)
@@ -282,6 +282,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');