Re: Building Windows Server Extensions Using VC++ 2005

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Building Windows Server Extensions Using VC++ 2005
Дата
Msg-id 21766.1141493380@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Building Windows Server Extensions Using VC++ 2005  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Well that sort of stuff is supposed to be covered by the ABI. Consider that if
> it didn't then you wouldn't be able to use any of the standard libraries
> without recompiling them for each compiler since a number of standard library
> APIs depend on structs like timeval or stat.

Maybe.  My experience with these sorts of problems is fairly old (hard
lessons from libjpeg development in the mid-90s), but what I learned at
the time is that all the standard Unix library interfaces are carefully
designed to be fairly impervious to struct padding rules (eg, all the
fields are "int", or at least all the same size), and so you can get
apparent interoperability between compilers that don't agree on these
rules.  Meanwhile, Microsoft, who never met a feature they didn't like,
invented a foot-gun called #pragma pack, and then had to fix all their
headers to nail down the pack setting.  That in turn masks compatibility
issues on that platform, but only if you're willing to #pragma-ify all
of your own headers too.

In short, I don't trust anybody on this issue.  I have the scars to
remind me why not.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: problem with large maintenance_work_mem settings and
Следующее
От: Charlie Savage
Дата:
Сообщение: Re: Building Windows Server Extensions Using VC++ 2005