|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: stop trying to use the system <stdarg.h> and <stdbool.h>
commit 0873829a70daa3c23d03b9841ccd529f05889f21
Author: Tim Deegan <tim@xxxxxxx>
AuthorDate: Thu Feb 13 12:13:58 2014 +0000
Commit: Tim Deegan <tim@xxxxxxx>
CommitDate: Thu Feb 13 13:50:37 2014 +0000
xen: stop trying to use the system <stdarg.h> and <stdbool.h>
We already have our own versions of the stdarg/stdbool definitions, for
systems where those headers are installed in /usr/include.
On linux, they're typically installed in compiler-specific paths, but
finding them has proved unreliable. Drop that and use our own versions
everywhere.
Signed-off-by: Tim Deegan <tim@xxxxxxx>
Tested-by: Julien Grall <julien.grall@xxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---
xen/Rules.mk | 5 +----
xen/include/xen/stdarg.h | 30 ++++++++++++++----------------
xen/include/xen/stdbool.h | 12 ++++--------
3 files changed, 19 insertions(+), 28 deletions(-)
diff --git a/xen/Rules.mk b/xen/Rules.mk
index df1428f..3a6cec5 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -44,10 +44,7 @@ ALL_OBJS-$(x86) += $(BASEDIR)/crypto/built_in.o
CFLAGS += -fno-builtin -fno-common
CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
-# Solaris puts stdarg.h &c in the system include directory.
-ifneq ($(XEN_OS),SunOS)
-CFLAGS += -nostdinc -iwithprefix include
-endif
+CFLAGS += -nostdinc
CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE
CFLAGS-$(FLASK_ENABLE) += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h
index d1b2540..0283f06 100644
--- a/xen/include/xen/stdarg.h
+++ b/xen/include/xen/stdarg.h
@@ -1,23 +1,21 @@
#ifndef __XEN_STDARG_H__
#define __XEN_STDARG_H__
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
- typedef __builtin_va_list va_list;
-# ifdef __GNUC__
-# define __GNUC_PREREQ__(x, y) \
- ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
- (__GNUC__ > (x)))
-# else
-# define __GNUC_PREREQ__(x, y) 0
-# endif
-# if !__GNUC_PREREQ__(4, 5)
-# define __builtin_va_start(ap, last) __builtin_stdarg_start((ap),
(last))
-# endif
-# define va_start(ap, last) __builtin_va_start((ap), (last))
-# define va_end(ap) __builtin_va_end(ap)
-# define va_arg __builtin_va_arg
+#ifdef __GNUC__
+# define __GNUC_PREREQ__(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
+ (__GNUC__ > (x)))
#else
-# include <stdarg.h>
+# define __GNUC_PREREQ__(x, y) 0
#endif
+#if !__GNUC_PREREQ__(4, 5)
+# define __builtin_va_start(ap, last) __builtin_stdarg_start((ap), (last))
+#endif
+
+typedef __builtin_va_list va_list;
+#define va_start(ap, last) __builtin_va_start((ap), (last))
+#define va_end(ap) __builtin_va_end(ap)
+#define va_arg __builtin_va_arg
+
#endif /* __XEN_STDARG_H__ */
diff --git a/xen/include/xen/stdbool.h b/xen/include/xen/stdbool.h
index f0faedf..b0947a6 100644
--- a/xen/include/xen/stdbool.h
+++ b/xen/include/xen/stdbool.h
@@ -1,13 +1,9 @@
#ifndef __XEN_STDBOOL_H__
#define __XEN_STDBOOL_H__
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
-# define bool _Bool
-# define true 1
-# define false 0
-# define __bool_true_false_are_defined 1
-#else
-# include <stdbool.h>
-#endif
+#define bool _Bool
+#define true 1
+#define false 0
+#define __bool_true_false_are_defined 1
#endif /* __XEN_STDBOOL_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |