[Mesa-dev] [PATCH 4/9] configure.ac: define WL_HIDE_DEPRECATED at global scale
Emil Velikov
emil.l.velikov at gmail.com
Thu Sep 7 18:05:01 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Due to GCC feature described in previous commit, the expected
deprecation warnings may be missing.
Set the WL_HIDE_DEPRECATED macro which will omit the deprecated
functionality, resulting in more distinct build issues.
Patch is UNTESTED, see the open question below.
Cc: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Suggested-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Pekka, I'm not 100% sold that having the macro all together is a good
idea. Consider the following example:
- Project X uses Wayland vY, set as min. requirement.
- Project X sets the 'hide' macro
- In nearly all cases, the check does not guard the upper version.
- Wayland vY+Z, deprecates (and hides) functionality A
- Project X fails to build against Wayland vY+Z
---
configure.ac | 2 +-
src/egl/drivers/dri2/egl_dri2.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index d0d4c0dfd1d..f0368570b12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1713,7 +1713,7 @@ for plat in $platforms; do
if test "x$have_wayland_protocols" = xno; then
AC_MSG_ERROR([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED is needed to compile the wayland platform])
fi
- DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
+ DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED"
;;
x11)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 2667aa5d647..60d5e1ffddf 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -25,8 +25,6 @@
* Kristian Høgsberg <krh at bitplanet.net>
*/
-#define WL_HIDE_DEPRECATED
-
#include <stdbool.h>
#include <stdint.h>
#include <stdbool.h>
--
2.14.1
More information about the mesa-dev
mailing list