mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-13 22:07:15 +01:00
Merge branch 'meson' into 'master'
meson: do a build-time check for strlcpy before attempting runtime check See merge request GNOME/glib!724
This commit is contained in:
commit
10278fd808
@ -1859,8 +1859,10 @@ if host_system != 'windows' and get_option('xattr')
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Test if we have strlcpy/strlcat with a compatible implementation:
|
# If strlcpy is present (BSD and similar), check that it conforms to the BSD
|
||||||
# https://bugzilla.gnome.org/show_bug.cgi?id=53933
|
# specification. Specifically Solaris 8's strlcpy() does not, see
|
||||||
|
# https://bugzilla.gnome.org/show_bug.cgi?id=53933 for further context.
|
||||||
|
if cc.has_function('strlcpy')
|
||||||
if cc_can_run
|
if cc_can_run
|
||||||
rres = cc.run('''#include <stdlib.h>
|
rres = cc.run('''#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -1878,6 +1880,7 @@ if cc_can_run
|
|||||||
elif meson.get_cross_property('have_strlcpy', false)
|
elif meson.get_cross_property('have_strlcpy', false)
|
||||||
glib_conf.set('HAVE_STRLCPY', 1)
|
glib_conf.set('HAVE_STRLCPY', 1)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
python = import('python').find_installation('python3')
|
python = import('python').find_installation('python3')
|
||||||
# used for '#!/usr/bin/env <name>'
|
# used for '#!/usr/bin/env <name>'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user