MSVC build broken (again)

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

MSVC build broken (again)

От:
"Magnus Hagander" <mha@sollentuna.net>
Дата:
Вложения:
The code around errcode is definitly messy. In CVS now, it actually
renames *our* errcode() function to __msvc_errcode, and exports this
from postgres.exe. This is definitly very borken.

The check for _MSC_VER > 1400 won't come true until Microsoft releases
the next verison of Visual Studio - VS2005 is 1400, not >1400.

Attached patch fixes this. Tested on MSVC and on Mingw.

//Magnus

Re: MSVC build broken (again)

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Magnus Hagander"  writes:
> The code around errcode is definitly messy. In CVS now, it actually
> renames *our* errcode() function to __msvc_errcode, and exports this
> from postgres.exe. This is definitly very borken.

Would it be possible to move the whole  block into win32.h?
This would cause it to be included after  and friends, which
maybe is too late, but taking it out of c.h would be a lot cleaner.

			regards, tom lane

Re: MSVC build broken (again)

От:
"Magnus Hagander" <mha@sollentuna.net>
Дата:
> > The code around errcode is definitly messy. In CVS now, it actually 
> > renames *our* errcode() function to __msvc_errcode, and 
> exports this 
> > from postgres.exe. This is definitly very borken.
> 
> Would it be possible to move the whole  block into win32.h?
> This would cause it to be included after  and 
> friends, which maybe is too late, but taking it out of c.h 
> would be a lot cleaner.

Nope, it needs to go before  and friends, unfortunatly.

//Magnus

Re: MSVC build broken (again)

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Magnus Hagander"  writes:
>> Would it be possible to move the whole  block into win32.h?

> Nope, it needs to go before  and friends, unfortunatly.

OK, patch committed as-is then.  The whole thing still looks awfully
icky though, particularly the way pg_config_os.h is included in one
place for WIN32 and a different place everywhere else.

Would it make sense to split win32.h into two files, one that's included
in the normal pg_config_os.h place and one included after the system
includes?

			regards, tom lane
FAQ