Commit Graph

18932 Commits

Author SHA1 Message Date
Benjamin Otte
3aff811d13 Use G_GNUC_FALLTHROUGH where appropriate 2018-09-04 20:24:25 +02:00
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
Balázs Meskó
b0e239c26e Update Hungarian translation
(cherry picked from commit 1d6909c234)
2018-09-01 22:19:45 +00:00
Rafael Fontenelle
1b0aa8b663 Update Brazilian Portuguese translation
(cherry picked from commit 2a64690cd9)
2018-09-01 15:22:39 +00: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
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
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
Philip Withnall
c138b98e36 2.58.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
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 3c1902fcf9.

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
Marco Trevisan (Treviño)
72bf795db5 tests, subprocess: units for cancelled communications 2018-08-27 17:08:47 +02:00
Florian Müllner
d047ca341b portal network monitor: Validate connectivity
Only accept connectivity values that are actually
in the range of GNetworkConnectivity.

https://gitlab.gnome.org/GNOME/glib/merge_requests/227
2018-08-27 10:56:02 -04:00
Matthias Clasen
860735f01b portal network monitor: Drop the version property
Rearrange the code so we try version 3 first,
falling back to version 2 and then version 1.

We still do a construct-time check to ensure
that we work with unsupported versions.

Note that this also takes care of setting the
initial property values in the version 1 case.
2018-08-27 10:55:53 -04:00
Matthias Clasen
5c5881b2ed portal network monitor: use GetStatus when available
Version 3 of the portal interface adds a GetStatus
method that gets all data in a single roundtrip.
Use it when available.
2018-08-27 10:55:30 -04:00
Matthias Clasen
a090d8605b portal network monitor: Implement can_reach
Version 3 of the network monitor portal interface adds
a CanReach method. Use it to implement can_reach.

The docs state that can_reach will either return TRUE
or set an error. So, set an error of G_IO_ERROR_HOST_UNREACHABLE
when the portal returns FALSE for CanReach.
2018-08-27 10:55:01 -04:00
Matthias Clasen
3a3a32a2bb portal network monitor: Always emit ::network-changed
The documentation of this signal is not really clear,
but it seems safer to emit it for all changes, even
if available is unchanged.
2018-08-27 10:54:35 -04:00
Matthias Clasen
8f2393b9b6 Whitespace fixup 2018-08-27 10:48:06 -04:00
Changwoo Ryu
d79d1d9dfe Update Korean translation 2018-08-27 14:12:03 +00:00
Philip Withnall
b9cfbf0e62 Merge branch 'schemasdir' into 'master'
gio: Provide schemas directory information in pkg-config file

See merge request GNOME/glib!274
2018-08-27 13:19:38 +00:00
Iñigo Martínez
64e9e1f482 gio: Provide schemas directory information in pkg-config file
GSettings XML schema files are installed in a well known directory
under Glib's installation directory: `glib-2.0/schemas`. However,
the Glib installation directory might vary, so the exact location of
the schema files might be unknown.

The information regarding this directory has been added to GIO's
pkg-config file, so it can be checked, and also overrided, by using
the command line utility.
2018-08-27 13:50:34 +02:00
Philip Withnall
297941e049 Merge branch 'ossfuzz-9805-variant-parser-overflow' into 'master'
gvariant: Fix more bounds checking in GVariant text format parser

See merge request GNOME/glib!239
2018-08-27 10:14:32 +00:00
Philip Withnall
3cafd7f266 Merge branch 'wip/chergert/garray-bail' into 'master'
garray: add overflow checks before expanding array

See merge request GNOME/glib!195
2018-08-27 10:09:58 +00:00
Milo Casagrande
608cb8050c Update Italian translation 2018-08-27 07:56:50 +00:00
Emin Tufan Çetin
7a41cc0c3b Update Turkish translation 2018-08-26 18:13:22 +00:00
Kukuh Syafaat
fba393134b Update Indonesian translation 2018-08-26 13:49:59 +00:00