commit e4623800aa50a48f4885579fd7847ce48ca0a72a Author: Matthias Clasen Date: Wed Jul 20 20:52:48 2016 -0400 2.49.4 NEWS | 17 +++++++++++++++++ configure.ac | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) commit 849599671c4ace72a1f8796989c484b751d1a622 Author: Matthias Clasen Date: Wed Jul 20 20:38:46 2016 -0400 Update structured logging docs a bit Remove references to removed macros, add some more links to standard journal fields. glib/gmessages.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 4643cadc17f5e0c96719071fea16eb3ec8d887be Author: Matthias Clasen Date: Wed Jul 20 19:44:02 2016 -0400 Add structured logging to the docs docs/reference/glib/glib-sections.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 65540860705f747586369757b9cfb790428a7baf Author: Matthias Clasen Date: Wed Jul 20 19:42:52 2016 -0400 Make gtk-doc handle GLogField gtk-doc can't deal with typedef struct {...} GLogField, it seems. glib/gmessages.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f5a8dfb6afe786eb2a1088ea8cc590fd189ee218 Author: Matthias Clasen Date: Wed Jul 20 19:27:17 2016 -0400 Improve journal detection We can use getpeername() and check if we have a socket that is in /run/systemd/journal/. glib/gmessages.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 3892034455a65a02b8a307bcb9b0a1de93be934f Author: Matthias Clasen Date: Wed Jul 20 18:42:19 2016 -0400 Add more tests for g_log_structured glib/tests/logging.c | 137 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 3 deletions(-) commit bdcf9e8b4efb16ee6d00dc0ce04349cd01a5f0e4 Author: Matthias Clasen Date: Wed Jul 20 18:36:52 2016 -0400 Redo structured logging API It turns out that the current approach of parsing g_log_structured varargs is unworkable, because vprintf is not guaranteed to advance the passed-in va_list. So, we have to reshuffle the argument list a bit; I've come up with this approach: g_log_structured (domain, level, key-value pairs... "MESSAGE", format, printf arguments); This requires a "MESSAGE" key to always be present, and it requires the "MESSAGE"-format pair to be last, but it avoids an extra NULL as marker after the key-value pairs. And it can be parsed with a single pass over the va_list, without any va_copy. Since we have G_LOG_USE_STRUCTURED, the separate ...structured() convenience macros are pretty pointless, and I have dropped them for now. glib/gmessages.c | 111 +++++++++++++++++---------------- glib/gmessages.h | 186 +++++++------------------------------------------------ 2 files changed, 80 insertions(+), 217 deletions(-) commit fec01b630aecd8ea7738667405f2165a2efaa276 Author: Matthias Clasen Date: Wed Jul 20 17:07:40 2016 -0400 Use g_log_structured_array in g_logv We already formatted the message; there is no need to go through the printf machinery a second time. glib/gmessages.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 0d0ba82cecfdae5e006ee8c205abd2f4a9bf34ea Author: Matthias Clasen Date: Sun Jul 17 23:22:31 2016 -0400 Allow using g_log_structured instead of g_log Look for a macro G_LOG_USE_STRUCTURED, and if it is defined, use g_log_structured instead of g_log when defining g_warning and friends. This avoids the extra complication of going through g_logv _and_ g_log_structured to get a message logged; it also lets us pass the code-related fields. We don't do this unconditionally (yet), since some users might rely on the more fine-grained fatality support in g_logv. It has also been proven problematic in the past to inject a dependency on bleeding-edge API via a widely-used macro. https://bugzilla.gnome.org/show_bug.cgi?id=744456 glib/gmessages.h | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 2 deletions(-) commit db0bf5bbf174c80f84320d315c94282de592cbea Author: Matthias Clasen Date: Wed Jul 20 17:06:18 2016 -0400 proxy resolver portal: Fix the async api gio/gproxyresolverportal.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 5cede43df64501d42f626dd6749f45e418e8e152 Author: Emilio Pozuelo Monfort Date: Mon Jul 18 23:51:26 2016 +0200 Ship gio.xml in tarballs Fixes the documentation build. https://bugzilla.gnome.org/show_bug.cgi?id=768936 docs/reference/gio/Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 6de5595570a68e21ba83c60fbb889c07951200ab Author: Dan Winship Date: Tue Jul 19 17:22:07 2016 -0400 Fix gio/tests/socket-listener g_socket_listener_add_address() is synchronous; all of the events will have been emitted before it returns and it doesn't queue any sources. The test was unintentionally depending on the fact that g_main_context_iterate(NULL, TRUE) would return anyway (at least the first time it was called), but that's no longer true after e4ee307. https://bugzilla.gnome.org/show_bug.cgi?id=768968 gio/tests/socket-listener.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7e40228cae0d33ce6e031d05ecab69a8262ce8d1 Author: Emmanuele Bassi Date: Tue Jul 19 14:18:49 2016 +0100 Update the ignore file for GIO gio/.gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c67bd6cc541105ddc811dabb689d1e5bbdf5ae2e Author: Rico Tzschichholz Date: Tue Jul 19 11:34:54 2016 +0200 gmessages: Fix G_GNUC_PRINTF mark for g_log_structured GCC fails to build because of the trailing arguments, not part of the format: ../../glib/gmessages.c: In function 'g_log_default_handler': ../../glib/gmessages.c:2385:21: error: too many arguments for format [-Werror=format-extra-args] NULL); ^ The documentation for `__attribute__((format(...)))` in GCC https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes States that the second index must be 0 for functions that are not available to be checked, like for vprintf-style functions. In this case it's also appropriate because of the trailing arguments. The sd-journal API in systemd, upon which the structured logging API is modelled, also uses 0 as the second argument for the format attribute. https://bugzilla.gnome.org/show_bug.cgi?id=744456 glib/gmessages.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07932996fa68fe11acd287bd0b3e7a7456b50ab5 Author: Ting-Wei Lan Date: Tue Jul 19 01:51:55 2016 +0800 gmessages: Add G_GNUC_PRINTF mark for g_log_structured It is required to avoid non-literal format string warning when using clang. https://bugzilla.gnome.org/show_bug.cgi?id=744456 glib/gmessages.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0346254502314f1d420ee9333db0542d7a19583a Author: Daniel Mustieles Date: Mon Jul 18 16:45:41 2016 +0200 Updated Spanish translation po/es.po | 403 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 193 insertions(+), 210 deletions(-) commit 97972471ca232a11fae4ed025fbbce3b821f1bec Author: Chun-wei Fan Date: Mon Jul 18 14:41:17 2016 +0800 gio/glocalfile.c: Windows: Define ECANCELED if not already defined Older Visual Studio may not have it defined, so define it like what is defined for Visual Studio 2010 and later. gio/glocalfile.c | 4 ++++ 1 file changed, 4 insertions(+) commit c08b1a6ae561e58149c1c1d9fe17eaf8e7270452 Author: Chun-wei Fan Date: Mon Jul 18 14:25:52 2016 +0800 glib/gmessages.c: Use G_VA_COPY() instead of va_copy() Some compilers may not support va_copy(), so use the G_VA_COPY macro so that things can be supported properly on all supported compilers. glib/gmessages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6aee1bf15795d0ae4367d6230424f977e1eade0 Author: Chun-wei Fan Date: Mon Jul 4 12:43:36 2016 +0800 Visual Studio builds: Build the gio tool https://bugzilla.gnome.org/show_bug.cgi?id=768357 build/win32/vs10/Makefile.am | 4 + build/win32/vs10/gio-tool.vcxproj.filtersin | 12 ++ build/win32/vs10/gio-tool.vcxprojin | 188 ++++++++++++++++++++++++++++ build/win32/vs10/glib-install.propsin | 2 + build/win32/vs10/glib-install.vcxproj | 4 + build/win32/vs10/glib.sln | 54 +++++--- build/win32/vs11/Makefile.am | 2 + build/win32/vs12/Makefile.am | 2 + build/win32/vs14/Makefile.am | 2 + build/win32/vs9/Makefile.am | 2 + build/win32/vs9/gio-tool.vcprojin | 173 +++++++++++++++++++++++++ build/win32/vs9/glib-install.vspropsin | 2 + build/win32/vs9/glib.sln | 24 ++++ gio/Makefile.am | 14 ++- 14 files changed, 462 insertions(+), 23 deletions(-)