]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/dns-domain.c
build-sys: use #if Y instead of #ifdef Y everywhere
[thirdparty/systemd.git] / src / shared / dns-domain.c
index 139d286af8d3b2a8a31aea74e9b2df1fc5ca8af3..9804907304b48f9bfec6ad47c21b5f0bd9c0e92d 100644 (file)
@@ -17,9 +17,9 @@
   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
@@ -301,7 +301,7 @@ int dns_label_escape_new(const char *p, size_t l, char **ret) {
         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;
@@ -1272,7 +1272,7 @@ int dns_name_common_suffix(const char *a, const char *b, const char **ret) {
 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;
 
@@ -1312,7 +1312,7 @@ int dns_name_apply_idna(const char *name, char **ret) {
         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;