diff --git a/meson.build b/meson.build index 9b54bc01..75676b45 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,8 @@ project('irssi', 'c', ############################ ############################ -glib_internal_version = 'glib-2.58.3' # keep this in sync with subprojects/glib.wrap +glib_internal_version = 'glib-2.74.3' # keep this in sync with subprojects/glib.wrap +glib_pcre2_internal_version = 'pcre2-10.40' cc = meson.get_compiler('c') rootinc = include_directories('.') dep = [] @@ -238,7 +239,7 @@ if not glib_dep.found() glib_internal_configure_t = custom_target('glib-internal-configure', command : [ meson_cmd, 'setup', '--prefix=/irssi-glib-internal', '--buildtype=' + get_option('buildtype'), - '-Dlibmount=false', '-Dselinux=false', '-Ddefault_library=static', '-Dinternal_pcre=true', + '-Dlibmount=disabled', '-Dselinux=disabled', '-Ddefault_library=static', '-Dforce_fallback_for=pcre2', glib_internal_configure_args, (meson.current_build_dir() / 'build-subprojects' / 'glib'), (meson.current_source_dir() / 'subprojects' / glib_internal_version) ], @@ -247,6 +248,7 @@ if not glib_dep.found() depends : glib_internal_download_t,) glib_internal_build_t = custom_target('glib-internal-build', command : [ ninja, '-C', meson.current_build_dir() / 'build-subprojects' / 'glib', + 'subprojects' / glib_pcre2_internal_version / 'libpcre2-8.a', 'glib' / 'libglib-2.0.a', 'gmodule' / 'libgmodule-2.0.a'], console : true, @@ -260,7 +262,10 @@ if not glib_dep.found() '-isystem' + (meson.current_source_dir() / 'subprojects' / glib_internal_version), '-isystem' + (meson.current_build_dir() / 'build-subprojects' / 'glib' / 'glib'), ], - link_args : [ meson.current_build_dir() / 'build-subprojects' / 'glib' / 'glib' / 'libglib-2.0.a' ], + link_args : [ + meson.current_build_dir() / 'build-subprojects' / 'glib' / 'subprojects' / glib_pcre2_internal_version / 'libpcre2-8.a', + meson.current_build_dir() / 'build-subprojects' / 'glib' / 'glib' / 'libglib-2.0.a', + ], ) built_src += glib_internal_build_t libdl_dep = [] diff --git a/src/common.h b/src/common.h index e51c24db..96886f6b 100644 --- a/src/common.h +++ b/src/common.h @@ -6,7 +6,7 @@ #define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */ #define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */ -#define IRSSI_ABI_VERSION 50 +#define IRSSI_ABI_VERSION 51 #define DEFAULT_SERVER_ADD_PORT 6667 #define DEFAULT_SERVER_ADD_TLS_PORT 6697 diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index 984b3548..25dc025c 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -57,6 +57,7 @@ static int skip_next_printtext; static char *log_theme_name; static char **autolog_ignore_targets; +static GTimeZone *utc; static char *log_colorizer_strip(const char *str) { @@ -542,7 +543,7 @@ static void log_line(TEXT_DEST_REC *dest, const char *text) char *val; if ((val = g_hash_table_lookup(dest->meta, "time")) != NULL) { GDateTime *time; - if ((time = g_date_time_new_from_iso8601(val, NULL)) != NULL) { + if ((time = g_date_time_new_from_iso8601(val, utc)) != NULL) { t = g_date_time_to_unix(time); g_date_time_unref(time); } @@ -744,6 +745,7 @@ void fe_log_init(void) { autoremove_tag = g_timeout_add(60000, (GSourceFunc) sig_autoremove, NULL); skip_next_printtext = FALSE; + utc = g_time_zone_new_utc(); settings_add_bool("log", "awaylog_colors", TRUE); settings_add_bool("log", "autolog", FALSE); @@ -811,6 +813,7 @@ void fe_log_deinit(void) if (autolog_ignore_targets != NULL) g_strfreev(autolog_ignore_targets); + g_time_zone_unref(utc); g_free_not_null(autolog_path); g_free_not_null(log_theme_name); } diff --git a/src/fe-text/textbuffer-formats.c b/src/fe-text/textbuffer-formats.c index 50d6250a..1de8c120 100644 --- a/src/fe-text/textbuffer-formats.c +++ b/src/fe-text/textbuffer-formats.c @@ -18,6 +18,7 @@ TEXT_BUFFER_REC *color_buf; gboolean scrollback_format; gboolean show_server_time; int signal_gui_render_line_text; +GTimeZone *utc; static void collector_free(GSList **collector) { @@ -125,7 +126,7 @@ static LINE_INFO_META_REC *line_meta_create(GHashTable *meta_hash) while (g_hash_table_iter_next(&iter, (gpointer *) &key, (gpointer *) &val)) { if (g_strcmp0("time", key) == 0) { GDateTime *time; - if ((time = g_date_time_new_from_iso8601(val, NULL)) != NULL) { + if ((time = g_date_time_new_from_iso8601(val, utc)) != NULL) { meta->server_time = g_date_time_to_unix(time); g_date_time_unref(time); } @@ -446,6 +447,7 @@ static void read_settings(void) void textbuffer_formats_init(void) { signal_gui_render_line_text = signal_get_uniq_id("gui render line text"); + utc = g_time_zone_new_utc(); settings_add_bool("lookandfeel", "scrollback_format", TRUE); settings_add_bool("lookandfeel", "show_server_time", FALSE); @@ -463,4 +465,6 @@ void textbuffer_formats_deinit(void) signal_remove("print format", (SIGNAL_FUNC) sig_print_format); signal_remove("print noformat", (SIGNAL_FUNC) sig_print_noformat); signal_remove("gui print text finished", (SIGNAL_FUNC) sig_gui_print_text_finished); + + g_time_zone_unref(utc); } diff --git a/src/lib-config/iconfig.h b/src/lib-config/iconfig.h index 92662d8d..bb1e7f47 100644 --- a/src/lib-config/iconfig.h +++ b/src/lib-config/iconfig.h @@ -62,6 +62,8 @@ struct _CONFIG_REC { GIOChannel *handle; int tmp_indent_level; /* indentation position */ int tmp_last_lf; /* last character was a line feed */ + + int list_of_lists : 1; /* list of lists allowed */ }; /* Open configuration. The file is created if it doesn't exist, unless diff --git a/src/lib-config/parse.c b/src/lib-config/parse.c index e4ff1abb..91a78781 100644 --- a/src/lib-config/parse.c +++ b/src/lib-config/parse.c @@ -170,8 +170,10 @@ static GTokenType config_parse_symbol(CONFIG_REC *rec, CONFIG_NODE *node) case '{': /* block */ - if (key == NULL && node->type != NODE_TYPE_LIST) + if (key == NULL && node->type != NODE_TYPE_LIST) { + g_scanner_error(rec->scanner, "Missing key"); return G_TOKEN_ERROR; + } newnode = config_node_section(rec, node, key, NODE_TYPE_BLOCK); config_parse_loop(rec, newnode, (GTokenType) '}'); @@ -186,8 +188,11 @@ static GTokenType config_parse_symbol(CONFIG_REC *rec, CONFIG_NODE *node) case '(': /* list */ - if (key == NULL) + if (key == NULL && !rec->list_of_lists) { + g_scanner_error(rec->scanner, "List of lists not allowed"); return G_TOKEN_ERROR; + } + newnode = config_node_section(rec, node, key, NODE_TYPE_LIST); config_parse_loop(rec, newnode, (GTokenType) ')'); g_free_not_null(key); diff --git a/subprojects/glib.wrap b/subprojects/glib.wrap index 5cb40b0e..5e50e9a5 100644 --- a/subprojects/glib.wrap +++ b/subprojects/glib.wrap @@ -1,6 +1,6 @@ [wrap-file] # make sure to update the glib_internal_version in meson.build -directory = glib-2.58.3 -source_url = https://download.gnome.org/sources/glib/2.58/glib-2.58.3.tar.xz -source_filename = glib-2.58.3.tar.xz -source_hash = 8f43c31767e88a25da72b52a40f3301fefc49a665b56dc10ee7cc9565cbe7481 +directory = glib-2.74.3 +source_url = https://download.gnome.org/sources/glib/2.74/glib-2.74.3.tar.xz +source_filename = glib-2.74.3.tar.xz +source_hash = e9bc41ecd9690d9bc6a970cc7380119b828e5b6a4b16c393c638b3dc2b87cbcb