Commit Graph

20574 Commits

Author SHA1 Message Date
Philip Withnall
c0f958de5b glib: Stop mentioning deprecated g_get_current_time() in docs
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
de25be72f0 tests: Stop using deprecated g_get_current_time()
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
161654681f gfileinfo: Stop using deprecated GTimeVal
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
def5db23a3 gdbusutils: Stop using g_get_current_time()
It is deprecated.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
4faf4fcfaa gfileinfo: Deprecate g_file_info_{get,set}_modification_time()
They use the deprecated GTimeVal type, which is not year 2038 safe, so
have to be deprecated.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
d166a55c64 gfileinfo: Add g_file_info_{get,set}_modification_date_time() APIs
These are alternatives to g_file_info_{get,set}_modification_time(),
which will soon be deprecated due to using the deprecated GTimeVal
type, which is not year 2038 safe.

The new APIs take a GDateTime instead.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
a3f22f0c2c gbookmarkfile: Use GDateTime instead of GTimeVal internally
Avoid using a deprecated type.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
aa261ca24a gasyncqueue: Ignore use of deprecated types in deprecated APIs
It’s unavoidable.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
45b74b02b8 gdate: Deprecate methods which use GTimeVal
GTimeVal is not year-2038-safe.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
ec0cc39de0 gmain: Add deprecation ignore guards around other GTimeVal usage
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
fe760ba442 gmain: Swap implementations of g_get_current_time() + g_get_real_time()
The former is now deprecated, so it makes sense to base its
implementation on the latter, rather than the other way around.

This introduces no functional changes.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
626b6f5ea7 gmain: Deprecate g_get_current_time() because it uses GTimeVal
GTimeVal is not year-2038-safe.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
b8540db1bf glib: Deprecate API using GTimeVal in gtimer.h
GTimeVal is not year-2038-safe.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
e971b25c6a gdatetime: Deprecate GDateTime API which uses GTimeVal
GTimeVal is not year-2038-safe.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
44d1fa3070 gdate: Fix minor typo in GTimeVal documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-29 12:27:29 +01:00
Philip Withnall
e3f88f311f gtypes: Deprecate GTimeVal in favour of guint64 or GDateTime
GTimeVal is subject to the year 2038 problem, since its `tv_sec` field
is a `glong`, which is 32 bits on 32-bit platforms.

Use `guint64` to represent microsecond-precision time since the Unix
epoch; or use `GDateTime` for full date/time representation.

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

Fixes: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
e357619d24 gdate: Minor documentation formatting improvements for GTime
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-29 12:27:29 +01:00
Philip Withnall
5983cc8742 gdate: Deprecate GTime
It’s not Y2038-safe, as it’s 32-bit. While it was previously deprecated
in the documentation, now add the deprecation annotation for the
compiler.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
dbabd2b8a7 gdatetime: Add g_date_time_format_iso8601() convenience function
This is a simple wrapper around g_date_time_format_iso8601() which
always produces ISO 8601 dates, without people having to remember the
format string for them (and with the convenience of terminating UTC
dates with ‘Z’ rather than ‘+00’).

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
8f385b8cf5 Merge branch 'master' into 'master'
windows: fix multicast socket binding to specific network interfaces

Closes #1635

See merge request GNOME/glib!887
2019-07-29 11:10:40 +00:00
Philip Withnall
014e8d0547 Merge branch 'wip/lantw/gapplication-remove-inactivity_timeout-source-on-finalize' into 'master'
gapplication: remove inactivity_timeout source on finalize

See merge request GNOME/glib!1009
2019-07-29 09:50:39 +00:00
Emmanuele Bassi
d62cabc624 Merge branch '1847-log-structured-max-version' into 'master'
gmessages: Only use structured logs if GLIB_VERSION_MAX_ALLOWED is ≥2.56

Closes #1847

See merge request GNOME/glib!1008
2019-07-28 10:49:57 +00:00
Ting-Wei Lan
0ed8605079 gapplication: remove inactivity_timeout source on finalize
The event source used to handle inactivity_timeout doesn't hold a
reference on the application. Therefore, it is possible for callback
function of the event source to run after the application has been
freed, leading to use-after-free problem. To avoid the problem, we
should remove the event source before the application is freed.

This should fix SIGBUS crash of gio/tests/gapplication on FreeBSD.
https://gitlab.gnome.org/GNOME/glib/issues/1846#note_566550
2019-07-27 15:28:23 +08:00
Philip Withnall
54f94b1303 gmessages: Only use structured logs if GLIB_VERSION_MAX_ALLOWED is ≥2.56
Only redefine g_message() and friends to use structured logging if the
compiling code is OK with depending on GLib functionality from ≥2.56.

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

Fixes: #1847
2019-07-26 20:49:01 +01:00
Philip Withnall
517f756acf Merge branch 'rnagy/glib-mkdir' into 'master'
Resubmission of !832 “Try to create the complete path right away and fall back”

See merge request GNOME/glib!1007
2019-07-26 10:57:53 +00:00
Robert Nagy
ca98741251 gfileutils: Try creating complete path first
Try to create the complete path right away and fall back
to creating all path elements one by one.

This also helps to avoid TOCTTOU problems and avoids walking
the path all the time, providing a nice performance gain, by
avoiding syscalls.
2019-07-26 11:28:43 +01:00
Robert Nagy
6f55306e04 gfileutils: Ignore ENOENT from all except the last element
Ignore ENOENT errors up until the last element while trying to create each
of the path elements in case a restricted file-system is being used where
path elements can be hidden or non-accessible.
2019-07-26 11:27:50 +01:00
Emmanuele Bassi
b482a5c1a9 Merge branch 'array-test-fixes' into 'master'
Small array test fixes

See merge request GNOME/glib!996
2019-07-26 08:59:17 +00:00
Philip Withnall
78b1278d44 Merge branch '488-assert-gobjects-dont-leak' into 'master'
gobject: Add a g_assert_finalize_object() macro

Closes #1780 and #488

See merge request GNOME/glib!859
2019-07-25 15:42:39 +00:00
Philip Withnall
b6d4da7684 tests: Use g_object_assert_last_unref() in various tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-25 15:23:21 +01:00
Simon McVittie
b76bf3ca72 gobject: Add a g_assert_finalize_object() macro
With modifications by Philip Withnall.

Fixes: #488
2019-07-25 15:23:21 +01:00
Emmanuele Bassi
17be9e5c4c Merge branch '436-test-coredumps' into 'master'
Fix tests creating coredumps

Closes #436

See merge request GNOME/glib!959
2019-07-25 13:49:09 +00:00
Emmanuele Bassi
298ee8f87c Merge branch '1791-macos-get-mime-dirs' into 'master'
gcontenttype: Add no-op versions of {get,set}_mime_dirs() on win32/macOS

Closes #1791

See merge request GNOME/glib!927
2019-07-25 13:48:04 +00:00
Philip Withnall
3de1b88339 gcontenttype: Add no-op versions of {get,set}_mime_dirs() on win32/macOS
These are here to prevent linker errors, since `gcontenttype.[ch]`
aren’t compiled on Windows or macOS.

The implementations are stubs to be filled out by someone who knows each
platform, at some point in the future.

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

Fixes: #1791
2019-07-24 14:50:53 +01:00
Philip Withnall
0c0cf59858 Merge branch 'meson-bump' into 'master'
Bump the required version of Meson

See merge request GNOME/glib!924
2019-07-24 12:57:32 +00:00
Emmanuele Bassi
bd372e3174 ci: Fix non-build jobs
All non-build jobs must share the same Docker image with the Fedora
build job.
2019-07-24 13:32:55 +01:00
Emmanuele Bassi
85dc45e548 build: Bump up the required version of Meson
We cannot bump to the latest stable version of Meson, even if it would
make our life easier. We can, though, use the version of Meson shipped
by the next, soon to be released Debian stable.
2019-07-24 13:08:06 +01:00
Emmanuele Bassi
f0d713e50d ci: Use the new Docker images 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
fa6f2d4516 ci: Update the MSYS2 build script 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
772a6e3262 ci: Update the MSVC build script 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
f6b4012c9d ci: Update the MingW Docker image 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
ed7c258996 ci: Update the Android NDK Docker image 2019-07-24 13:08:06 +01:00
Emmanuele Bassi
14d2c4872e ci: Update Fedora's Docker image
Match the version of Meson we install with the one we require.
2019-07-24 13:08:06 +01:00
Emmanuele Bassi
9fdc27657d ci: Update Debian's Docker image
New stable release of Debian is out, and we need to bump the version of
Meson to match our requirements.
2019-07-24 13:08:06 +01:00
Emmanuele Bassi
00d7568e4f build: Remove unsupported install directives
We're using the `install` argument for configure_file() all over the
place.

The support for an `install` argument for configure_file() was added in
Meson 0.50, but we haven't bumped the minimum version of Meson we
require, yet; which means we're getting compatibility warnings when
using recent versions of Meson, and undefined behaviour when using older
versions.

The configure_file() object defaults to `install: false`, unless an
install directory is used. This means that all instances of an `install`
argument with an explicit `true` or `false` value can be removed,
whereas all instances of `install` with a value determined from a
configuration option must be turned into an explicit conditional.
2019-07-24 12:45:02 +01:00
Simon McVittie
3f1a79a4fa Merge branch 'allow_guid_key_in_dbus_addresses' into 'master'
Allow guid key in dbus addresses

Closes #1018

See merge request GNOME/glib!995
2019-07-23 13:01:09 +00:00
Nirbheek Chauhan
c50304fdc6 Merge branch 'master' into 'master'
Add (out) annotation to (optional) parameters

Closes #1837

See merge request GNOME/glib!999
2019-07-23 12:14:18 +00:00
Дилян Палаузов
74583affe0 Add (out) annotation to (optional) parameters
… as the parameters are not (inout).

Closes #1837
2019-07-23 11:41:42 +00:00
Rafael Fontenelle
8c5a14adf3 Update Brazilian Portuguese translation 2019-07-22 03:28:50 +00:00
Emmanuele Bassi
204c6255e4 Merge branch 'fix_G_DECLARE_DERIVABLE_TYPE_documentation' into 'master'
Fix typo in G_DECLARE_DERIVABLE_TYPE documentation

Closes #1838

See merge request GNOME/glib!1000
2019-07-20 14:38:43 +00:00