19042 Commits

Author SHA1 Message Date
Christoph Reiter
3f9a922d96 build: simplify alloca checks. See #1313
The goal of this commit is to reduce differences between the autotools and meson build.

With autotools AC_FUNC_ALLOCA was used which defines HAVE_ALLOCA_H, HAVE_ALLOCA,
C_ALLOCA. meson tried to replicate that with has_function() but alloca can be a macro
and and is named _alloca under Windows. Since we require a working alloca anyway
and only need to know if the header exists replace AC_FUNC_ALLOCA with a simple
AC_CHECK_HEADERS.

There is still one user of HAVE_ALLOCA in the embedded gnulib, but since alloca is
always provided through galloca.h just force define HAVE_ALLOCA there and add a comment.

The docs were mentioning alloca as an example for cross compiling. Since that variable no
longer exists now replace it with another one.
2018-10-10 13:51:06 -04:00
Will Thompson
e9058850cc gkeyfile: remain usable after g_key_file_free()
Previously, in the case where 'kf' has more than one ref, calling
g_key_file_free(kf) would break it. For example, calling
g_key_file_has_key(kf, ...) would hit the following assertion:

    g_hash_table_lookup: assertion 'hash_table != NULL' failed

This is because g_key_file_free() calls g_key_file_clear() which sets
self->groups and other fields to NULL; most lookup functions assume
these fields are non-NULL.

One fix would be to call g_key_file_init() right after
g_key_file_clear() in g_key_file_free(). However, in the case where
there are no other refs to the keyfile, this would mean allocating
many new hash tables which will be immediately destroyed when
g_key_file_unref() removes the last ref. Instead, inline the unref, and
re-initialize the internal state when the keyfile is still alive.
2018-10-01 20:06:10 +01:00
Fabio Tomat
fc7b8e84a7 Update Friulian translation 2018-09-29 14:51:23 +00:00
Xavier Claessens
a579ac9c14 Merge branch 'stable-ci' into 'glib-2-58'
ci: Use a docker image for stable branch

See merge request GNOME/glib!346
2018-09-28 14:30:49 +00:00
Xavier Claessens
21da53a7f6 ci: Use a docker image for stable branch
The master docker image will eventually use a new meson version, but we
want to ensure stable branch still works on old version.
2018-09-24 10:05:15 -04:00
Philip Withnall
a9f5a6fa2f 2.58.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.58.1
2018-09-21 15:21:06 +01:00
Emmanuele Bassi
2a7d4d2dcb Merge branch 'glib-2-58-309-codegen-punning' into 'glib-2-58'
codegen: Change pointer casting to remove type-punning warnings

See merge request GNOME/glib!318
2018-09-17 13:12:47 +00:00
Emmanuele Bassi
ae9bb1ea3e Merge branch 'glib-2-58-1513-icon-docs' into 'glib-2-58'
Backport to glib-2-58: Fix g_icon_to_string() regression (doc inconsistency)

See merge request GNOME/glib!330
2018-09-17 13:11:31 +00:00
Emmanuele Bassi
ac1b680ec4 Merge branch 'glib-2-58-315-pc-paths' into 'glib-2-58'
Use absolute paths in pkg-config files

See merge request GNOME/glib!329
2018-09-17 10:35:09 +00:00
Jehan
ad26f4c75d Fix g_icon_to_string() regression (doc inconsistency).
g_icon_new_for_string() docs states that it should return a single name
when created with a single name. I add a second condition to this case:
the themed icon must not include default fallbacks (i.e. it must not
have been created with `g_themed_icon_new_with_default_fallbacks()`).
Otherwise the return value of `g_icon_new_for_string()` would not
recreate the same icon list when passed to `g_icon_new_for_string()`
(which would be another documentation inconsistency).

g_icon_new_for_string() is now back to old behavior for this specific
case.

I also revert the unit test for this case, and add a new unit test when
using g_themed_icon_new_with_default_fallbacks() with a single name as
well.

Closes #1513.
2018-09-17 11:33:55 +01:00
Jonas Witschel
e7a7c9b977 Use absolute paths in pkg-config files
According to https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/,
pkg-config files should use absolute paths in variables. This fixes
commit 47692845c0a062a76f99b5de125c5eafa4556847.

Closes #1521
2018-09-17 10:56:10 +01:00
Iain Lane
d89e862f3c Merge branch 'glib-2-58-317-xdg-desktop-portal-autostart' into 'glib-2-58'
Backport “Autostart xdg-desktop-portal if needed” to glib-2-58

See merge request GNOME/glib!321
2018-09-13 14:19:24 +00:00
Iain Lane
d0660ff494 Merge branch 'glib-2-58-313-network-monitor-netlink-fixes' into 'glib-2-58'
Backport GNetworkMonitorNetlink fixes from !313 to glib-2-58

See merge request GNOME/glib!324
2018-09-13 14:14:02 +00:00
Iain Lane
7e413f810c gnetworkmonitornetlink: Close the socket after disconnecting its GSources
`read_netlink_messages()` is the callback attached to the netlink socket
(G_IO_IN). It calls `g_socket_receive_message()`. There is a race
condition that if the socket is closed while there is a pending call, we
will try to receive on a closed socket, which fails.

To avoid this, we switch the order of the operations around: first
destroy the source and then close the socket.
2018-09-13 14:10:39 +01:00
Iain Lane
8b26ad22d4 gnetworkmonitornetlink: Don't check if a passed-in GError ** is NULL
This is not a correct way to check if `g_socket_new_from_fd()` failed.
Instead just see if it returned `NULL` itself.

This was preventing the netlink monitor from being initialised.

Closes #1518
2018-09-13 14:10:39 +01:00
Marek Cernocky
d8d3c81026 Updated Czech translation 2018-09-13 14:00:30 +02:00
Michael Catanzaro
ce2e543c09 Autostart xdg-desktop-portal if needed
This is a speculative fix for epiphany#533, which we think might be
caused by xdg-desktop-portal not ever being started. This service is
started on-demand, not automatically.
2018-09-13 10:07:11 +01:00
Robert Ancell
b3bad4a179 codegen: Change pointer casting to remove type-punning warnings
The existing code was generating code with undefined results that modern compilers warn about:

accounts-generated.c:204:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     (GDBusArgInfo **) &_accounts_accounts_method_info_list_cached_users_OUT_ARG_pointers,
2018-09-12 23:34:43 +01:00
Efstathios Iosifidis
c3c059e6d7 Update Greek translation 2018-09-05 22:10:06 +00:00
Iain Lane
9d414918bc Merge branch 'cherry-pick-68a4e273' into 'glib-2-58'
Document that GTimeVal is subject to the year 2038 problem on 32-bit systems

See merge request GNOME/glib!306
2018-09-05 13:27:22 +00:00
Iain Lane
37af51e644 Document that GTimeVal is subject to the year 2038 problem on 32-bit systems
It might not be immediately obvious that this is the case. Let's record
it in the description of `GTimeVal` itself and also in
`g_time_val_from_iso8601`.

We also drop an incorrect statement in the documentation for
`g_time_val_from_iso8601` stating that years up to 3000 were supported;
this is also not true for the same reason.

Related: #1509


(cherry picked from commit 68a4e273b443ad79a3cd392d464390ab6a3fed2e)
2018-09-05 13:15:00 +00:00
Emmanuele Bassi
f1e272e14d Merge branch '277-command-v-not-which-glib-2-58' into 'glib-2-58'
Backport `command -v` vs `which` changes to glib-2-58

See merge request GNOME/glib!288
2018-09-05 10:12:41 +00:00
Emmanuele Bassi
5e9c2a58b9 Merge branch 'glib-2-58-backports' into 'glib-2-58'
GLib 2.58 backports of various small patches

See merge request GNOME/glib!298
2018-09-05 10:10:55 +00:00
Iain Lane
7086baebe0 Merge branch 'cherry-pick-f697f6aa' into 'glib-2-58'
tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal

See merge request GNOME/glib!301
2018-09-04 09:58:38 +00:00
Iain Lane
51e7219c54 tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal
On 32 bit systems, the size of a long might be the same as the size of
an int. In that case, we won't be able to get an overflow when
converting from a GTimeVal to a time_t. Skip the test for this in that
case.

Closes #1509


(cherry picked from commit f697f6aa08dc5499ae1c5c9177976cc62d19a998)
2018-09-04 09:49:34 +00:00
Jan Tojnar
d62f7cb67c meson: fix typo 2018-09-03 13:19:51 +01:00
Florian Müllner
a8babc792f portal network monitor: Always emit changed signal on changed
The ::network-changed signal is documented to indicate any change in
network configuration, which doesn't necessarily imply a property
change - additional services becoming available after connecting to
a VPN comes to mind for instance.

In order to match the "native" network monitor's behavior, always
emit the signal when it's in response to the 'changed' D-Bus signal.

Also emit the signal unconditionally when loading the initial property
values, to allow clients to differentiate between "offline" meaning
"offline" and "offline" meaning "uninitialized".
2018-09-03 13:14:47 +01:00
Rasmus Thomsen
f042610c02 build: fix installation dir of glib-gettextize 2018-09-03 13:10:58 +01:00
Ryan Schmidt
b8a4754d59 gspawn: Fix build on systems without O_CLOEXEC
Fixes typo introduced in 4afe429d7ce4d813e0b263fd3eab9e543f11d2a6.

See https://gitlab.gnome.org/GNOME/glib/issues/1488
2018-09-03 12:54:02 +01:00
Ryan Schmidt
afbda14f2c gio: Don't redefine GKqueueFileMonitor
Fixes build on old compilers that don't allow type redefinitions.

Closes: https://gitlab.gnome.org/GNOME/glib/issues/1506
2018-09-03 12:49:16 +01:00
Efstathios Iosifidis
6a3fb3438d Update Greek translation 2018-09-03 09:05:04 +00:00
Ask Hjorth Larsen
3aefb47aff Updated Danish translation 2018-09-02 23:21:43 +02:00
Anders Jonsson
5afb4ceb4f Update Swedish translation 2018-09-02 20:07:32 +00:00
Rūdolfs Mazurs
3392d7cc10 Update Latvian translation 2018-09-02 16:57:52 +00:00
Balázs Meskó
1d6909c234 Update Hungarian translation 2018-09-01 22:19:28 +00:00
Rafael Fontenelle
2a64690cd9 Update Brazilian Portuguese translation 2018-09-01 15:22:22 +00:00
Ryan Schmidt
40ee8da9a8 Use "command -v" instead of "which"
The behavior of "which" is not standardized by POSIX. Some old
implementations print their error messages to stdout instead of stderr,
and don't return a nonzero exit code when they fail to find the given
program. "command -v" on the other hand is in POSIX (optional in 2004
and required as of 2008).

Remove otherwise-unused variables AUTORECONF and GTKDOCIZE.
2018-08-31 12:41:32 +01:00
Philip Withnall
c138b98e36 2.58.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.58.0
2018-08-30 18:11:13 +01:00
Xavier Claessens
90815c160b Merge branch 'autotools-config.h' into 'master'
ci: Include config.h in autotools output artifacts

See merge request GNOME/glib!281
2018-08-30 14:25:14 +00:00
Xavier Claessens
f4b3e6269b Merge branch 'ci-no-coverage-on-dist' into 'master'
ci: Disable the coverage CI job when running dist on a release

See merge request GNOME/glib!284
2018-08-30 14:24:35 +00:00
Philip Withnall
3ced28df3e ci: Disable the coverage CI job when running dist on a release
It fails because dist-job (correctly) doesn’t build with the code
coverage CFLAGS enabled.

Leave coverage to be generated on master and development branches.

See this pipeline for an example of when it fails:
https://gitlab.gnome.org/GNOME/glib/pipelines/26349

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-30 13:51:59 +01:00
Philip Withnall
bb6eb8c16f Merge branch 'nirbheek/g-module-suffix-macos' into 'master'
meson: Always set G_MODULE_SUFFIX to `so` on macOS

See merge request GNOME/glib!280
2018-08-30 12:44:58 +00:00
Marek Cernocky
503eda2dea Updated Czech translation 2018-08-30 12:59:01 +02:00
Fran Dieguez
658fb615bc Update Galician translation 2018-08-29 22:23:56 +00:00
Philip Withnall
99decc0634 ci: Include config.h and glibconfig.h in CI output artifacts
It’s useful to see what configuration was generated.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-29 12:13:17 +01:00
Nirbheek Chauhan
64f789c6e2 meson: Always set G_MODULE_SUFFIX to so on macOS
This is what Autotools does, and it's what all consumers of the
GModule API expect. Without this change, people on macOS upgrading to
a GLib built with Meson will find that their plugins no longer load.

Projects that use Meson and the `g_module_build_path()` API such as
glib-networking should pass `name_suffix:` to `shared_module()` to
ensure that plugins continue to be called libfoo.so on macOS.

New GModule API will eventually be added to address this.

See also:
https://gitlab.gnome.org/GNOME/glib/issues/1413
a3d81719fe/meson.build (L108)
2018-08-29 15:38:38 +05:30
Philip Withnall
042b2af544 Merge branch '265-really-drop-gnet' into 'master'
Revert "Add a gnet utility" (see !265)

See merge request GNOME/glib!279
2018-08-28 13:19:21 +00:00
Philip Withnall
d9b331f4d4 Revert "Add a gnet utility"
This reverts commit 3c1902fcf9ff9d0fb162d6ea71ec94c253687f84.

This was accidentally re-added from an old version of the branch before
!265 was merged. It should not have been re-added.
2018-08-28 11:59:04 +01:00
Philip Withnall
f65e8eb7e3 Merge branch 'subprocess-cancellable-callback-fix' into 'master'
subprocess: Fix communicate_cancelled signature

See merge request GNOME/glib!266
2018-08-28 10:32:07 +00:00
Matthias Clasen
917dee45b2 Merge branch 'network-monitor-again' into 'master'
Network monitor again

See merge request GNOME/glib!265
2018-08-27 15:32:51 +00:00