Commit Graph

20113 Commits

Author SHA1 Message Date
Ernestas Kulik
9d24c8b223 build: meson: add warning flags
Courtesy of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-21 13:57:10 +00:00
Ernestas Kulik
aef0e694eb configure.ac: add -Wduplicated-branches
https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-21 13:57:10 +00:00
Milo Casagrande
0db0451bbe Update Italian translation 2018-02-21 13:45:25 +00:00
Philip Withnall
6f16176462 po: Fix Spanish abbreviated month names
The case was wrong, and ‘mayo’ had not been abbreviated to ‘may’. The
new translated strings here have all been copied from the abbreviated
month names (without days).

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

https://bugzilla.gnome.org/show_bug.cgi?id=793645#c5
2018-02-21 11:32:49 +00:00
Ernestas Kulik
4f942122b7 gio: tests: modules: declare _get_type prototype
GCC complains about non-static functions being defined without a
previous prototype, even if they themselves provide one.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-21 10:56:31 +00:00
Daniel Mustieles
609a28c0d4 Update Spanish translation 2018-02-20 16:06:44 +00:00
Daniel Mustieles
c26c7e47e6 Update Spanish translation 2018-02-20 15:37:15 +00:00
Emmanuele Bassi
e04d2e81fc ci: Add GitLab CI description file
We're mostly interested into building and testing everything that gets
pushed to the repository — including merge requests.

When pushing tags, though, we should assume we're spinning a release, so
let's run the dist target, and store the tarball, and the generated
documentation while we're at it, as artifacts on GitLab.

The Dockerfile for the image used for the build is included in tree, and
published on Docker Hub. Using a custom image allows us to avoid the
costly "download and install build dependencies" phase, as well as
controlling the environment a little bit better.

https://bugzilla.gnome.org/show_bug.cgi?id=793635
2018-02-20 13:49:21 +00:00
Emmanuele Bassi
8bfedb57cc Increase the timeout for some GLib tests
The CI infrastructure is shared and running inside a containerised
environment, which means tests may take more time to finish on it
than they would on a faster, personal machine.

https://bugzilla.gnome.org/show_bug.cgi?id=793635
2018-02-20 13:49:21 +00:00
Emmanuele Bassi
5459b345e1 Do not use g_test_incomplete() for missing locales
The "incomplete" test state matches the "expected to fail" state (or
"TODO", in TAP), but missing locales should just cause tests to be
skipped.

https://bugzilla.gnome.org/show_bug.cgi?id=793635
2018-02-20 13:49:21 +00:00
Emmanuele Bassi
d8a3492fce Allow running gdbus-peer inside a container
The /etc/machine-id inside a Docker container is allowed to be empty, so
we need to check for that case.

https://bugzilla.gnome.org/show_bug.cgi?id=793635
2018-02-20 13:49:21 +00:00
Daniel Mustieles
d1a080baa5 Update Spanish translation 2018-02-20 13:46:42 +00:00
Philip Withnall
493d3438e8 tests: Disable /date/month_names test with older libc versions
The test for %OB with g_date_strftime() fails with old libc versions
which don’ŧ support the ‘O’ modifier. g_date_strftime() explicitly
doesn’t add additional format placeholders over what’s supported by the
system strftime(), so just disable the test in that case.

The test remains useful on systems with newer libc versions, or on
Windows, where the win32 fallback path is taken.

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

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-20 12:05:11 +00:00
Philip Withnall
998bda1b55 po: Update en_GB translation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-02-20 11:47:39 +00:00
Rafal Luzynski
359768369d Add tests for formatting and parsing month names
Add tests for g_date_strftime() and g_dat_set_parse() formatting and parsing
month names in both nominative and genitive case in several locales, both
needing these two grammatical cases and not needing them.

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-20 11:35:13 +00:00
Rafal Luzynski
fa12658809 win32_strftime_helper: Support nominative/genitive month names
A similar change to the commit be4f96b650,
supports %OB, %Ob, %Oh (alternative, standalone, nominative) month names
along with the old %B, %b, %h (primary, in full date format context,
genitive) month names.

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-20 11:35:13 +00:00
Rafal Luzynski
5520a87930 win32_strftime_helper: Factor out the common code
Factor out the common code supporting "%B", "%b", and "%h" format
specifiers. It will be helpful for the next commit.

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-20 11:35:13 +00:00
Rafal Luzynski
9152244828 g_date_set_parse: Also support nominative/genitive month names
As the support of two grammatical cases of month names has been introduced
try to find both forms when parsing a date.

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-20 11:35:13 +00:00
Tim-Philipp Müller
03d06c175f gwin32networkmonitor: fix build with MSVC
Don't include unistd.h unconditionally.
2018-02-20 00:56:35 +00:00
Daniel Mustieles
5e2fa022e2 Update Spanish translation 2018-02-19 17:44:49 +00:00
George Barrett
9ae71e32e8 gutils: fix missing include
On platforms other than Win32, the g_abort symbol is #def'd to abort.
C99 specifies that this function prototype resides in stdlib.h, but the
required include is absent from gutils.h.

https://bugzilla.gnome.org/show_bug.cgi?id=793555
2018-02-19 11:35:47 +00:00
Philip Withnall
22b224862c tests: Add a debug message to gdbus-peer test
This might help diagnose the CI test failure here:
https://gitlab.gnome.org/GNOME/glib/-/jobs/8222

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-02-19 11:11:36 +00:00
Mario Blättermann
96f39990f7 Update German translation 2018-02-18 13:18:38 +00:00
Robert Antoni Buj Gelonch
4d32d186bf Update Catalan translation 2018-02-18 08:21:37 +00:00
Andika Triwidada
58c1d4ab30 Update Indonesian translation 2018-02-18 08:20:35 +00:00
Fran Dieguez
8a1c2954eb Update Galician translation 2018-02-16 23:30:20 +00:00
Fabio Tomat
f7261519dc Update Friulian translation 2018-02-16 20:42:39 +00:00
Philip Withnall
55e1c6185f gtype: Fix use of potentially undefined GVoidFunc
It’s defined in gutils.h, but various users of GLib might not have
access to that.

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

https://bugzilla.gnome.org/show_bug.cgi?id=793272
2018-02-16 17:42:55 +00:00
Ernestas Kulik
c01c255895 tests: data-input-stream: fix -Wduplicated-branches
The fix makes things a bit awkward, but it seems to work just fine.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-16 17:38:26 +00:00
Piotr Drąg
59d4ee99f2 Update Polish translation 2018-02-16 17:35:24 +01:00
Lubomir Rintel
c1f5e52844 gtype: cast *_init functions to void(*)(void) first
The *_init() functions have prototypes incompatible with *InitFunc types they
are being cast to. This upsets GCC 8's -Wcast-function-type that's enabled by
default with -Wextra.

Let's not have the public header files emit a warning and neutralize it by
doing a void(*)(void) cast first.

https://bugzilla.gnome.org/show_bug.cgi?id=793272
2018-02-16 15:48:15 +00:00
Ernestas Kulik
62e8168878 gatomic: fix -Wduplicated-branches
The checks that the argument passed is a pointer to an integer contain
duplicate branches, which GCC complains about very loudly as of version
7.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-16 15:43:11 +00:00
Ernestas Kulik
c97922c104 gtester: fix -Wduplicated-branches
One of the “quick” or “slow” test run modes is always added to the
argument list, making the branching pointless, which, coincidentally,
now causes a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-16 15:14:39 +00:00
Rafael Fontenelle
f84ce12989 Update Brazilian Portuguese translation 2018-02-16 15:12:15 +00:00
Rafal Luzynski
be4f96b650 g_date_time_format: Support nominative/genitive months
Supports %OB (alternative, standalone, nominative) month name along
with the old %B (primary, in a complete date format context, genitive)
month name.  Similarly %Ob and %Oh for abbreviated month names.
Depending on the underlying operating system uses nl_langinfo()
or provides our custom implementation.

(Tweaked by Philip Withnall <withnall@endlessm.com> to add test case
comment and bug reference.)

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-16 14:37:51 +00:00
Natanael Copa
d933cf99bf gquark: simplify g_intern_string/g_intern_static_string
Move the common code to a quark_intern_string_locked function. This has
no effect on the generated code but makes codebase a bit cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=768507
2018-02-16 12:49:43 +00:00
Natanael Copa
2f07630b43 gquark: simplify g_quark_from_static_string/g_quark_from_string
Move common code to quark_from_string_locked  wrapper function. This has
no effect on generated code but it makes codebase a bit cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=768507
2018-02-16 12:49:43 +00:00
Philip Withnall
a66fc8e3a9 gfile: Fix FD leak introduced in error path in previous commit
The hazards of ‘just a quick fix and I will push’.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-02-16 12:03:47 +00:00
Andrés Souto
a5778ef7c5 gio: bump splice copy buffer size to 1024k
This change increases throughput when copying files for some filesystems

(Modified by Philip Withnall <withnall@endlessm.com> to add more error
handling.)

https://bugzilla.gnome.org/show_bug.cgi?id=791457
2018-02-16 11:54:56 +00:00
Philip Withnall
2ffba0e262 gdatainputstream: Document the returned string is always nul-terminated
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody

https://bugzilla.gnome.org/show_bug.cgi?id=742124
2018-02-16 11:15:02 +00:00
Philip Withnall
0664b61782 gdbusconnection: Fix error in g_dbus_connection_emit_signal() docs
It incorrectly said that an error could only be returned if the GVariant
was incorrect for the D-Bus API, but that’s not true: an error will also
be returned if you call it on a closed GDBusConnection.

Clarify that, and mention the actual error codes which are returned.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-02-15 16:42:26 +00:00
Emmanuele Bassi
80d328b3a8 build: Separate the Objective C files into their own helper lib
This avoid polluting the CFLAGS with -xobjective-c.

(Rebased by Philip Withnall <withnall@endlessm.com>.)

https://bugzilla.gnome.org/show_bug.cgi?id=672777
2018-02-15 14:31:36 +00:00
Emmanuele Bassi
9453b97e09 docs: Add G_ENABLE_DIAGNOSTIC
We need to mention this environment variable, so that developers have a
fighting chance of actually using it.

https://bugzilla.gnome.org/show_bug.cgi?id=732184
2018-02-15 11:25:53 +00:00
Emmanuele Bassi
77419cf578 docs: Mention the newly added return values
The return value of the g_hash_table_add(), g_hash_table_insert(), and
g_hash_table_replace() functions was changed from void to gboolean in
GLib 2.40, but it was not mentioned in the API reference or the release
notes.

https://bugzilla.gnome.org/show_bug.cgi?id=793300
2018-02-15 11:25:53 +00:00
Philip Withnall
809c66639f gobject: Mention transfer semantics of installing properties on GObjects
GParamSpec supports floating references.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-02-14 15:11:11 +00:00
Matthias Clasen
ee57d56e8d 2.55.2 2018-02-14 08:19:20 -05:00
Fabio Tomat
d3e5a190d2 Update Friulian translation 2018-02-13 18:48:54 +00:00
Philip Withnall
66ab836f5a gsubprocess: Fix a critical calling communicate() with no pipes
If calling g_subprocess_communicate() on a GSubprocess with no
stdout/stderr pipe, a critical warning would be emitted from
g_memory_output_stream_steal_as_bytes(), as it would be called on a NULL
output stream.

Fix that, improve the relevant GIR annotations, and expand the unit
tests to cover it (and various other combinations of flags).

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

https://bugzilla.gnome.org/show_bug.cgi?id=793331
2018-02-13 16:27:32 +00:00
Philip Withnall
4183cedbe2 tests: Use a different time for testing UNIX timestamps
The test_GDateTime_new_from_unix() test creates a UNIX timestamp
representing 1990-01-01 00:00:00 in the local timezone, and then turns
it into a GDateTime using g_date_time_new_from_unix_local(). This should
succeed regardless of the current local timezone (TZ environment
variable).

However, it was failing for TZ=America/Lima, and *only* for that
timezone.

As it turns out, Lima used to have a DST leap at exactly 00:00:00 on the
1st of January — but this stopped in 1994, which made investigation a
bit harder. See:
https://www.timeanddate.com/time/change/peru/lima?year=1990.

What was happening is that 1990-01-01 00:00:00 was being converted to
the timestamp 631170000, but GDateTime was converting that timestamp to
1990-01-01 01:00:00 when loading it. Both conversions are correct: a DST
leap creates an equivalence between an hour’s worth of timestamps.

We can somewhat validate this by seeing that timestamp 631169999 maps to
1989-12-31 23:59:59, and timestamp 631170001 maps to 1990-01-01
01:00:01.

Fix this by changing the date used by the test to one where no timezone
was undergoing a DST leap in 1990. This should never change, as all that
data is now historical.

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

https://bugzilla.gnome.org/show_bug.cgi?id=793319
2018-02-13 15:56:30 +00:00
Philip Withnall
35d5add4bb build: Lower libmount dependency to 2.23
Since commit 96ebcee8c4, we don’t actually need libmount 2.28. Lower our
dependency to 2.23 so that we can continue to build against CentOS 7.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=793288
2018-02-13 14:59:03 +00:00