# HG changeset patch # User Markus Mützel # Date 1618217510 -7200 # Node ID ac2d180a1a476835acfc766453b6d1e6b854b2b5 # Parent 055dec6c319baa964f2c7227ee5e476535f45dec glib: Update to version 2.54.0 * src/glib.mk: Update version and checksum. * src/glib-1-fixes.patch: Rebase changes that didn't apply any more. diff -r 055dec6c319b -r ac2d180a1a47 src/glib-1-fixes.patch --- a/src/glib-1-fixes.patch Sun Apr 11 12:39:19 2021 +0200 +++ b/src/glib-1-fixes.patch Mon Apr 12 10:51:50 2021 +0200 @@ -179,32 +179,32 @@ index 1111111..2222222 100644 --- a/glib/gmain.c +++ b/glib/gmain.c -@@ -2657,12 +2657,15 @@ g_get_real_time (void) - #if defined (G_OS_WIN32) - static ULONGLONG (*g_GetTickCount64) (void) = NULL; - static guint32 g_win32_tick_epoch = 0; +@@ -2688,12 +2688,15 @@ g_get_real_time (void) + * So for now we calculate (usec_per_sec / ticks_per_sec) and use floating point + */ + static gdouble g_monotonic_usec_per_tick = 0; +static gboolean g_win32_clock_is_initialized; void g_clock_win32_init (void) { - HMODULE kernel32; + LARGE_INTEGER freq; + g_win32_clock_is_initialized = TRUE; + - g_GetTickCount64 = NULL; - kernel32 = GetModuleHandle ("KERNEL32.DLL"); - if (kernel32 != NULL) -@@ -2721,6 +2724,9 @@ g_get_monotonic_time (void) - * timeBeginPeriod() to increase it as much as they want - */ - + if (!QueryPerformanceFrequency (&freq) || freq.QuadPart == 0) + { + /* The documentation says that this should never happen */ +@@ -2707,6 +2709,9 @@ g_get_monotonic_time (void) + gint64 + g_get_monotonic_time (void) + { + if (!g_win32_clock_is_initialized) + g_clock_win32_init (); + - if (g_GetTickCount64 != NULL) + if (G_LIKELY (g_monotonic_usec_per_tick != 0)) { - guint32 ticks_as_32bit; + LARGE_INTEGER ticks; diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c index 1111111..2222222 100644 --- a/glib/gthread-win32.c diff -r 055dec6c319b -r ac2d180a1a47 src/glib.mk --- a/src/glib.mk Sun Apr 11 12:39:19 2021 +0200 +++ b/src/glib.mk Mon Apr 12 10:51:50 2021 +0200 @@ -3,8 +3,8 @@ PKG := glib $(PKG)_IGNORE := -$(PKG)_VERSION := 2.51.5 -$(PKG)_CHECKSUM := 3c991cc0858440efc69db8e97bf90547ccc80a63 +$(PKG)_VERSION := 2.54.0 +$(PKG)_CHECKSUM := 96b434a9ca142344b93f38ed0cd88d36196b68ae $(PKG)_SUBDIR := glib-$($(PKG)_VERSION) $(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)