Build every ECPG library with -DFRONTEND.
authorNoah Misch
Fri, 24 Apr 2015 23:29:02 +0000 (19:29 -0400)
committerNoah Misch
Fri, 24 Apr 2015 23:29:21 +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 84021ac95bb77eb57859772d295871aa572804df..80a9ec08d046e60c0e45a477e805bdd80da3cbda 100644 (file)
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 6
 
 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 6b490a7f34c48097caf5fbfe75cc84ea83d36b10..79d15f0124dfc64c56142ac787e77bde85003bc4 100644 (file)
@@ -18,7 +18,7 @@ SO_MAJOR_VERSION= 3
 SO_MINOR_VERSION= 5
 
 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 ca0876868d02c82065790224d727a54d550efa19..528983be706b136bfcf791f4e8b76cdcf3f148c4 100644 (file)
@@ -306,6 +306,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');