Re: Problem with ControlFileData structure being ABI dependent

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Problem with ControlFileData structure being ABI dependent
Дата
Msg-id 47580791.7040204@postgresql.org
обсуждение исходный текст
Ответ на Problem with ControlFileData structure being ABI dependent  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark wrote:
> This is because of (at least) two changes in the ABI between the runtimes used
> by mingw and VC++. 1) Enums are apparently 8 bytes on VC++ but 4 bytes on
> mingw and 2) time_t is 8 bytes on VC++ but 4 bytes on mingw.

For the record:

Mingw
=====

WARNING:  sizeof(ControlFileData)=392
WARNING:  offsetof(state)=16
WARNING:  offsetof(time)=20
WARNING:  offsetof(checkPoint)=24
WARNING:  offsetof(prevCheckPoint)=32
WARNING:  offsetof(checkPointCopy)=40
WARNING:  offsetof(minRecoveryPoint)=76
WARNING:  offsetof(maxAlign)=84
WARNING:  offsetof(floatFormat)=88
WARNING:  offsetof(blcksz)=96
WARNING:  offsetof(relseg)=100
WARNING:  offsetof(xlog)=104
WARNING:  offsetof(xlog)=108
WARNING:  offsetof(nameDataLen)=112
WARNING:  offsetof(indexMaxKeys)=116
WARNING:  offsetof(toast)=120
WARNING:  offsetof(enableIntTimes)=124
WARNING:  offsetof(localeBuflen)=128
WARNING:  offsetof(lc)=132
WARNING:  offsetof(lc)=260
WARNING:  offsetof(crc)=388
WARNING:  crc = 3643130025

VC++
====

WARNING:  sizeof(ControlFileData)=408
WARNING:  offsetof(state)=16
WARNING:  offsetof(time)=24
WARNING:  offsetof(checkPoint)=32
WARNING:  offsetof(prevCheckPoint)=40
WARNING:  offsetof(checkPointCopy)=48
WARNING:  offsetof(minRecoveryPoint)=88
WARNING:  offsetof(maxAlign)=96
WARNING:  offsetof(floatFormat)=104
WARNING:  offsetof(blcksz)=112
WARNING:  offsetof(relseg)=116
WARNING:  offsetof(xlog)=120
WARNING:  offsetof(xlog)=124
WARNING:  offsetof(nameDataLen)=128
WARNING:  offsetof(indexMaxKeys)=132
WARNING:  offsetof(toast)=136
WARNING:  offsetof(enableIntTimes)=140
WARNING:  offsetof(localeBuflen)=144
WARNING:  offsetof(lc)=148
WARNING:  offsetof(lc)=276
WARNING:  offsetof(crc)=404
WARNING:  crc = 2595209512

/D


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Problem with ControlFileData structure being ABI dependent
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Compiling PG on linux