mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-02 02:40:07 +02:00
meson: Remove stpcpy() workaround for old meson versions and windows
This is now supported by the meson version we depend on.
This commit is contained in:
parent
98059d088f
commit
bd2cb39073
12
meson.build
12
meson.build
@ -662,17 +662,9 @@ foreach f : functions
|
|||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# Check that stpcpy() is usable; must use header.
|
# Check that stpcpy() is usable; must use header.
|
||||||
# cc.has_function() in some cases (clang, gcc 10+) assumes that if the
|
# See:
|
||||||
# compiler provides a builtin of the same name that the function exists, while
|
|
||||||
# it's in fact not provided by any header or library. This is true for
|
|
||||||
# stpcpy() on Windows using clang and gcc as well as posix_memalign() using
|
|
||||||
# gcc on Windows. Skip these checks on Windows for now to avoid false
|
|
||||||
# positives. See https://github.com/mesonbuild/meson/pull/7116,
|
|
||||||
# https://github.com/mesonbuild/meson/issues/3672 and
|
|
||||||
# https://github.com/mesonbuild/meson/issues/5628.
|
# https://github.com/mesonbuild/meson/issues/5628.
|
||||||
# FIXME: Once meson no longer returns success for stpcpy() and
|
if cc.has_function('stpcpy', prefix : '#include <string.h>')
|
||||||
# posix_memalign() on Windows using GCC and clang we can remove this.
|
|
||||||
if host_system != 'windows' and cc.has_function('stpcpy', prefix : '#include <string.h>')
|
|
||||||
glib_conf.set('HAVE_STPCPY', 1)
|
glib_conf.set('HAVE_STPCPY', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user