along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#if defined(HAVE_LIBIDN2)
+#if HAVE_LIBIDN2
# include <idn2.h>
-#elif defined(HAVE_LIBIDN)
+#elif HAVE_LIBIDN
# include <idna.h>
# include <stringprep.h>
#endif
return r;
}
-#ifdef HAVE_LIBIDN
+#if HAVE_LIBIDN
int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max) {
_cleanup_free_ uint32_t *input = NULL;
size_t input_size, l;
int dns_name_apply_idna(const char *name, char **ret) {
/* Return negative on error, 0 if not implemented, positive on success. */
-#if defined(HAVE_LIBIDN2)
+#if HAVE_LIBIDN2
int r;
_cleanup_free_ char *t = NULL;
if (IN_SET(r, IDN2_TOO_BIG_DOMAIN, IDN2_TOO_BIG_LABEL))
return -ENOSPC;
return -EINVAL;
-#elif defined(HAVE_LIBIDN)
+#elif HAVE_LIBIDN
_cleanup_free_ char *buf = NULL;
size_t n = 0, allocated = 0;
bool first = true;