[Mesa-dev] [PATCH v3 5/8] loader: Invert __NOT_HAVE_DRM_H to __HAVE_DRM_H
Kristian Høgsberg
krh at bitplanet.net
Wed Feb 5 02:18:15 CET 2014
Fix up double negations for easier readability.
Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
---
src/loader/Makefile.am | 8 ++++----
src/loader/loader.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/loader/Makefile.am b/src/loader/Makefile.am
index f407c78..1e0a140 100644
--- a/src/loader/Makefile.am
+++ b/src/loader/Makefile.am
@@ -29,15 +29,15 @@ libloader_la_CPPFLAGS = \
$(VISIBILITY_CFLAGS) \
$(LIBUDEV_CFLAGS)
-if !HAVE_LIBDRM
-libloader_la_CPPFLAGS += \
- -D__NOT_HAVE_DRM_H
-else
+if HAVE_LIBDRM
libloader_la_CPPFLAGS += \
$(LIBDRM_CFLAGS)
libloader_la_LIBADD = \
$(LIBDRM_LIBS)
+else
+libloader_la_CPPFLAGS += \
+ -D__HAVE_DRM_H
endif
libloader_la_SOURCES = $(LOADER_C_FILES)
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 7c38f94..319bcf5 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -73,7 +73,7 @@
#endif
#include "loader.h"
-#ifndef __NOT_HAVE_DRM_H
+#ifdef __HAVE_DRM_H
#include <xf86drm.h>
#endif
@@ -120,7 +120,7 @@ fallback_to_kernel_name(int fd)
{
char *driver = NULL;
-#ifndef __NOT_HAVE_DRM_H
+#ifdef __HAVE_DRM_H
/* fallback to drmGetVersion(): */
drmVersionPtr version = drmGetVersion(fd);
@@ -256,7 +256,7 @@ out:
return (*driver != NULL) || (*chip_id >= 0);
}
-#elif defined(ANDROID) && !defined(__NOT_HAVE_DRM_H)
+#elif defined(ANDROID) && defined(__HAVE_DRM_H)
/* for i915 */
#include <i915_drm.h>
--
1.8.4.2
More information about the mesa-dev
mailing list