Commit Graph

316 Commits

Author SHA1 Message Date
Philip Withnall
65be80c3ed build: Rework path construction to reliably add prefix
There were a couple of custom paths which could end up being relative,
rather than absolute, due to not properly prefixing them with
`get_option('prefix')`.

The use of `join_paths()` here correctly drops all path components
before the final absolute path in the list of arguments. So if someone
configures GLib with an absolute path for `gio_module_dir`, that will be
used unprefixed; but if someone configures with a relative path, it will
be prefixed by `get_option('prefix)`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1919
2020-02-07 17:12:35 +00:00
Philip Withnall
7f4cb36e8e 2.63.5
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 14:26:39 +00:00
Philip Withnall
12ee603039 Merge branch 'dab_libmount_auto_detection' into 'master'
meson: libmount autodectection

See merge request GNOME/glib!1344
2020-02-03 08:20:44 +00:00
stephane Cerveau
b220033cf0 meson: libmount autodectection
As it can be disabled, it should be automatic as the packahge might be
unavailable for a given target.
2020-02-01 18:53:56 +01:00
Xavier Claessens
47a20304bd ci: Update Meson to 0.52.1 in fedora docker
This is required to be able to build the doc. The debian docker is still
pinned to 0.49.2 which ensure we can build with both versions of meson.

Meson 0.52.0 warns about adding -Wall flag manually, we can remove that
because warning_level=1 (the default) option already implies it.
2020-01-29 15:54:53 +01:00
Philip Withnall
b413c50dcd 2.63.4
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-21 12:41:48 +00:00
Sebastian Dröge
d1a3be5605 Remove trailing comma from SYS_sched_getattr meson check 2020-01-19 10:48:33 +02:00
Sebastian Dröge
8b1f24f658 Check for SYS_sched_getattr before using it unconditionally
Really old versions of Linux don't have yet. In that case fall back to
the fallback code.

See 8aeca4fa64 (note_686823)
2020-01-16 16:02:39 +02:00
Sebastian Dröge
8aeca4fa64 GThreadPool - Don't inherit thread priorities when creating new threads
By default (on POSIX) we would be inheriting thread priorities from the
thread that pushed a new task on non-exclusive thread pools and causes a
new thread to be created. This can cause any non-exclusive thread pool
to accidentally contain threads of different priorities, or e.g. threads
with real-time priority.

To prevent this, custom handling for setting the scheduler settings for
Linux and Windows is added and as a fallback for other platforms a new
thread is added that is responsible for spawning threads for
non-exclusive thread pools.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1834
2020-01-15 23:18:33 +02:00
Philip Withnall
de7d7dbd6c 2.63.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Matthew Waters
86747cea08 build: don't check for protected visibility
It's not supported on macOS' clang compiler and will fail the visibility
check and thus make the G_GNUC_INTERNAL attribute do nothing.

Compiler stderr:
 /var/folders/nt/j2v2x4wd5cl33fq27mm31mwc0000gn/T/tmpxxf2zzi_/testfile.c:13:19: error: target does not support 'protected' visibility; using 'default' [-Werror,-Wunsupported-visibility]
  __attribute__ ((visibility ("protected")))
                  ^
1 error generated.

Checking if "GNU C visibility attributes test" compiles: NO
2019-12-03 13:33:16 +11:00
Philip Withnall
ae49ff0903 2.63.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-25 11:11:33 +00:00
Philip Withnall
505c954424 build: Check size_t compatibility with various other types
When choosing the type to base `size_t` on, check the compatibility of
passing pointers, as well as the width of the type, to avoid compiler
warnings in future.

For now, the code to do the checks is fairly ugly due to limitations in
Meson. In particular, the new checks are limited to gcc and clang (other
compilers will behave as before), and they are all duplicated. See the
comments in the code for links to Meson improvement requests.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1777
2019-11-05 09:20:00 +00:00
Philip Withnall
d97d4828d0 2.63.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-31 16:25:09 +00:00
Alan Coopersmith
2b34f52b01 build: no --export-dynamic ldflags for Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-10-04 13:23:25 -07:00
Emmanuele Bassi
c08e7b9364 Merge branch 'switch_to_gnu99' into 'master'
Switching from C gnu89 to C gnu99 standard

See merge request GNOME/glib!1035
2019-10-04 14:51:10 +00:00
Simon McVittie
42d8e17795 Always build tests if we enabled installed-tests
If we're cross-compiling, the installed-tests are useful even if we
can't run them on the build machine: we can copy them to the host
machine (possibly via a distro package like Debian's libglib2.0-tests)
and run them there.

While I'm changing the build-tests condition anyway, deduplicate it.

Based on a patch by Helmut Grohne.

Bug-Debian: https://bugs.debian.org/941509
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-10-01 20:12:16 +01:00
Philip Withnall
bbbdc27151 build: Bump Python requirement to ≥ 3.5
We already depend on Meson 0.49.2, which depends on Python 3.5, so we’ve
actually implicitly had this requirement for a while. Might as well make
it explicit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-30 11:23:20 +01:00
Emmanuel Fleury
2f9c9e2c5a Switching from C gnu89 to C gnu99 standard 2019-09-17 19:48:56 +02:00
Philip Withnall
bbccd2c1d7 build: Post-release version bump to 2.63.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-17 12:23:06 +01:00
Philip Withnall
a1af0be78c 2.62.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-05 17:54:38 +01:00
Philip Withnall
b3b6830d9a Merge branch 'wip/lantw/gthread-set-thread-name-on-bsd' into 'master'
gthread: Set thread name on *BSD

Closes #1761

See merge request GNOME/glib!1072
2019-09-02 11:10:16 +00:00
Ting-Wei Lan
f489b6f922 gthread: Set thread name on *BSD
Add support for setting thread name on FreeBSD, DragonFlyBSD, OpenBSD,
and NetBSD.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1761
2019-08-30 01:29:04 +08:00
Ting-Wei Lan
fe3c16608a meson: Move libdl_dep to the top level
Instead of letting each directory to find its way to link with libdl,
it is easier to put the check in the top level, so its result can be
used by all directories.

It is a follow-up of https://gitlab.gnome.org/GNOME/glib/merge_requests/810.
2019-08-29 23:25:40 +08:00
Philip Withnall
29388470f8 Merge branch 'easy-uwp-patches' into 'master'
Some (probably) easy uwp patches

See merge request GNOME/glib!1057
2019-08-26 20:18:45 +00:00
Nirbheek Chauhan
f84ef02914 windows: Move G_WINAPI_ONLY_APP to config.h
Also set the Windows version to be 10 or newer when targeting UWP, since
the Windows 8 SDK does not have many of the APIs we need, such as
_beginthreadex.
2019-08-27 00:17:29 +05:30
Christoph Reiter
26f7104d79 meson: small cleanup for printf checks
Instead of duplicating checks add a use_system_printf meson variable and
macro and use them everywhere.
2019-08-20 17:19:26 +02:00
Christoph Reiter
271e283881 meson: Remove an outdated todo re HAVE_UNIX98_PRINTF
We have checks for HAVE_UNIX98_PRINTF now. The macro is unused, but we need
the checks to decide if the printf is good enough as is.
2019-08-20 17:19:26 +02:00
Philip Withnall
a3d9c3ffa7 Post-release version bump
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-29 14:16:45 +01:00
Emmanuele Bassi
85dc45e548 build: Bump up the required version of Meson
We cannot bump to the latest stable version of Meson, even if it would
make our life easier. We can, though, use the version of Meson shipped
by the next, soon to be released Debian stable.
2019-07-24 13:08:06 +01:00
Emmanuele Bassi
00d7568e4f build: Remove unsupported install directives
We're using the `install` argument for configure_file() all over the
place.

The support for an `install` argument for configure_file() was added in
Meson 0.50, but we haven't bumped the minimum version of Meson we
require, yet; which means we're getting compatibility warnings when
using recent versions of Meson, and undefined behaviour when using older
versions.

The configure_file() object defaults to `install: false`, unless an
install directory is used. This means that all instances of an `install`
argument with an explicit `true` or `false` value can be removed,
whereas all instances of `install` with a value determined from a
configuration option must be turned into an explicit conditional.
2019-07-24 12:45:02 +01:00
Philip Withnall
fa4423d435 Merge branch 'clang-cl-support' into 'master'
Experimental clang-cl support

See merge request GNOME/glib!979
2019-07-17 10:30:28 +00:00
Philip Withnall
81b1ff8300 Merge branch 'atomic' into 'master'
fix atomic detection on older gcc versions

See merge request GNOME/glib!991
2019-07-17 10:22:00 +00:00
DDoSolitary
2718245dc2 Fix test failures for static builds
The plugin modules in these tests get statically linked with a separate
copy of GLib so they end up calling vfuncs in their own copy of GLib.

Fixes #1648
2019-07-15 11:01:04 +00:00
Antoine Jacoutot
a76cb94308 fix atomic detection on older gcc versions
GLib checks for __sync_bool_compare_and_swap, and requires
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to be defined if the function is available,
except with special cases like Linux armv5.
Extend the existing workaround to unbreak on old gcc versions that implement
__sync_bool_compare_and_swap but don't provide __GCC_HAVE_* macros.
2019-07-14 19:25:28 +02:00
Chun-wei Fan
e8d471f3e1 meson: Mostly assume clang-cl is MSVC
We need to enable building the dirent and gnulib sources for clang-cl,
as we are still using the Microsoft-style headers and lib's and CRT.
We need to also do this for the following, for similar reasoning:

-Symbol export (via __declspec(dllexport))
-Dependency discovery without pkg-config files
-long long and ssize_t detection

We do, however, enable the autoptr tests for clang-cl builds.  Note that
at this point real MSVC builds are still better supported than clang-cl
builds, and it will likely remain so for at least the near future,
alhtough real MSVC builds of the GTK stack are consumable and are usable
by clang-cl.
2019-07-11 15:38:21 +08:00
Philip Withnall
a60376594d build: Increase the slow test timeout to 180s
We are still seeing occasional CI failures due to timeouts when heavily
loaded. It’s best to wait a little longer than to throw all the results
out when they’re almost done.

For example, see https://gitlab.gnome.org/tristan957/glib/-/jobs/331330.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-20 08:41:39 +01:00
Sebastian Dröge
5fb5641de2 Merge branch 'post-release-version-bump' into 'master'
Post-release version bump

See merge request GNOME/glib!867
2019-06-11 11:20:29 +00:00
Philip Withnall
3053c19b54 Post-release version bump
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-05-24 18:12:31 +01:00
Christoph Reiter
0030408299 gunicollate/cygwin: Don't use __STDC_ISO_10646__ for wchar_t related checks
The code in gunicollate uses __STDC_ISO_10646__ to check that wchar.h is avilable,
that it includes the wide character related functions and that sizeof(wchar_t) == 4.

cygwin defines __STDC_ISO_10646__ and has sizeof(wchar_t) == 2 and the C standard text isn't
that clear on whether wchar_t should always be 4 bytes in this case, so we better not use if for
assuming the size here.

Instead of relying on __STDC_ISO_10646__ add HAVE_WCHAR_H and SIZEOF_WCHAR_T macros.
With HAVE_WCHAR_H defined we assume wchar_t exists and wchar.h exists. With SIZEOF_WCHAR_T we
guard the parts where the size of wchar_t is assumed to be 4 (currently all of them).

Note that this doesn't make the collate tests pass under cygwin, they fail before and after this patch for me.

See !755 for related discussions.
2019-05-22 19:44:13 +02:00
Christoph Reiter
767e6a4cac build: define G_OS_UNIX, not G_OS_WIN32 under cygwin
This makes glib build under msys2 for me.
2019-05-21 18:54:34 +02:00
Philip Withnall
83177c0edc build: (Long time after) post-release version bump
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-05-10 15:09:50 +01:00
Rafal Luzynski
93d8482384 build: Fix a typo in the test whether _NL_ABALTMON_n is supported
The correct spelling is "_NL_ABALTMON_n" rather than "_NL_ALTMON_n".
The typo made Meson build think that _NL_ABALTMON_n constants are
not supported which was totally wrong. This made g_date_time_format()
output incorrect abbreviated month names in some languages.
The old configure.ac script was correct here.

Bug introduced in commit be4f96b650.

Closes: #1759
2019-05-10 01:19:42 +02:00
Philip Withnall
0bf5a8ca00 Merge branch 'wip/tingping/rtld-check-fix' into 'master'
build: Fix check for RTLD_NEXT

See merge request GNOME/glib!782
2019-04-23 16:09:38 +00:00
Patrick Griffis
641966c1bb build: Fix check for RTLD_NEXT 2019-04-16 09:24:06 -07:00
Adam Duskett
e7b0d89aeb Only build tests if certain conditions are met.
Currently, there is no way to prevent tests from building using meson.
When cross-compiling, building the tests isn't necessary.

Instead, only build the tests on the following conditions:
1) If not cross-compiling.
2) If cross-compiling, and there is an exe wrapper.
2019-04-16 10:19:41 +00:00
Nirbheek Chauhan
ace32cd8e2 gconvert: Don't differentiate between GNU iconv and macOS iconv
Both provide iconv_open, and in fact, we weren't using the difference
anywhere in glib at all.
2019-04-12 11:12:28 +05:30
Nirbheek Chauhan
2f066aeb51 meson: Add autodetection to the iconv combo option
Instead of requiring the user to specify which option to use, which
they will not really know, nor should they need to know.

Search for each type of iconv (in the C library, as a separate
native library, as the GNU implementation) by default.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1557
2019-04-12 11:12:28 +05:30
Руслан Ижбулатов
7a399e859d Fix the "/proc/self/cmdline" test
Add a missing ifdef from gfileutils.c that is needed for O_BINARY.

The other option was to remove O_BINARY, but i left it there for
the sake of completeness, as this is what g_file_get_contents() uses.
2019-04-07 18:41:39 +00:00
Philip Withnall
9d43bfc4ed Merge branch 'cygwin-visibility' into 'master'
Use W32 visibility for Cygwin

See merge request GNOME/glib!752
2019-04-03 16:03:16 +00:00
Руслан Ижбулатов
4c038a27ff Check for /proc/self/cmdline
Instead of hardcoding /proc/self/cmdline use for __linux__ only,
do a configure-time test for it.

Specifically, this enables /proc/self/cmdline use on Cygwin.

The configure-time test is very primitive (just tests that the
file exists and that it's possible to read more than one byte from it),
relying on the testsuite for more extensive checks.

The test in the testsuite is modified to always run, even on platforms
where it isn't supposed to pass. If it fails there, the testing framework
skips it. If the test unexpectedly passes, that is reported too.
2019-04-03 15:17:34 +00:00
Philip Withnall
ad614fc070 Merge branch 'cygwin-rtld_next' into 'master'
Check for RTLD_NEXT

See merge request GNOME/glib!750
2019-03-27 16:25:48 +00:00
Руслан Ижбулатов
a53ff7460e Check for RTLD_NEXT
Check for RTLD_NEXT being present, and disable the gsocketclient-slow
test if it's absent, since the shlib dependency of that test requires
RTLD_NEXT to function.

This allows the testsuite to be built on Cygwin, which behaves
exactly like UNIX, but doesn't have RTLD_NEXT.
2019-03-27 16:10:17 +00:00
Руслан Ижбулатов
9ca7ac782e Set G_WITH_CYGWIN again
This macro was lost during meson migration. Set it again.

Also explain that Cygwin maintainers applied patches[0] to glib that
simply marked all G_PLATFORM_WIN32-protected code as !defined(G_WITH_CYGWIN),
i.e. they did not want that code to compile.
Instead of altering ifdef guards all over the place, we'll just
not define G_PLATFORM_WIN32 for Cygwin anymore.

[0]: 3a873fdd1b/2.36.3-not-win32.patch
2019-03-22 14:44:53 +00:00
Руслан Ижбулатов
8758604579 Use W32 visibility for Cygwin
Cygwin is still subject to W32 visibility mechanics.
2019-03-20 21:10:58 +00:00
Philip Withnall
c8692fffe0 Merge branch 'fix-warnings-glib' into 'master'
Fix warnings glib

See merge request GNOME/glib!680
2019-03-19 11:02:38 +00:00
Emmanuel Fleury
0fea1a4775 Silenting unused parameter warnings due to deprecated code 2019-03-15 20:53:46 +01:00
Ross Burton
fc88e56bfc meson: do a build-time check for strlcpy before attempting runtime check
In cross-compilation environments the runtime check isn't possible so it is up
to the builder to seed the cross file, but we can definitely state that strlcpy
doesn't exist with a build test.
2019-03-14 13:10:32 +00:00
Philip Withnall
6761bb2f57 build: Factor out common gtkdoc flags
Those lists were getting very long. We can’t quite entirely automate the
list generation since Meson doesn’t have a range() function, but we can
at least combine three of them into one.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:59:03 +00:00
Philip Withnall
925c52760c build: Bump version to 2.61.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:27:24 +00:00
Philip Withnall
2edc5aa6df 2.60.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 20:03:12 +00:00
Philip Withnall
8423e59e95 2.59.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-18 08:55:54 +00:00
Iain Lane
07a1a8031d
installed tests: Allow tests to set environment variables
It's necessary sometimes for installed tests to be able to run with a
custom environment. For example, the gsocketclient-slow test requires an
LD_PRELOADed library to provide a slow connect() (this is to be added in
a followup commit).

Introduce a variable `@env@` into the installed test template, which we
can override as necessary when generating `.test` files, to run tests
prefixed with `/usr/bin/env <LIST OF VARIABLES>`.

As the only test that requires this currently lives in `gio/tests/`, we
are only hooking this up for that directory right now. If other tests in
future require this treatment, then the support can be extended at that
point.
2019-02-13 09:43:49 +00:00
Philip Withnall
bc1443b2b6 2.59.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-04 13:40:43 +00:00
Emmanuel Fleury
5d78256796 Silencing cast-function-type warnings
A lot of code cast function pointer to incorrect types. There is no
other way but silencing the warning. Follows an example of such cast:

glib/glist.c: In function ‘g_list_free_full’:
glib/glist.c:223:25: error: cast between incompatible function types from ‘GDestroyNotify’ {aka ‘void (*)(void *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
   g_list_foreach (list, (GFunc) free_func, NULL);
                         ^
2019-01-31 10:24:39 +01:00
Philip Withnall
2d46dff03e 2.59.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-26 12:16:35 +00:00
Philip Withnall
5c05af9aca build: Add -Wno-pedantic flag to compiler arguments
We do not support building with -Wpedantic due pervasively casting
function pointers through (void*) — see
https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps https://gitlab.gnome.org/GNOME/glib/issues/1662
2019-01-23 13:38:40 +00:00
Xavier Claessens
4f3216d7c0 Merge branch 'nls' into 'master'
Meson: Add 'nls' option to disable translation

See merge request GNOME/glib!484
2018-11-27 14:32:25 +00:00
Xavier Claessens
c49ed610ed Check for zlib header
It is not enough to check for the library, we also need zlib.h installed
to be able to use it. Autotools were also checking for the header.
2018-11-22 20:14:30 -05:00
Thibault Saunier
8cc92bcca6 meson: Turn selinux into a meson feature and make it auto by default
Making it more user friendly when building on distro no deploying selinux
2018-11-20 15:58:58 -03:00
Xavier Claessens
7412011716 Meson: Add 'nls' option to disable translation
It is not always needed to generate and install gmo files, for example
when building for Android or Windows that often doesn't have libintl to
use them anyway.

At least all GStreamer modules have this same option.
2018-11-20 11:35:14 -05:00
Xavier Claessens
2ded434b40 Check for 'z' library before fallbacking to subproject 2018-11-19 15:22:16 -05:00
Xavier Claessens
9534447eb0 Merge branch 'fix-gio-test-build' into 'master'
Meson: Fix build error in gdbus-example-objectmanager

See merge request GNOME/glib!461
2018-11-14 15:37:05 +00:00
Xavier Claessens
ba2c519819 Meson: Rename test_c_args to avoid confusion with gio tests c_args 2018-11-14 09:38:33 -05:00
Niclas Moeslund Overby
704522c5fd meson: add aarch64 memory barrier handling
memory barriers for aarch64 ref: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/CJAIAJFI.html
2018-11-13 17:00:09 +01:00
Philip Withnall
b09a0df9a9 Merge branch '1576-meson-armv5-atomic' into 'master'
meson: Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 on GNU/Linux if needed

Closes #1576

See merge request GNOME/glib!434
2018-11-02 20:56:37 +00:00
Simon McVittie
a40ef2ff92 meson: Increase fast test timeout from 30s to 60s
This is enough for most Debian buildds, including embedded devices
like mips and powerpcspe. It is not enough for hppa (PA-RISC), but that
architecture is so uniquely slow that it might make more sense to
special-case it downstream.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-01 19:13:21 +00:00
Simon McVittie
13e206aaeb meson: Centralize test timeout values
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-01 19:13:21 +00:00
Simon McVittie
4e058a698a meson: Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 on GNU/Linux if needed
armv5 Linux systems implement __sync_bool_compare_and_swap() and
friends by calling a function provided by the kernel. This is not
technically an atomic intrinsic, so gcc doesn't define
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 in this case, but it's good
enough for us. Extend the current Android special case to cover
GNU/Linux too.

The possibilities are:

* __sync_foo detected and __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 predefined:
  calls to __atomic_foo or __sync_foo primitives are inlined into user
  code by gatomic.h

* __sync_foo detected but __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 not
  predefined: user code has an extern reference to g_atomic_foo(),
  which calls __atomic_foo or __sync_foo because we defined
  __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 when compiling GLib itself

* Windows: user code has an extern reference to g_atomic_foo(),
  which calls InterlockedFoo()

* !defined(G_ATOMIC_LOCK_FREE): user code has an extern reference to
  g_atomic_foo(), which emulates atomic operations with a mutex

Signed-off-by: Simon McVittie <smcv@collabora.com>
Closes: #1576
2018-10-30 17:20:43 +00:00
Ting-Wei Lan
295964a380 gutils: Check whether getauxval function exists
FreeBSD 12 adds a new header, sys/auxv.h, to declare a function, elf_aux_info,
for public use, which was considered an internal function in previous releases.
This new function provides similar functionality with glibc getauxval, which is
also declared in the same header, but their interfaces are not compatible. Since
the only usage of sys/auxv.h is in g_check_setuid and FreeBSD already has
issetugid to provide the required functionality, we fixes the compilation error
by adding a check for getauxval function to prevent g_check_setuid from calling
getauxval when sys/auxv.h is found but getauxval is not available.

https://reviews.freebsd.org/D12743
https://reviews.freebsd.org/rS324815
2018-10-29 14:57:24 +00:00
Nirbheek Chauhan
8b3590c231 meson: Add macOS libtool versioning for ABI compatibility
With this, the compatibility version and current version values in macOS
and iOS dylibs will match the values set by Autotools.

See: https://github.com/mesonbuild/meson/issues/1451
2018-10-22 06:51:32 +05:30
pdknsk
a2c09f57f6 Integrate oss-fuzz targets 2018-10-11 00:02:03 +00:00
Ryan Schmidt
a187c89002 Fix build failure on systems without spawn.h 2018-09-28 23:50:40 -05:00
Xavier Claessens
24d7a73b93 Meson: Bump dependency to 0.48.0 2018-09-27 16:01:41 -04:00
Xavier Claessens
b512135fc6 Merge branch '1535-tap' into 'master'
Meson: Run in TAP mode installed tests that support it

Closes #1535

See merge request GNOME/glib!343
2018-09-24 14:49:40 +00:00
Xavier Claessens
8391219e4c Meson: Run in TAP mode installed tests that support it 2018-09-23 13:44:15 -04:00
Xavier Claessens
3896bc3659 Meson: define G_HAVE_GROWING_STACK to 0 or 1 2018-09-23 12:59:40 -04:00
Emmanuele Bassi
e8fde0b9e7 Install m4 macros unconditionally
Partial revert of commit a7a6449f4d.

Checking for the availability of m4 for installing m4 macro files
creates an implicit dependency on m4 even if GLib does not need it; this
prevents building GLib and then installing Autotools in order to build a
project that depends on GLib.

Closes #1520
2018-09-10 12:44:59 +01:00
Emmanuele Bassi
fd2d94dca5 Merge branch '656-format-security' into 'master'
build: Set -Wformat when testing for -Wformat-security

Closes #656

See merge request GNOME/glib!300
2018-09-05 09:42:33 +00:00
Philip Withnall
98f326a020 Merge branch 'wip/otte/fallthrough' into 'master'
Add G_GNUC_FALLTHROUGH for __attribute__(fallthrough))

See merge request GNOME/glib!296
2018-09-04 22:06:26 +00:00
Benjamin Otte
93b9f22369 build: Enable -Wimplicit-fallthrough by default 2018-09-04 20:24:25 +02:00
Philip Withnall
9e9db46a49 build: Drop pointless -Wformat-security warning flag
We already set -Wformat=2, which implies -Wformat-security, so there’s
no need to test for and set -Wformat-security separately.

The test for -Wformat-security never worked anyway, since gcc complains
if it’s specified without also setting -Wformat to some value. The
complaint causes configure.ac/meson.build to assume the option doesn’t
work.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/656
2018-09-04 09:51:49 +01:00
Philip Withnall
b79bafccfe Merge branch 'glib-gettextize' into 'master'
meson: fix typo

See merge request GNOME/glib!295
2018-09-03 12:18:36 +00:00
Jan Tojnar
b3da2b4064
meson: install glib-gettextize to bindir 2018-09-02 20:36:04 +02:00
Jan Tojnar
48821a50b4
meson: fix typo 2018-09-02 20:35:26 +02:00
Rasmus Thomsen
44704b7a49
build: fix installation dir of glib-gettextize 2018-08-31 15:58:38 +02:00
Xavier Claessens
b2375471cc Merge branch '1313-config-cleanups' into 'master'
More config.h fixups for Meson

Closes #1313

See merge request GNOME/glib!283
2018-08-31 12:56:26 +00:00
Philip Withnall
3fd9f83ae4 build: Bump version to 2.59.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-08-31 12:51:38 +01:00
Philip Withnall
8271263af3 Merge branch 'require-python34' into 'master'
[RFC] build: Drop Python 2 support and require Python 3.4+

See merge request GNOME/glib!196
2018-08-31 10:48:11 +00:00
Philip Withnall
41a3951c8f Merge branch 'simplify-alloca-checks' into 'master'
build: simplify alloca checks. See #1313

See merge request GNOME/glib!268
2018-08-31 10:45:29 +00:00