Files
systemd/src/hostname
Yu Watanabe e193378d32 macro: Introduce UTF8() macro to define UTF-8 string literal
C23 changed char8_t from char to unsigned char, hence assigning a u8 literal
to const char* emits pointer sign warning, e.g.
========
../src/shared/qrcode-util.c: In function ‘print_border’:
../src/shared/qrcode-util.c:16:34: warning: pointer targets in passing argument 1 of ‘fputs’ differ in signedness [-Wpointer-sign]
   16 | #define UNICODE_FULL_BLOCK       u8"█"
      |                                  ^~~~~
      |                                  |
      |                                  const unsigned char *
../src/shared/qrcode-util.c:65:39: note: in expansion of macro ‘UNICODE_FULL_BLOCK’
   65 |                                 fputs(UNICODE_FULL_BLOCK, output);
      |                                       ^~~~~~~~~~~~~~~~~~
========

This introduces UTF8() macro, which define u8 literal and casts to consth char*,
then rewrites all u8 literal definitions with the macro.
With this change, we can build systemd with C23.
2025-03-16 10:15:24 +09:00
..
2025-03-12 06:26:56 +09:00