[Commits] [SCM] claws branch, master, updated. 4.2.0-48-g1b2a0d791
mones at claws-mail.org
mones at claws-mail.org
Mon Feb 12 19:00:24 UTC 2024
The branch, master has been updated
via 1b2a0d7913847fe0fc680b02dc31bf4e25e5941e (commit)
from 1b0d426f1ef2aed53c34fb56da7191f02303e701 (commit)
Summary of changes:
src/plugins/managesieve/sieve_prefs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 1b2a0d7913847fe0fc680b02dc31bf4e25e5941e
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 9e30b499d..913d308b4 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