From 5589e76192376de64fb163c595ccb980b9b49ef5 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Wed, 16 Oct 2024 19:54:28 +0200
Subject: [PATCH] lib-sieve: storage: ldap: sieve-ldap-storage-settings - Use
 modern style setting definitions

---
 .../ldap/sieve-ldap-storage-settings.c        | 54 +++++++++----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/src/lib-sieve/storage/ldap/sieve-ldap-storage-settings.c b/src/lib-sieve/storage/ldap/sieve-ldap-storage-settings.c
index 81cade16e..a61b8c03d 100644
--- a/src/lib-sieve/storage/ldap/sieve-ldap-storage-settings.c
+++ b/src/lib-sieve/storage/ldap/sieve-ldap-storage-settings.c
@@ -19,35 +19,35 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#define DEF_STR(name) DEF_STRUCT_STR(name, sieve_ldap_storage_settings)
-#define DEF_INT(name) DEF_STRUCT_INT(name, sieve_ldap_storage_settings)
-#define DEF_BOOL(name) DEF_STRUCT_BOOL(name, sieve_ldap_storage_settings)
+#undef DEF
+#define DEF(type, name) \
+	DEF_STRUCT_##type(name, sieve_ldap_storage_settings)
 
 static struct setting_def setting_defs[] = {
-	DEF_STR(hosts),
-	DEF_STR(uris),
-	DEF_STR(dn),
-	DEF_STR(dnpass),
-	DEF_BOOL(tls),
-	DEF_BOOL(sasl_bind),
-	DEF_STR(sasl_mech),
-	DEF_STR(sasl_realm),
-	DEF_STR(sasl_authz_id),
-	DEF_STR(tls_ca_cert_file),
-	DEF_STR(tls_ca_cert_dir),
-	DEF_STR(tls_cert_file),
-	DEF_STR(tls_key_file),
-	DEF_STR(tls_cipher_suite),
-	DEF_STR(tls_require_cert),
-	DEF_STR(deref),
-	DEF_STR(scope),
-	DEF_STR(base),
-	DEF_INT(ldap_version),
-	DEF_STR(debug_level),
-	DEF_STR(ldaprc_path),
-	DEF_STR(sieve_ldap_script_attr),
-	DEF_STR(sieve_ldap_mod_attr),
-	DEF_STR(sieve_ldap_filter),
+	DEF(STR, hosts),
+	DEF(STR, uris),
+	DEF(STR, dn),
+	DEF(STR, dnpass),
+	DEF(BOOL, tls),
+	DEF(BOOL, sasl_bind),
+	DEF(STR, sasl_mech),
+	DEF(STR, sasl_realm),
+	DEF(STR, sasl_authz_id),
+	DEF(STR, tls_ca_cert_file),
+	DEF(STR, tls_ca_cert_dir),
+	DEF(STR, tls_cert_file),
+	DEF(STR, tls_key_file),
+	DEF(STR, tls_cipher_suite),
+	DEF(STR, tls_require_cert),
+	DEF(STR, deref),
+	DEF(STR, scope),
+	DEF(STR, base),
+	DEF(INT, ldap_version),
+	DEF(STR, debug_level),
+	DEF(STR, ldaprc_path),
+	DEF(STR, sieve_ldap_script_attr),
+	DEF(STR, sieve_ldap_mod_attr),
+	DEF(STR, sieve_ldap_filter),
 
 	{ 0, NULL, 0 }
 };
-- 
GitLab