BUG #2665: VC++ 8 (Visual Studio 2005)

Started by Oliver Arteltover 19 years ago6 messagesbugs
Jump to latest
#1Oliver Artelt
oli@cubeoffice.de

The following bug has been logged online:

Bug reference: 2665
Logged by: Oliver Artelt
Email address: oli@cubeoffice.de
PostgreSQL version: 8.2 beta 1
Operating system: WinXP + SP2
Description: VC++ 8 (Visual Studio 2005)
Details:

... the libpq doesn't compile because the compiler does not know the keyword
inline - after removing it works :-(

so long...

#2Bruce Momjian
bruce@momjian.us
In reply to: Oliver Artelt (#1)
Re: BUG #2665: VC++ 8 (Visual Studio 2005)

Oliver Artelt wrote:

The following bug has been logged online:

Bug reference: 2665
Logged by: Oliver Artelt
Email address: oli@cubeoffice.de
PostgreSQL version: 8.2 beta 1
Operating system: WinXP + SP2
Description: VC++ 8 (Visual Studio 2005)
Details:

... the libpq doesn't compile because the compiler does not know the keyword
inline - after removing it works :-(

Interesting. We have inline redefined in src/include/port/win32.h. Can
you find out why you are not getting those redefined?

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: BUG #2665: VC++ 8 (Visual Studio 2005)

Bruce Momjian <bruce@momjian.us> writes:

Interesting. We have inline redefined in src/include/port/win32.h. Can
you find out why you are not getting those redefined?

AFAICS, all the "#ifdef WIN32_ONLY_COMPILER" code in win32.h is dead
code, because c.h doesn't #define WIN32_ONLY_COMPILER until *after* it's
included pg_config_os.h. It would appear that most of it is indeed
useless and should be removed.

regards, tom lane

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: BUG #2665: VC++ 8 (Visual Studio 2005)

Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Interesting. We have inline redefined in src/include/port/win32.h. Can
you find out why you are not getting those redefined?

AFAICS, all the "#ifdef WIN32_ONLY_COMPILER" code in win32.h is dead
code, because c.h doesn't #define WIN32_ONLY_COMPILER until *after* it's
included pg_config_os.h. It would appear that most of it is indeed
useless and should be removed.

Uh, I think we still do have reasons to test if we are using MSVC or
Borland C. I think the #define should just be moved up in c.h.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#4)
Re: BUG #2665: VC++ 8 (Visual Studio 2005)

Bruce Momjian <bruce@momjian.us> writes:

Uh, I think we still do have reasons to test if we are using MSVC or
Borland C. I think the #define should just be moved up in c.h.

Current evidence says otherwise --- but if you insist, why not put the
define in win32.h in the first place, instead of cluttering c.h with it?

regards, tom lane

#6Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#5)
Re: BUG #2665: VC++ 8 (Visual Studio 2005)

Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Uh, I think we still do have reasons to test if we are using MSVC or
Borland C. I think the #define should just be moved up in c.h.

Current evidence says otherwise --- but if you insist, why not put the
define in win32.h in the first place, instead of cluttering c.h with it?

Well, we certainly need the define for the __inline macro, because was
reported as the bug.

I moved the define to win32.h as you suggested, attached, applied.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/bjm/difftext/x-diffDownload+4-3