Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27
От | John Marino |
---|---|
Тема | Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27 |
Дата | |
Msg-id | 5071FD44.7060907@marino.st обсуждение исходный текст |
Ответ на | Re: BUG #7588: pgsql 9.1 incompatible with zlib 1.27 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
On 10/7/2012 22:26, Tom Lane wrote: > John Marino<draco@marino.st> writes: >> Are you 100% sure that offsetof is evaluated at compile time? Is this >> not part of section 6.6 that I quoted earlier? > > My copy of C99 sayeth (in section 7.17) > > offsetof(type, member-designator) > > which expands to an integer constant expression that has > type size_t, the value of which is the offset in bytes, to > the structure member (designated by member-designator), from > the beginning of its structure (designated by type). > > If your version of gcc isn't treating it as an integer constant > expression, you either have a bug in the compiler or a bug in your > version of<stddef.h>. And I will say once more that we have not > encountered any other report of gcc having a problem with this code. > > regards, tom lane Final follow-up: The culprit was indeed an older offsetof macro. I've committed a fix to the trunk of DragonFly: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/262e0d745238888fc693cd80f79c7ac0c513769f Using the GCC builtin version of offsetof allows Postgresql 9.1.6 to build without the recently added patches. I'm going to revert that commit as well. Thanks for the pointers, Tom! John
В списке pgsql-bugs по дате отправления: