Re: x32: mariadb: if defined __ILP32__ and __x86_64__ ?
Hi all!
sent too fast:
On 03/07/2024 12:31, Bernd Petrovitsch wrote:
[...]
On 03/07/2024 06:05, Otto Kekäläinen wrote:
[...]
MariaDB has this piece of code that is failing on x32 as reported in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1063738
tests/mysql_client_fw.c
@@ -1442
#if defined __x86_64__
#if defined(__x86_64__) && !defined(__ILP32__)
Of course you need more but the __ILP32__ symbol is
typically used to distinguish x32 from amd64.
To illustrate it it, e.g.
---- snip ---
#if defined __x86_64__
# if defined __ILP32__
compile_time_assert(sizeof(MYSQL) == 964); // x32
# else
compile_time_assert(sizeof(MYSQL) == 1272); // amd64
# endif
#elif defined __i386__
compile_time_assert(sizeof(MYSQL) == 964); // ix86
#endif
---- snip ---
compile_time_assert(sizeof(MYSQL) == 1272);
#elif defined __i386__
compile_time_assert(sizeof(MYSQL) == 964);
#endif
How should I fix this for x32? What is the preprocessor if clause and
can I safely assume the size is 964?
Kind regards,
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
There is NO CLOUD, just other people's computers. - FSFE
LUGA : http://www.luga.at
Reply to: