]> 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:55 +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 5caf1dc0804e0df70a0f7fa2663ae7868d850dad..1d90e44dcaee325265a4c7d45d3fd89f5bdadb59 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$(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 cab4db18bc3684ae120b827f862bfb88d89e361b..5c11c19eb73710596748698693c35ab916326415 100644 (file)
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 2
 
 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 360e97a4419296a63c9372be068d6adf0992d65d..ccd328bef7e555c4b5c514b223919e7822e93915 100644 (file)
@@ -249,6 +249,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');