Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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:24 +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 3545d2b03239e691d6a12679b3704c546e627ff4..ca489d32b94d6c6eec4bc21fe2b048dc8f97f371 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$(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 09b5df30999643a549412a0f0215365ba832b9cd..340bef398bd9b8a57bb178163ec17746f541f8ad 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$(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 94c7fee855692a822629561b010aee46f724f1a6..3782ec53a231ca2fa25b1f37182d09f29bdb084c 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');