Unix Technical Forum

Re: Adminpack build fix

This is a discussion on Re: Adminpack build fix within the Pgsql Patches forums, part of the PostgreSQL category; --> "Magnus Hagander" <mha@sollentuna.net> writes: > Attached patch removes a couple of extern definitions from adminpack, > replacing some of ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:04 AM
Tom Lane
 
Posts: n/a
Default Re: Adminpack build fix

"Magnus Hagander" <mha@sollentuna.net> writes:
> Attached patch removes a couple of extern definitions from adminpack,
> replacing some of them with a #include. (Cam eup with this because we
> got a duplicate definition of DataDir when building with Visual C++).


That isn't going to work unless we put DLLIMPORT into the main headers.
The reason for redeclaring these in the contrib files is to get
DLLIMPORT onto them...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 10:04 AM
Magnus Hagander
 
Posts: n/a
Default Re: Adminpack build fix

> > Attached patch removes a couple of extern definitions from
> adminpack,
> > replacing some of them with a #include. (Cam eup with this

> because we
> > got a duplicate definition of DataDir when building with

> Visual C++).
>
> That isn't going to work unless we put DLLIMPORT into the
> main headers.
> The reason for redeclaring these in the contrib files is to
> get DLLIMPORT onto them...


Interedting - it builds on MSVC without it :-O

Anyway. That certainly explains why MSVC is complaining - it's getting
completely different definitions of these variables from the header and
from the actual file.

What do you think about simply adding DLLIMPORT to the variables in the
main header?

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 10:05 AM
Tom Lane
 
Posts: n/a
Default Re: Adminpack build fix

"Magnus Hagander" <mha@sollentuna.net> writes:
>> The reason for redeclaring these in the contrib files is to
>> get DLLIMPORT onto them...


> Interedting - it builds on MSVC without it :-O


> Anyway. That certainly explains why MSVC is complaining - it's getting
> completely different definitions of these variables from the header and
> from the actual file.


The same redeclaration technique is being used elsewhere (pg_buffercache
and pg_freespacemap it looks like). Aren't you getting warnings there
too?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 10:05 AM
Magnus Hagander
 
Posts: n/a
Default Re: Adminpack build fix

> >> The reason for redeclaring these in the contrib files is to get
> >> DLLIMPORT onto them...

>
> > Interedting - it builds on MSVC without it :-O

>
> > Anyway. That certainly explains why MSVC is complaining -

> it's getting
> > completely different definitions of these variables from the header
> > and from the actual file.

>
> The same redeclaration technique is being used elsewhere
> (pg_buffercache and pg_freespacemap it looks like). Aren't
> you getting warnings there too?


I am - I just started working on getting those done as well. (they were
also living on my list of fix-later ones for some other reasons - the
other reasons now having been fixed)

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 10:05 AM
Tom Lane
 
Posts: n/a
Default Re: Adminpack build fix

"Magnus Hagander" <mha@sollentuna.net> writes:
>> The same redeclaration technique is being used elsewhere
>> (pg_buffercache and pg_freespacemap it looks like). Aren't
>> you getting warnings there too?


> I am - I just started working on getting those done as well.


OK, I guess we gotta play them all honestly. Will fix.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:42 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com