Re: [HACKERS] taking stdbool.h into use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] taking stdbool.h into use
Дата
Msg-id 20130.1502893211@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] taking stdbool.h into use  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: [HACKERS] taking stdbool.h into use  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] taking stdbool.h into use  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> However my system has sizeof(bool) == 1 and so do all the systems I
> have access to (x86 + POWER).  Where can we find a computer with
> sizeof(bool) == 4?  According to the intertubes OSX on POWER and
> Windows 32 bit systems had that in ancient prehistory but they don't
> now.

prairiedog and (I assume) locust.  Maybe coypu --- I imagine OSX
got that choice from upstream BSD someplace.

cube:~ tgl$ uname -a
Darwin cube.sss.pgh.pa.us 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007;
root:xnu-792.24.17~1/RELEASE_PPCPower Macintosh powerpc 
cube:~ tgl$ cat foo.c
#include <stdio.h>
#include <stdbool.h>

int main()
{ printf("sizeof(bool) = %zu\n", sizeof(bool)); return 0;
}
cube:~ tgl$ gcc -O -Wall foo.c
cube:~ tgl$ ./a.out
sizeof(bool) = 4

Don't know how far back you need to go to find Windows machines
with 4-byte bool, but we have some pretty long-in-the-tooth
buildfarm critters in that lineage, too.

gaur/pademelon isn't booted up right now, but it might provide
an example of a system that lacks <stdbool.h> altogether.
(If it doesn't, I'd be willing to concede that we need not
consider that scenario anymore.)
        regards, tom lane



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [HACKERS] Atomics for heap_parallelscan_nextpage()