[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-47-g3753984c5

mones at claws-mail.org mones at claws-mail.org
Mon Feb 12 19:00:23 UTC 2024


The branch, gtk2 has been updated
       via  3753984c5702aa6985629598e7c1f8b5df18bebf (commit)
      from  0d5ae5b82c9497763b46e82e23c5a6027b0fa422 (commit)

Summary of changes:
 src/plugins/managesieve/sieve_prefs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 3753984c5702aa6985629598e7c1f8b5df18bebf
Author: Olaf Hering <olaf at aepfle.de>
Date:   Mon Feb 12 19:59:46 2024 +0100

    Handle more systems which lack support for the scanf m modifier
    
    The 'm' modifier for scanf is an extension to ISO C. It was mentioned in
    POSIX 1003.1 2008 (Issue 7). It is difficult to detect at compile time
    if a libc has implemented support for this modifier. Extend the existing
    list of systems which lack support for it with NetBSD and Dragonfly BSD.
    
    Signed-off-by: Olaf Hering <olaf at aepfle.de>

diff --git a/src/plugins/managesieve/sieve_prefs.c b/src/plugins/managesieve/sieve_prefs.c
index 901472e67..1082abbc6 100644
--- a/src/plugins/managesieve/sieve_prefs.c
+++ b/src/plugins/managesieve/sieve_prefs.c
@@ -477,8 +477,8 @@ struct SieveAccountConfig *sieve_prefs_account_get_config(
 	guchar tls_type, auth, auth_type;
 	gsize len;
 	gint num;
-#if defined(G_OS_WIN32) || defined(__OpenBSD__) || defined(__FreeBSD__)
-	/* Non-GNU sscanf() does not understand the %ms format, so we
+#if defined(G_OS_WIN32) || defined(__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
+	/* Some libc variants lack support for the ISO C extension %ms, so we
 	 * have to do the allocation of target buffer ourselves before
 	 * calling sscanf(), and copy the host string to config->host.
 	 */
@@ -503,13 +503,13 @@ struct SieveAccountConfig *sieve_prefs_account_get_config(
 
 	enc_userid[0] = '\0';
 	enc_passwd[0] = '\0';
-#if defined(G_OS_WIN32) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(G_OS_WIN32) || defined(__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
 	if ((num = sscanf(confstr, "%c%c %255s %c%hu %hhu %hhu %hhu %255s %255s",
 #else
 	if ((num = sscanf(confstr, "%c%c %ms %c%hu %hhu %hhu %hhu %255s %255s",
 #endif
 			&enable, &use_host,
-#if defined(G_OS_WIN32) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(G_OS_WIN32) || defined(__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
 			tmphost,
 #else
 			&config->host,
@@ -539,7 +539,7 @@ struct SieveAccountConfig *sieve_prefs_account_get_config(
 	config->auth = auth;
 	config->auth_type = auth_type;
 
-#if defined(G_OS_WIN32) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(G_OS_WIN32) || defined(__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__FreeBSD__)
 	config->host = g_strndup(tmphost, 255);
 #endif
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list