Commit Graph

18604 Commits

Author SHA1 Message Date
Philip Withnall
9470aa2cb9 gchecksum: Use G_GUINT64_CONSTANT for SHA-512 constants
They’re all 8 bytes long, and integer constants that large need a suffix
on 32-bit platforms.

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

https://gitlab.gnome.org/GNOME/glib/issues/977
2018-06-29 18:26:00 +01:00
Philip Withnall
b0be2cdbdd Merge branch 'master' into 'master'
gspawn: treat all negative fds as unset

See merge request GNOME/glib!145
2018-06-29 17:14:37 +00:00
Daniel Drake
16c3409888 gspawn: treat all negative fds as unset
Philip Withnall suggests that glib should treat all negative
file descriptors as unset/invalid, rather than explicitly requiring
them to be -1.

This can simplify the logic for some users of this code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/132
2018-06-29 11:44:12 -05:00
Philip Withnall
95082691d2 Merge branch 'doc-types' into 'master'
doc: remove .types files and let gtkdoc-scan generate them

See merge request GNOME/glib!144
2018-06-29 15:28:30 +00:00
Philip Withnall
4dc927fc2f Merge branch 'ci-memcheck-preparation' into 'master'
Preparation for adding valgrind/memcheck to CI

See merge request GNOME/glib!143
2018-06-29 13:31:43 +00:00
Philip Withnall
da44b78bef valgrind: Add more suppressions to glib.supp
These were spotted by running the entire test suite under valgrind,
thanks to the magic of Meson: see the build rules in valgrind-x86_64 in
.gitlab-ci.yml.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 13:55:24 +01:00
Philip Withnall
e818089b70 tests: Fix use-after-free in reference tests
Switch the check which tests whether the object has been finalised from
being a use-after-free, to using a weak pointer which is nullified on
finalisation.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 13:55:24 +01:00
Philip Withnall
ffb1c3cb74 tests: Various minor leak fixes in the GObject tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 12:13:32 +01:00
Philip Withnall
6a22663d9a tests: Various minor leak fixes in the GLib tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 12:13:32 +01:00
Philip Withnall
f7bd41fdaa tests: Fix leak when checking for du binary
g_find_program_in_path() returns a pointer, not a boolean.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 12:13:32 +01:00
Philip Withnall
93b519b104 tests: Various minor leak fixes in the GIO tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 12:13:32 +01:00
Philip Withnall
68526565f4 tests: Fix use-after-free in the appinfo tests
When changing the locale using setlocale(), duplicate the old locale
value before updating it, so that we can safely restore the old locale
after running the test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 12:13:32 +01:00
Philip Withnall
61da8748fd glocalfile: Fix a minor memory leak
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-29 12:13:32 +01:00
Ondrej Holy
51132b1d49 Merge branch 'cifs-is-not-a-system-fs' into 'master'
gunixmounts: Stop considering cifs/nfs as system file systems

See merge request GNOME/glib!125
2018-06-29 07:07:24 +00:00
Philip Withnall
0ea541171d Merge branch '903-deprecate-main-context-wait' into 'master'
gmain: Officially deprecate g_main_context_wait()

Closes #903

See merge request GNOME/glib!139
2018-06-28 16:59:39 +00:00
Xavier Claessens
88d13b4d09 doc: Remove glib.types since glib has not GType 2018-06-28 09:55:56 -04:00
Xavier Claessens
124779be88 doc: Remove gobject.types since gtkdoc-scan rebuild it anyway
I'm not sure why gobject.cI was needed but that looks like hack around
old gtkdoc bug. Works fine without it.
2018-06-28 09:55:56 -04:00
Xavier Claessens
71bc8e797b doc: Remove gio.types since gtkdoc-scan rebuild it anyway
meson.build was already passing --rebuild-types option but not
Makefile.am. Copy the IGNORE_HFILES list from meson.build because it was
outdated in Makefile.am and it's causing build issues when using the
generated gio.types file because it would contain win32 types when
building on linux.
2018-06-28 09:55:56 -04:00
Fabio Tomat
3052d75fde Update Friulian translation 2018-06-28 10:19:27 +00:00
Philip Withnall
c40e8a55b3 Merge branch 'android-28' into 'master'
ci: Add latest Android API level 28

See merge request GNOME/glib!141
2018-06-27 14:34:25 +00:00
Philip Withnall
6db2412b41 gdesktopappinfo: Fix a minor command line leak
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-27 15:01:09 +01:00
Philip Withnall
c1d8b9c806 gbufferedoutputstream: Fix jump conditional on uninitialised data
The flush data structures were not zero-initialised, which meant the
branch in flush_buffer_thread() was based on an uninitialised condition.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-27 15:01:08 +01:00
Philip Withnall
cb2982efe6 Merge branch '1175-source-names' into 'master'
gmain: Add names to various GSources constructed in GLib

Closes #1175

See merge request GNOME/glib!138
2018-06-27 13:45:16 +00:00
Xavier Claessens
cf9613056c ci: Add latest Android API level 28
- Split the download part into a separate script to so docker keeps that
step in cache and avoid redownloading it.

- With API level >= 28 libiconv is not needed anymore because it's part
of Android's libc.

- Generate standalone toolchains to reduce the docker image size. It's
also easier because it doesn't need to pass sysroot args.

- Use clang compiler because gcc is deprecated in this Android NDK and
will be removed in the next release.
2018-06-27 09:23:13 -04:00
Xavier Claessens
b3508123e2 ci: factor out cross compilation jobs definitions 2018-06-27 09:18:05 -04:00
Ting-Wei Lan
064cb2b001 ci: Add FreeBSD CI
We use 'freebsd-11' instead of 'freebsd' as tags here because newer
FreeBSD versions can include API changes which are worth testing.
2018-06-26 23:18:04 +08:00
Philip Withnall
7a34e396ae gmain: Officially deprecate g_main_context_wait()
It’s been de-facto deprecated for a long time, due to emitting a
critical warning when used in a non-internal context. Make that official
in the documentation and with a deprecation annotation.

Split the implementation into an internal helper and an external
wrapper, so the two remaining internal uses don’t emit deprecation
warnings.

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

https://gitlab.gnome.org/GNOME/glib/issues/903
2018-06-26 09:30:19 +01:00
Philip Withnall
208a6e815a gmain: Add names to various GSources constructed in GLib
For the purposes of debugging, it is quite useful for every GSource to
have a name set. Ensure that any GSource we construct inside GLib has a
name set. For GSources which are then returned to the caller, this name
can then be overridden with something even more useful by the caller.

Since this data is only used for debugging, avoid doing any allocations
for it; just use static strings.

https://gitlab.gnome.org/GNOME/glib/issues/1175
2018-06-26 09:25:39 +01:00
Emmanuele Bassi
cbfa776fc1 Merge branch 'wip/piotrdrag/unicode-typography-180625' into 'master'
Use Unicode typography in new translatable strings

See merge request GNOME/glib!137
2018-06-25 15:13:35 +00:00
Piotr Drąg
d9fc99256e Use Unicode typography in new translatable strings
See https://developer.gnome.org/hig/stable/typography.html
2018-06-25 16:51:00 +02:00
Philip Withnall
509ced6be5 Merge branch 'source-get-id-docs' into 'master'
gmain: Clarify documentation for g_source_get_id()

See merge request GNOME/glib!128
2018-06-25 13:18:32 +00:00
Philip Withnall
8002928465 Merge branch '1360-mkenums-tests' into 'master'
Add unit tests for glib-mkenums and resolve #1360

Closes #1360

See merge request GNOME/glib!136
2018-06-25 13:10:25 +00:00
Philip Withnall
515dac258c gmain: Clarify documentation for g_source_get_id()
It’s good to know *which* GMainContext is used to determine the ID, and
the preconditions for calling this method.

Using wording suggested by Emmanuele Bassi <ebassi@gmail.com>.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-25 13:46:43 +01:00
Philip Withnall
76083b6530 tests: Add glib-mkenums test for missing nicks
This adds a test to verify the change from issue #1360.

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

https://gitlab.gnome.org/GNOME/glib/issues/1360
2018-06-25 13:39:13 +01:00
Philip Withnall
e8d755eb8e tests: Add initial test framework for glib-mkenums
This allows running glib-mkenums with different C headers and checking
its output.

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

https://gitlab.gnome.org/GNOME/glib/issues/1360
2018-06-25 13:39:13 +01:00
Peter Kjellerstedt
c0e6fa4f19 glib-mkenums: Ignore other per value options than 'skip' and 'nick'
If some other per value option was present than 'skip' or 'nick' then
a KeyError would occur. Ignoring such options matches the behaviour of
the old, Perl-based glib-mkenums.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>

https://gitlab.gnome.org/GNOME/glib/issues/1360
2018-06-25 13:39:13 +01:00
Philip Withnall
4993f2b7e5 Merge branch 'wip/muktupavels/per-desktop-overrides' into 'master'
GSettings: per-desktop overrides

Closes #1013

See merge request GNOME/glib!105
2018-06-25 10:32:44 +00:00
Emmanuele Bassi
a65ee63c71 Merge branch 'wip/lantw/gspawn-declare-environ' into 'master'
gspawn: Declare environ

See merge request GNOME/glib!134
2018-06-23 13:27:47 +00:00
Ting-Wei Lan
e14c853d9a gspawn: Declare environ
Function do_posix_spawn uses environ, but gspawn.c doesn't declare it.
Since there is no system header declaring this global variable, this
causes compilation error on FreeBSD.

Code added in this commit is copied from genviron.c.
2018-06-23 16:11:19 +08:00
Alberts Muktupāvels
b618ec40a7 Add a test for per-desktop overrides 2018-06-22 22:02:31 +03:00
Philip Withnall
0f77dc847b Merge branch 'wip/Jehan/fopen-modes' into 'master'
glib: Win32 does not accept "wb+" mode for fopen().

See merge request GNOME/glib!119
2018-06-22 17:24:14 +00:00
Philip Withnall
74cde71ceb Merge branch 'android-ndk-r17b' into 'master'
Few updates to the CI

See merge request GNOME/glib!133
2018-06-22 17:19:46 +00:00
Xavier Claessens
ca2fc30dea ci: Add "--push" argument to run-docker.sh help script
Also there is no need to run docker as root, the user just needs to be
in the "docker" group.
2018-06-22 11:49:08 -04:00
Xavier Claessens
94748af0e1 ci: Use shorter job names
Job names in gitlab pipeline view gets truncated to  "fedora-meson-..."
for all jobs which is not really useful. All our CIs are using Meson,
and the host distro is not relevant when doing cross builds.
2018-06-22 11:49:08 -04:00
Xavier Claessens
9a76e08ae1 ci: Update Android NDK to r17b
We should be testing latest NDK release but keep using API level 21 to
ensure GLib does not start using newer APIs. We could also later add a
runner for latest API level 28 which includes iconv API in Android's
libc so we don't need GNU libiconv anymore.
2018-06-22 11:49:08 -04:00
Xavier Claessens
250205a94b ci: Pin meson version to 0.46.1 when generating docker image
Also move it after running setup-android-ndk.sh so docker can keep that
stage in cache and won't run it again when changing meson version.
2018-06-22 11:06:45 -04:00
Jehan
ef4063c74d glib: add test for various modes of fopen().
This is especially to check for Win32 spotty support of "+" modes, such
as "wb+" which has to be replaced by "w+b".
See merge request !119.
2018-06-22 16:40:21 +02:00
Philip Withnall
e5ff26d657 Merge branch 'GVariant-bytestring-docs' into 'master'
gvariant-text: fix bytestring example

See merge request GNOME/glib!132
2018-06-22 10:19:36 +00:00
Will Thompson
2e7d22a3bd
gvariant-text: fix bytestring example
ord('a') == 97 == 0x61 != 0x97.

    >>> GLib.Variant.parse(None, "[byte 0x97, 0x98, 0x99, 0]", None, None)
    GLib.Variant('ay', b'\227\230\231')
    >>> GLib.Variant.parse(None, "[byte 0x61, 0x62, 0x63, 0]", None, None)
    GLib.Variant('ay', b'abc')
2018-06-22 10:01:58 +01:00
Philip Withnall
04c8691208 Revert "build: Look for copied Objective-C files in builddir again"
This reverts commit fe72b8772e.

It still fails on GNOME Continuous:
http://build.gnome.org/continuous/buildmaster/builds/2018/06/21/44/build/.

See https://gitlab.gnome.org/GNOME/glib/merge_requests/129 for
discussion.
2018-06-22 00:21:05 +01:00