Re: [BUGS] My postmaster just crashed !

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: [BUGS] My postmaster just crashed !
Дата
Msg-id 20050127201038.GA46811@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: [BUGS] My postmaster just crashed !  ("Frank D. Engel, Jr." <fde101@fjrhome.net>)
Список pgsql-general
On Thu, Jan 27, 2005 at 03:00:06PM -0500, Frank D. Engel, Jr. wrote:

> I think it is an internal thing with gcc that the size of a pointer and
> sizeof(int) are always the same, regardless of machine word size...
> with a 64-bit binary, sizeof(int) and sizeof(void *) should both be 8,
> which still causes them to be equal.

Not with gcc 3.4.2 on Solaris 9/sparc -- maybe you're thinking of
sizeof(long).

% cat foo.c
#include <stdio.h>

int
main(void)
{
    printf("sizeof(void *) = %d\n", sizeof(void *));
    printf("sizeof(int)    = %d\n", sizeof(int));
    printf("sizeof(long)   = %d\n", sizeof(long));
    return 0;
}

% gcc -m32 -o foo foo.c
% ./foo
sizeof(void *) = 4
sizeof(int)    = 4
sizeof(long)   = 4

% gcc -m64 -o foo foo.c
% ./foo
sizeof(void *) = 8
sizeof(int)    = 4
sizeof(long)   = 8

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: convert mdb files to pg?
Следующее
От: David Fetter
Дата:
Сообщение: Re: convert mdb files to pg?