diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2020-09-01 13:27:44 +0200 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2020-09-02 10:28:10 +0200 |
commit | 95b9db4ee27d6c58f868eb720a944c7f77da6e68 (patch) | |
tree | c6f45d1072f1b6dad63c3ef7e46c731e943b2732 /src/internal.h | |
parent | 59d896ced13ae4f42587ee9204936d6f35682f2f (diff) | |
download | libvirt-95b9db4ee27d6c58f868eb720a944c7f77da6e68.tar.gz |
lib: Prefer WITH_* prefix for #if conditionals
Currently, we are mixing: #if HAVE_BLAH with #if WITH_BLAH.
Things got way better with Pavel's work on meson, but apparently,
mixing these two lead to confusing and easy to miss bugs (see
31fb929eca for instance). While we were forced to use HAVE_
prefix with autotools, we are free to chose our own prefix with
meson and since WITH_ prefix appears to be more popular let's use
it everywhere.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'src/internal.h')
-rw-r--r-- | src/internal.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/internal.h b/src/internal.h index 1a5ad2bfef..d167e56b48 100644 --- a/src/internal.h +++ b/src/internal.h @@ -49,13 +49,13 @@ /* The library itself needs to know enum sizes. */ #define VIR_ENUM_SENTINELS -#ifdef HAVE_LIBINTL_H +#ifdef WITH_LIBINTL_H # define DEFAULT_TEXT_DOMAIN PACKAGE # include <libintl.h> # define _(str) dgettext(PACKAGE, str) -#else /* HAVE_LIBINTL_H */ +#else /* WITH_LIBINTL_H */ # define _(str) str -#endif /* HAVE_LIBINTL_H */ +#endif /* WITH_LIBINTL_H */ #define N_(str) str #include "libvirt/libvirt.h" @@ -165,7 +165,7 @@ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wpointer-sign\"") -#if HAVE_SUGGEST_ATTRIBUTE_FORMAT +#if WITH_SUGGEST_ATTRIBUTE_FORMAT # define VIR_WARNINGS_NO_PRINTF \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"") |