Commit Graph

19213 Commits

Author SHA1 Message Date
Benjamin Otte
95477a4e35 macros: Add G_GNUC_FALLTHROUGH
Expands to the GNU C fallthrough statement attribute if the compiler is gcc.
This allows declaring case statement to explicitly fall through in switch
statements. To enable this feature, use -Wimplicit-fallthrough during
compilation.
2018-09-04 20:24:21 +02:00
Christoph Reiter
24a95056b4 autotools: stop generating a ChangeLog file for the dist tarball
We have git for that.

automake requires a ChangLog file in gnu mode so switch to the less strict
foreign mode instead.
2018-09-04 17:43:37 +02:00
Christoph Reiter
912581340e Remove all static ChangeLog files
They only contain old information which is also available in git
2018-09-04 15:56:54 +02:00
Iain Lane
68a4e273b4 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
2018-09-04 11:15:25 +01:00
Iain Lane
5b7a16a3c6 Merge branch 'wip/test_timeval_to_iso8601_overflow-skip-on-32-bit' into 'master'
tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal

Closes #1509

See merge request GNOME/glib!299
2018-09-04 09:42:35 +00:00
Iain Lane
f697f6aa08 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
2018-09-04 10:31:52 +01: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
Ondrej Holy
6ae061b74d Merge branch 'add-identifier-class-loop' into 'master'
Document new volume class `loop`

See merge request GNOME/glib!293
2018-09-04 08:29:01 +00:00
Christoph Reiter
0232cf64c6 Merge branch '1313-die-ac-c-const' into 'master'
build: Drop AC_C_CONST from configure.ac

See merge request GNOME/glib!297
2018-09-03 14:29:12 +00:00
Philip Withnall
d3656705fa Merge branch 'default-tls-database' into 'master'
gtlsbackend: add support for setting the default TLS database

Closes glib-networking#35

See merge request GNOME/glib!273
2018-09-03 13:22:39 +00: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
Philip Withnall
8f157d0274 Merge branch 'wip/fmuellner/nm-portal-changed-signal' into 'master'
portal network monitor: Always emit changed signal on changed

See merge request GNOME/glib!294
2018-09-03 12:14:18 +00:00
Philip Withnall
6e03a05a9e Merge branch 'meson-bindir-fix' into 'master'
build: fix installation dir of glib-gettextize

See merge request GNOME/glib!290
2018-09-03 12:10:15 +00:00
Philip Withnall
bac504e32f build: Drop AC_C_CONST from configure.ac
Any compiler we care about now supports the `const` keyword, so we no
longer need to check for it. autoconf has recommended this macro is
obsolete:

https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html#index-AC_005fC_005fCONST-755

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-09-03 13:04:21 +01:00
Philip Withnall
17ae9f36da Merge branch 'O_CLOEXEC' into 'master'
gspawn: Fix build on systems without O_CLOEXEC

See merge request GNOME/glib!286
2018-09-03 11:51:06 +00:00
Philip Withnall
f63bc3072c Merge branch 'GKqueueFileMonitor' into 'master'
gio: Don't redefine GKqueueFileMonitor

Closes #1506

See merge request GNOME/glib!291
2018-09-03 11:47:33 +00:00
Efstathios Iosifidis
0d2644812e Update Greek translation
(cherry picked from commit 6a3fb3438d)
2018-09-03 09:05:22 +00:00
Matthew Waters
27fca3474c gtlsdatabase: document that implementations must be thread-safe 2018-09-03 13:55:57 +10:00
Matthew Waters
b84951eb6f gtlsbackend: add support for setting the default TLS database
There are many cases where a default TLS database is not able to be
defined within the constraints of a system.  For example glib-networking
(or glib-openssl) cannot retrieve the default certificate store on iOS
or Android and need to be initialized from a cert file of certificates
bundled with the application.

Previously GStreamer was relying on a custom patch to glib-networking to
populate the default database from the file pointed to by the
CA_CERTIFICATES environment variable however the mechanism that enabled
this was recently remove from glib-networking.

Adding a more generic g_tls_backend_set_default_database() API allows
application developers to override the default database using their own
certificates as well as allowing equivalent functionality on Android/iOS
(or others) as on the default database handling Linux.

Fixes https://gitlab.gnome.org/GNOME/glib-networking/issues/35
2018-09-03 13:55:57 +10:00
Matthew Waters
6545e7558c gversionmacros: add version macros for GLib 2.60 2018-09-03 13:55:57 +10:00
Ask Hjorth Larsen
2a34e66daf Updated Danish translation 2018-09-02 23:19:34 +02: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
Balázs Meskó
b0e239c26e Update Hungarian translation
(cherry picked from commit 1d6909c234)
2018-09-01 22:19:45 +00:00
Florian Müllner
423a2936ea 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-01 19:31:45 +02:00
Rafael Fontenelle
1b0aa8b663 Update Brazilian Portuguese translation
(cherry picked from commit 2a64690cd9)
2018-09-01 15:22:39 +00:00
segfault
c341479c23 Document new loop class 2018-08-31 22:02:02 +02:00
Ryan Schmidt
612c450bd4 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-08-31 09:52:29 -05: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
Emmanuele Bassi
0d00713fb2 Merge branch 'compile-resources-cxx' into 'master'
glib-compile-resources: Fix generated code compiling with C++ compilers

See merge request GNOME/glib!287
2018-08-31 12:50:36 +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
0e5f9aa143 tests: Add more tests to finish branch coverage of GHashTable
Test a few situations where NULL values for optional out parameters
weren’t being tested. This takes the branch coverage of GHashTable up to
100% (ignoring g_return_if_fail() branches).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:46:48 +01:00
Philip Withnall
8dc8b33dfa ghash: Clear out arguments to NULL in g_hash_table_lookup_extended()
If the given key is not found, clear the orig_key and value arguments to
NULL as well as returning FALSE. Then the caller can unconditionally
check them.

This makes the behaviour of g_hash_table_lookup_extended() consistent
with g_hash_table_steal_extended().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:46:48 +01:00
Philip Withnall
b1cae79f78 glib-compile-resources: Fix generated code compiling with C++ compilers
With 0d685b4946, we now encode resource
data as a string. Strings have trailing nul terminators. A C compiler
will happily ignore the fact that the nul terminator exceeds the stated
array length, and will drop it — but a C++ compiler won’t, and will
raise:

error: initializer-string for array of chars is too long [-fpermissive]

Fix that by increasing the array length by 1, and subtracting it again
in the GStaticResource struct.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:29:39 +01:00
Philip Withnall
ea17d637c5 Merge branch 'which' into 'master'
Use "command -v" instead of "which"

See merge request GNOME/glib!277
2018-08-31 11:12:36 +00:00
Philip Withnall
7427bb7184 Merge branch 'wip/oholy/nfs-poll-monitor' into 'master'
glocalfilemonitor: Fallback to poll file monitor for NFS

See merge request GNOME/glib!219
2018-08-31 10:51:25 +00: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
9be6122e11 Merge branch 'gresource-string-encoding' into 'master'
glib-compile-resources: encode data as string

See merge request GNOME/glib!264
2018-08-31 10:46:24 +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
Philip Withnall
f696f512a5 Merge branch 'mcatanzaro/inappropriate-fallback-error' into 'master'
Add a new GTlsError to indicate protocol downgrade attacks

See merge request GNOME/glib!200
2018-08-31 10:44:30 +00:00
Philip Withnall
eeadd57a14 glib: Remove remaining references to __int64
This is a follow-up to 7e821441c4 and
e154e3325e removing some remaining
references to __int64 which are no longer necessary.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:41:12 +01:00
Philip Withnall
ee2b3c5e97 build: Remove SIZEOF___INT64 definition from meson.build
This was a leftover from use of the __int64 type, which was removed
recently in commit 7e821441c4.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:41:12 +01:00
Philip Withnall
b707c71ce4 build: Stop defining STDC_HEADERS
This was previously defined by the AC_HEADER_STDC macro in configure.ac,
but we don’t use that any more. Nothing in GLib depends on this macro,
and neither does anything in my /usr/include which we might care about.

The autoconf documentation for AC_HEADER_STDC says it’s deprecated:
https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Particular-Headers.html#index-AC_005fHEADER_005fSTDC-621

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:41:12 +01:00
Philip Withnall
8759582716 build: Drop unused HAVE_DLFCN_H definition
I can’t see this being used anywhere in GLib, or in my /usr/include
directory. I’m also not sure how configure.ac ends up defining it — it’s
certainly as a side-effect of something, and not deliberate.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:41:12 +01:00
Philip Withnall
3032b5ed5b build: Check for bind_textdomain_codeset() properly
Previously we weren’t checking for it in meson.build (but were checking
for it in configure.ac, courtesy of glib-gettext.m4). Roughly emulate
the checks from glib-gettext.m4, checking for bind_textdomain_codeset()
in whichever libintl implementation we found ngettext() in.

meson.build still doesn’t implement the full set and order of checks in
glib-gettext.m4; there’s still a FIXME about that in meson.build.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:41:12 +01:00
Philip Withnall
7bc3edd1e5 build: Define GLIB_USING_SYSTEM_PRINTF properly
Previously it was hard-coded to true, rather than being based on the
calculations actually made by meson.build.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:36:14 +01:00
Philip Withnall
f35c4d5d42 build: Check for Unix98 positional parameter support in printf()
This is equivalent to the AC_FUNC_PRINTF_UNIX98 macro which we use in
configure.ac. There may still be some obscure Unix platforms which don’t
natively support positional parameters, 20 years on.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-08-31 11:36:13 +01:00
Ryan Schmidt
769b9a9c37 gspawn: Fix build on systems without O_CLOEXEC
Fixes typo introduced in 4afe429d7c.

See https://gitlab.gnome.org/GNOME/glib/issues/1488
2018-08-30 18:08:58 -05:00
Ryan Schmidt
2c85e0a498 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-30 14:55:50 -05:00