Files
RedBear-OS/tests
Anhad Singh 22bbdb025c misc(tests): fix compilation of dlfcn.c
From man dlopen(3)
> According to the ISO C standard, casting between function
> pointers and 'void *', as done above, produces undefined results.
> POSIX.1-2001 and POSIX.1-2008 accepted this state of affairs and
> proposed the following workaround:
>
>   *(void **) (&cosine) = dlsym(handle, "cos");
>
> This (clumsy) cast conforms with the ISO C standard and will
> avoid any compiler warnings.
>
> The 2013 Technical Corrigendum 1 to POSIX.1-2008 improved matters
> by requiring that conforming implementations support casting
> 'void *' to a function pointer.  Nevertheless, some compilers
> (e.g., gcc with the '-pedantic' option) may complain about the
> cast used in this program.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-11-25 18:00:03 +11:00
..
2024-03-01 00:23:42 +00:00
2018-07-26 09:16:22 +02:00
2019-12-02 14:53:55 -05:00
2023-11-12 12:07:49 +01:00
2024-09-28 12:50:00 +00:00
2024-11-02 12:21:47 +00:00
2024-04-05 20:31:06 +00:00
2024-01-17 03:05:50 +00:00
2024-10-06 05:43:17 -07:00
2024-11-17 16:15:07 +00:00
2024-11-17 16:18:14 +00:00
2023-11-12 12:07:49 +01:00
2023-11-12 12:07:49 +01:00
2024-07-23 16:07:25 +02:00
2023-11-12 12:07:49 +01:00
2021-03-01 21:19:04 -07:00
2021-03-01 21:19:04 -07:00
2021-03-01 21:19:04 -07:00
2024-11-17 16:15:07 +00:00
2024-09-06 22:28:24 +02:00
2024-11-17 16:15:07 +00:00
2024-11-10 16:19:15 +01:00
2023-11-12 12:07:49 +01:00
2024-11-17 16:15:07 +00:00
2024-11-17 16:15:07 +00:00
2024-11-17 16:15:07 +00:00
2024-09-24 19:34:53 +02:00
2023-11-12 12:07:49 +01:00
2023-11-12 11:45:15 +01:00
2024-11-17 16:15:07 +00:00
2019-04-28 10:07:42 -06:00
2021-01-05 22:48:41 +01:00
2024-09-28 16:51:17 +02:00
2024-07-18 23:59:48 +02:00
2023-11-12 12:07:49 +01:00
2023-04-15 10:41:42 +01:00
2023-11-12 12:07:49 +01:00