libcharset: Fix use of a few undefined defines

Since we copy the libcharset code in, it makes use of a few defines
which our build system didn’t previously define. Hook those up in
`meson.build` rather than changing the code (even though some of it’s
dead code) so we don’t diverge from upstream libcharset.

This helps with `-Wundef` support.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2025-04-10 12:22:56 +01:00
parent fdba77e584
commit 2883612379
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA

View File

@ -1,6 +1,10 @@
charset_lib = static_library('charset', 'localcharset.c',
include_directories : configinc,
pic : true,
c_args : [ '-DGLIB_CHARSETALIAS_DIR="@0@"'.format(glib_charsetaliasdir) ],
c_args : [
'-DGLIB_CHARSETALIAS_DIR="@0@"'.format(glib_charsetaliasdir),
'-DENABLE_RELOCATABLE=0',
'-DHAVE_DECL_GETC_UNLOCKED=@0@'.format(have_func_getc_unlocked ? 1 : 0),
],
gnu_symbol_visibility : 'hidden',
)