xf86-video-intel: 2 commits - configure.ac libobj/alloca.c src/backlight.c src/intel_device.c src/sna/sna_display.c tools/backlight_helper.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Mar 25 07:22:58 PDT 2015
configure.ac | 4 +++-
libobj/alloca.c | 4 ++++
src/backlight.c | 6 ++++++
src/intel_device.c | 6 ++++++
src/sna/sna_display.c | 9 +++++++++
tools/backlight_helper.c | 6 ++++++
6 files changed, 34 insertions(+), 1 deletion(-)
New commits:
commit 8f11f2bdcdc7d84b11134c9e7d15df888f2b6f3c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Mar 25 13:16:56 2015 +0000
Use AC_FUNC_ALLOC
The preferred all-inclusive method for finding alloca().
Reported-by: Richard Palo <richard at netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89762
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/configure.ac b/configure.ac
index 9aadd02..6d5fe44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,7 +416,8 @@ AC_ARG_ENABLE(sna,
[SNA="$enableval"],
[SNA=auto])
-AC_CHECK_HEADERS([dev/wscons/wsconsio.h alloca.h])
+AC_CHECK_HEADERS([dev/wscons/wsconsio.h])
+AC_FUNC_ALLOCA
AC_HEADER_MAJOR
if test "x$SNA" != "xno"; then
diff --git a/libobj/alloca.c b/libobj/alloca.c
new file mode 100644
index 0000000..883e1e9
--- /dev/null
+++ b/libobj/alloca.c
@@ -0,0 +1,4 @@
+void *alloca(size_t sz)
+{
+ return NULL;
+}
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index cee4a72..d9b9923 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -42,6 +42,15 @@
#if HAVE_ALLOCA_H
#include <alloca.h>
+#elif defined __GNUC__
+#define alloca __builtin_alloca
+#elif defined _AIX
+#define alloca __alloca
+#elif defined _MSC_VER
+#include <malloc.h>
+#define alloca _alloca
+#else
+void *alloca(size_t);
#endif
#include "sna.h"
commit aa40f990142eb165ee7f60f08e9616bc5bebdebe
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Mar 25 13:16:56 2015 +0000
Use AC_HEADER_MAJOR to find how to include major()
We need to include <sys/mkdev.h> on Solaris.
Reported-by: Richard Palo <richard at netbsd.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89763
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/configure.ac b/configure.ac
index 1bb64fc..9aadd02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,6 +417,7 @@ AC_ARG_ENABLE(sna,
[SNA=auto])
AC_CHECK_HEADERS([dev/wscons/wsconsio.h alloca.h])
+AC_HEADER_MAJOR
if test "x$SNA" != "xno"; then
AC_DEFINE(USE_SNA, 1, [Enable SNA support])
diff --git a/src/backlight.c b/src/backlight.c
index 5d63b2c..84d8f76 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -34,6 +34,12 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/intel_device.c b/src/intel_device.c
index 76b0831..f1a6887 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -38,6 +38,12 @@
#include <dirent.h>
#include <errno.h>
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#include <pciaccess.h>
#include <xorg-server.h>
diff --git a/tools/backlight_helper.c b/tools/backlight_helper.c
index 8b2667d..a00f0d6 100644
--- a/tools/backlight_helper.c
+++ b/tools/backlight_helper.c
@@ -9,6 +9,12 @@
#include <sys/types.h>
#include <sys/stat.h>
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#define DBG 0
#if defined(__GNUC__) && (__GNUC__ > 3)
More information about the xorg-commit
mailing list