Re: Cannot find a working 64-bit integer type on Illumos

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Cannot find a working 64-bit integer type on Illumos
Дата
Msg-id 50a4c05e-c43e-4e7e-95d2-4b16493073ed@eisentraut.org
обсуждение исходный текст
Ответ на Cannot find a working 64-bit integer type on Illumos  (Japin Li <japinli@hotmail.com>)
Ответы Re: Cannot find a working 64-bit integer type on Illumos
Список pgsql-hackers
On 30.11.24 00:42, Thomas Munro wrote:
> On Fri, Nov 29, 2024 at 11:12 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> New idea: let's just redefine PRI...{32,64,PTR} on that platform,
>> instead of modifying snprintf.c.
> 
> D'oh, that's not going to fly.  gettext() would replace %<PRId64> with
> the system's PRId64, so we can't avoid teaching our snprintf.c to
> understand Windowsian format strings.  Here's a first attempt at that.
> Tested a bit by removing the #ifdef WIN32 locally and playing around
> with it.  CI passes on Windows, and I think that should be exercising
> it via existing [U]INT64_FORMAT in various places that would break if
> it didn't work.

This patch looks good to me.

In meson.build, this comment seems to be misplaced by accident:

+# Check if __int128 is a working 128 bit integer type, and if so
+# define PG_INT128_TYPE to that typename.
  cdata.set('SIZEOF_VOID_P', cc.sizeof('void *', args: test_c_args))
  cdata.set('SIZEOF_SIZE_T', cc.sizeof('size_t', args: test_c_args))

In c.h, you include <inttypes.h> instead of <stdint.h>.  Is there a 
reason for that?




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