Re: MAXIMUM_ALIGNOF on Windows-32

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: MAXIMUM_ALIGNOF on Windows-32
Дата
Msg-id 25805.1185204540@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: MAXIMUM_ALIGNOF on Windows-32  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: MAXIMUM_ALIGNOF on Windows-32
Re: MAXIMUM_ALIGNOF on Windows-32
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Tom Lane wrote:
>> Somebody had better double-check that.  We don't need to be
>> "pessimistic", we need to be *correct*, because the align values had
>> better match the way the compiler will lay out a C struct.  Otherwise
>> struct-based access to catalog rows will fail.  (I'm not sure if there
>> are any system catalogs with float8 or int64 columns, but I'd sure not
>> want to find out that we couldn't have one because of misconfiguration
>> of MSVC builds.)

> How do I double-check this?

The configure script checks it by declaring
struct {    char pad;    TYPE field;} foo

and then measuring offsetof(foo, field), for each interesting TYPE.

>> I see though that the comment in pg_config.h.win32 claims it was derived
>> from mechanically-generated configure output, so unless that's lying
>> it should be OK already. 

> It's not - it started out as a copy of the output of ./configure on mingw.

"Started out as"?  Good luck keeping it in sync, if it's not
mechanically created.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Why is lc_messages superuser only?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: MAXIMUM_ALIGNOF on Windows-32