[Mesa-dev] [PATCH mesa 7/8] eglapi: make sure list is always sorted
Eric Engestrom
eric at engestrom.ch
Sun Feb 19 23:23:19 UTC 2017
Starting with the next commit, badly sorting this list will break the
eglGetProcAddress().
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
src/egl/Makefile.am | 3 ++-
src/egl/egl-entrypoint-check | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
create mode 100755 src/egl/egl-entrypoint-check
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index bd8903f666..6c0548d856 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -126,7 +126,8 @@ egl_HEADERS = \
$(top_srcdir)/include/EGL/eglmesaext.h \
$(top_srcdir)/include/EGL/eglplatform.h
-TESTS = egl-symbols-check
+TESTS = egl-symbols-check \
+ egl-entrypoint-check
EXTRA_DIST = \
egl-symbols-check \
diff --git a/src/egl/egl-entrypoint-check b/src/egl/egl-entrypoint-check
new file mode 100755
index 0000000000..d3757aae3c
--- /dev/null
+++ b/src/egl/egl-entrypoint-check
@@ -0,0 +1,4 @@
+#!/bin/bash
+entrypoints=$(grep EGL_ENTRYPOINT "$srcdir"/main/eglentrypoint.def)
+sorted=$(sort <<< "$entrypoints")
+test "$entrypoints" = "$sorted"
--
Cheers,
Eric
More information about the mesa-dev
mailing list