summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@intel.com>2018-11-07 15:00:24 +0000
committerEric Engestrom <eric@engestrom.ch>2020-01-23 17:00:12 +0000
commit074947ee4be95f9b88558ab052e46cb0653a8a8f (patch)
treeafc56e1dc721b788b1c427457ddc8dd39e286b9a /tests
parent077e64292cd08bcd84d78b0d5e33bb0fc0cd4078 (diff)
downloadlibdrm-074947ee4be95f9b88558ab052e46cb0653a8a8f.tar.gz
libdrm-074947ee4be95f9b88558ab052e46cb0653a8a8f.tar.bz2
libdrm-074947ee4be95f9b88558ab052e46cb0653a8a8f.zip
meson: always define whether headers exist
Combined with -Wundef (added in 75758d2ccf & enforced in ba17673eed), this provides absolute safety against #ifdef typos. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/amdgpu/basic_tests.c2
-rw-r--r--tests/amdgpu/deadlock_tests.c2
-rw-r--r--tests/kms/kms-steal-crtc.c2
-rw-r--r--tests/kms/kms-universal-planes.c2
-rw-r--r--tests/modetest/modetest.c2
-rw-r--r--tests/vbltest/vbltest.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index f5caf8d5..57496c82 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -30,7 +30,7 @@
#endif
#include <sys/stat.h>
#include <fcntl.h>
-#ifdef HAVE_ALLOCA_H
+#if HAVE_ALLOCA_H
# include <alloca.h>
#endif
#include <sys/wait.h>
diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c
index d6eb35b1..a18d578f 100644
--- a/tests/amdgpu/deadlock_tests.c
+++ b/tests/amdgpu/deadlock_tests.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#ifdef HAVE_ALLOCA_H
+#if HAVE_ALLOCA_H
# include <alloca.h>
#endif
diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c
index cd40758d..4d884c07 100644
--- a/tests/kms/kms-steal-crtc.c
+++ b/tests/kms/kms-steal-crtc.c
@@ -28,7 +28,7 @@
#include <stdint.h>
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c
index 2163c987..1d793880 100644
--- a/tests/kms/kms-universal-planes.c
+++ b/tests/kms/kms-universal-planes.c
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 09fd5651..b907ab36 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -51,7 +51,7 @@
#include <errno.h>
#include <poll.h>
#include <sys/time.h>
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <math.h>
diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c
index 48708d20..1c2b519e 100644
--- a/tests/vbltest/vbltest.c
+++ b/tests/vbltest/vbltest.c
@@ -33,7 +33,7 @@
#include <errno.h>
#include <poll.h>
#include <sys/time.h>
-#ifdef HAVE_SYS_SELECT_H
+#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif