Commit Graph

20682 Commits

Author SHA1 Message Date
Philip Withnall
5f5f98f3d0 Merge branch 'test-bug-base' into 'master'
Relax use of g_test_bug() to not require g_test_bug_base() to be called first

See merge request GNOME/glib!1044
2019-08-21 17:21:52 +00:00
Philip Withnall
87a71fe4d3 tests: Add a test for peer-to-peer GDBusProxy usage with a bus name
This is a regression test for the fix in !554.

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

Fixes: #1620
2019-08-21 19:49:06 +03:00
Philip Withnall
a01983f94c tests: Add a test for g_dbus_connection_get_flags()
It was added in !554 but never had a unit test.

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

Helps: #1620
2019-08-21 19:49:06 +03:00
Philip Withnall
9fc745db07 tests: Drop unnecessary usage of g_test_bug_base("")
See the previous commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-08-21 19:42:27 +03:00
Philip Withnall
e7b857a44a gtestutils: Allow g_test_bug() to be used without g_test_bug_base()
Since we transitioned from Bugzilla to GitLab, we have two forms of bug
references in the GLib source code: old (but still relevant) Bugzilla
links, and newer GitLab links. We can’t use a single base for the two,
so have to either build incorrect URIs, or provide the full URI in
g_test_bug().

It’s always seemed a bit of an over-optimisation to provide the bug base
separately from the bug ID, so relax the assertions and documentation
around g_test_bug_base() so that g_test_bug() can be used on its own.

The old usage patterns are still supported unchanged.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-08-21 19:41:05 +03:00
Piotr Drąg
5558c668a9 Update Polish translation 2019-08-21 17:59:03 +02:00
Christoph Reiter
26f7104d79 meson: small cleanup for printf checks
Instead of duplicating checks add a use_system_printf meson variable and
macro and use them everywhere.
2019-08-20 17:19:26 +02:00
Christoph Reiter
271e283881 meson: Remove an outdated todo re HAVE_UNIX98_PRINTF
We have checks for HAVE_UNIX98_PRINTF now. The macro is unused, but we need
the checks to decide if the printf is good enough as is.
2019-08-20 17:19:26 +02:00
Nirbheek Chauhan
a5f0e648d3 Merge branch 'win32-no-sys-printf' into 'master'
win32: don't assume the format specifier for the stdlib printf/scanf like functions

See merge request GNOME/glib!1033
2019-08-20 14:08:58 +00:00
Nirbheek Chauhan
6ea818fe5b Merge branch 'meson-good-printf-fixes' into 'master'
meson: build gnulib if printf isn't good enough

See merge request GNOME/glib!1031
2019-08-19 21:22:47 +00:00
Aurimas Černius
248e30e083 Updated Lithuanian translation 2019-08-18 22:14:44 +03:00
Anders Jonsson
c2f8267fdb Update Swedish translation 2019-08-17 13:00:29 +00:00
Asier Sarasua Garmendia
798b99675a Update Basque translation 2019-08-14 14:24:19 +00:00
Philip Withnall
389b1820f2 glib-compile-schemas: Fix some minor en_GB-isms in translatable strings
Spotted by Bruce Cowan.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #1867
2019-08-14 10:38:23 +02:00
Jordi Mas
10be2c12ab Update Catalan translation 2019-08-14 07:57:18 +02:00
Michael Catanzaro
0984b54ac3 Merge branch 'wip/smcv/reproducer-for-1852' into 'master'
glib/tests/fileutils: Add a reproducer for #1852

See merge request GNOME/glib!1034
2019-08-13 15:23:22 +00:00
Xavier Claessens
fdcdd5c5b4 Meson: Override glib-compile-resources/schemas
This fix build error for projects that use gnome.compile_resources()
when glib is built as a subproject and not installed on the build
machine.

Note that this is not working for cross compilation cases, because it
would require to compile everything twice (for host and build machines).
A better solution would be to rewrite those tools in python. See #1859.
2019-08-13 08:52:50 -04:00
Simon McVittie
09b3bf21c9 Merge branch 'post-release-version-bump' into 'master'
Post-release version bump

See merge request GNOME/glib!1015
2019-08-13 09:04:01 +00:00
Simon McVittie
18ae2b3c78 cond test: Don't make assumptions about struct sigaction member order
On x86 (and apparently most other Linux architectures), the union
with the signal handler is the first member, but on MIPS Linux,
the first struct member is sa_flags (possibly done to be compatible
with IRIX). Zero out the struct and fill in the field we want by name.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-08-13 08:41:09 +01:00
Simon McVittie
941c0bd606 glib/tests/fileutils: Add a reproducer for #1852
This test passes on the glib-2-60 branch, and failed before
merging !1027.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-08-13 08:37:40 +01:00
Philip Withnall
6d7143e91d Merge branch 'wip/carlosg/utf8-strreverse-invalid-writes' into 'master'
gutf8: Assert that written memory stays in bounds

See merge request GNOME/glib!1026
2019-08-12 10:39:11 +00:00
Simon McVittie
870b30bd7c Merge branch 'wip/carlosg/fix-mkdir-with-parents-errors' into 'master'
gfileutils: Fix error propagation for other than ENOENT

See merge request GNOME/glib!1027
2019-08-12 08:01:59 +00:00
Kukuh Syafaat
0ae99bfe22 Update Indonesian translation 2019-08-12 06:03:05 +00:00
Christoph Reiter
6095b9bd3c win32: don't assume the format specifier for the stdlib printf/scanf like functions
When using the mingw printf shims for C99 compat the msvc format specifiers don't work
and the build fails.

Ideally we would use glib functions which abstract this away, but in the error handler context
we shouldn't call back into glib. And for scanf we don't have a glib wrapper.

Instead call the "secure" versions provided by the win32 API (_snprintf_s/fprintf_s/sscanf_s)
which mingw doesn't replace.
2019-08-10 21:56:33 +02:00
Christoph Reiter
6e1ceb1a9d meson: build gnulib if printf isn't good enough
We currently check in multiple places if vsnprintf/snprintf/printf are
good and if not use gnulib. This case was not checking for printf which
made the build fail with recent mingw-w64 where snprintf was improved to
pass all glib checks but printf still doesn't.
2019-08-10 16:03:44 +02:00
Carlos Garnacho
3a4a665083 gfileutils: Fix error propagation for other than ENOENT
Commit 6f55306e04 unintendedly broke error handling for other
error conditions than ENOENT along the path, like EPERM. It wanted
to ignore ENOENT on all elements except the last in the path, but
in doing that it ignored any other error that might happen on the
last element.

https://gitlab.gnome.org/GNOME/glib/issues/1852
2019-08-08 02:32:46 +02:00
Carlos Garnacho
154f6cafa9 gutf8: Assert that written memory stays in bounds
You may expect funny effects from passing invalid UTF-8, but not
that funny. The assert will probably be a better and more immediate
confirmation of an error than invalid writes under the address of the
string copy.

https://gitlab.gnome.org/GNOME/glib/issues/1863
2019-08-07 23:33:46 +02:00
Florentina Mușat
179fdc5239 Update Romanian translation 2019-08-05 14:03:50 +00:00
Philip Withnall
37b2093f28 Merge branch 'contributing-fixes' into 'master'
Remove mentions of mailing lists from the documentation

See merge request GNOME/glib!1002
2019-08-05 10:20:40 +00:00
Emmanuele Bassi
57b6b4b1e8 Merge branch 'g-object-get-property-zero-init' into 'master'
g_object_get_property: Improve documentation for use of G_VALUE_INIT

See merge request GNOME/glib!1023
2019-08-01 09:47:56 +00:00
Simon McVittie
41d31cd4b7 g_object_get_property: Document accepting G_VALUE_INIT as new API
Code intended to be portable to older versions of GLib cannot rely
on this being considered valid.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-08-01 09:29:52 +01:00
Simon McVittie
bf8b669061 g_object_get_property: Clarify meaning of G_TYPE_INVALID
"Uninitialized value" is partially correct, since it has not been
initialized with a type, but it's more precise to say
"zero-initialized value". It is still a programming error to pass a
pointer to uninitialized memory with arbitrary contents as the value.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-08-01 09:29:52 +01:00
Daniel Mustieles
1f79c7f7c0 Updated Spanish translation 2019-07-30 09:38:18 +02:00
Philip Withnall
84738f7e80 Merge branch 'wip/hadess/gnetworkmonitor-nm-fixups' into 'master'
gnetworkmonitornm fixups

See merge request GNOME/glib!1016
2019-07-29 15:47:55 +00:00
Bastien Nocera
b80fcc6cb8 tests: Remove unneeded ";" in G_DEFINE_INTERFACE_WITH_CODE 2019-07-29 17:28:01 +02:00
Bastien Nocera
f299886f1f gnetworkmonitornm: Remove double-space 2019-07-29 17:28:01 +02:00
Bastien Nocera
109f247039 gnetworkmonitornm: Arguments to g-signal's callback are const 2019-07-29 17:28:01 +02:00
Bastien Nocera
7d3ecce346 gnetworkmonitornm: Disconnect g-signal from proxy
So that we're sure never to receive a signal if something is keeping the
proxy alive.
2019-07-29 17:28:01 +02:00
Bastien Nocera
ef1d5b5ee0 gnetworkmonitornm: Remove unneeded ";" in G_DEFINE_INTERFACE_WITH_CODE 2019-07-29 17:28:01 +02:00
Philip Withnall
86ba1b37bd Merge branch 'application-free-remote-actions' into 'master'
gapplication: Fix a leaking GRemoteActionGroup member

See merge request GNOME/glib!1011
2019-07-29 13:21:51 +00:00
Philip Withnall
a3d9c3ffa7 Post-release version bump
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-29 14:16:45 +01:00
Philip Withnall
6bebef1691 2.61.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-29 14:04:40 +01:00
Philip Withnall
018eaf5169 Merge branch '1438-deprecate-gtimeval' into 'master'
Deprecate GTimeVal- and GTime-based APIs

Closes #1438

See merge request GNOME/glib!1004
2019-07-29 12:59:50 +00:00
Emmanuele Bassi
5c5034ab8b Merge branch '1792-again-marshal-params' into 'master'
glib-genmarshal: Avoid a param ref for static param valist arguments

Closes #1792

See merge request GNOME/glib!928
2019-07-29 11:45:07 +00:00
Philip Withnall
14b087ea18 gmain.c: Fix comment about Y2038 safety of g_get_real_time()
This comment was correct until commit adf1f98f62, when the `GTimeVal`
which the result was put into (introducing the Y2038-unsafety) was
dropped.

The adjustment and scaling of the `FILETIME` should not make it
Y2038-unsafe: the maximum `FILETIME` is 2^64-1. Subtracting the epoch
adjustment and dividing by 10 gives the timestamp 1833029933770955161,
which is in June 58086408216 (at just after 3am UTC). I think that’s
enough time to be going on with.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
96c74fd0e6 win32: Stop using deprecated GTimeVal in GWinHttpFile
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
2d62503fb0 gdatetime: Stop using deprecated g_get_current_time()
This requires some reworking of the internal g_date_time_new_from_unix()
function, since it previously operated in seconds, which wasn’t high
enough resolution — the g_get_current_time() code path used to operate
in microseconds.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
2df27e3416 tests: Ignore deprecated functions in a few main loop and timer tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
2ed76969d0 tests: Ignore deprecated functions in parts of GDateTime tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
82e3e109dd glib: Stop using g_get_current_time() in various places
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00