Обсуждение: pgsql: Blind attempt at fixing the non-MSVC Windows builds

Поиск
Список
Период
Сортировка

pgsql: Blind attempt at fixing the non-MSVC Windows builds

От
Alvaro Herrera
Дата:
Blind attempt at fixing the non-MSVC Windows builds

Apparently, they need -DBUILDING_DLL for the Assert() declarations to
work correctly.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/af0a4c5924061869ee3db391900ab745107c966f

Modified Files
--------------
src/makefiles/Makefile.cygwin |    4 ++++
src/makefiles/Makefile.win32  |    4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)


Re: pgsql: Blind attempt at fixing the non-MSVC Windows builds

От
Alvaro Herrera
Дата:
Andres Freund wrote:
> On 2013-02-22 14:55:06 +0000, Alvaro Herrera wrote:
> > Blind attempt at fixing the non-MSVC Windows builds
> >
> > Apparently, they need -DBUILDING_DLL for the Assert() declarations to
> > work correctly.
>
> More specifically, they need that do access any PGDLLIMPORT symbols. Of
> which
> extern PGDLLIMPORT bool assert_enabled;
> is one. So that seems like the appropriate fix.

Yeah, I'm not really sure if this is okay for both build environments or
is only needed in the backend.  Right now there should be no difference
because we're not using relpath.c in frontend programs; but if we add
pg_xlogdump there might be further problems.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


Re: pgsql: Blind attempt at fixing the non-MSVC Windows builds

От
Andres Freund
Дата:
On 2013-02-22 12:34:19 -0300, Alvaro Herrera wrote:
> Andres Freund wrote:
> > On 2013-02-22 14:55:06 +0000, Alvaro Herrera wrote:
> > > Blind attempt at fixing the non-MSVC Windows builds
> > >
> > > Apparently, they need -DBUILDING_DLL for the Assert() declarations to
> > > work correctly.
> >
> > More specifically, they need that do access any PGDLLIMPORT symbols. Of
> > which
> > extern PGDLLIMPORT bool assert_enabled;
> > is one. So that seems like the appropriate fix.
>
> Yeah, I'm not really sure if this is okay for both build environments or
> is only needed in the backend.  Right now there should be no difference
> because we're not using relpath.c in frontend programs; but if we add
> pg_xlogdump there might be further problems.

I don't think it will matter for relpath itself because that doesn't
seem to access anything but assert_enabled - and that only in backend
builds.
But if we add further stuff which really might access 'extern'
variables, it should also be needed in frontend programs unless I miss
something.

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Re: pgsql: Blind attempt at fixing the non-MSVC Windows builds

От
Andres Freund
Дата:
On 2013-02-22 14:55:06 +0000, Alvaro Herrera wrote:
> Blind attempt at fixing the non-MSVC Windows builds
>
> Apparently, they need -DBUILDING_DLL for the Assert() declarations to
> work correctly.

More specifically, they need that do access any PGDLLIMPORT symbols. Of
which
extern PGDLLIMPORT bool assert_enabled;
is one. So that seems like the appropriate fix.

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services