Module: xenomai-3
Branch: next
Commit: 277bbb11df96712dd9d23058da2587c47555bc86
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=277bbb11df96712dd9d23058da2587c47555bc86

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Nov 12 10:35:02 2015 +0100

include/boilerplate, lib: do not pull ancillaries.h indirectly

boilerplate/ancillaries.h contains general-purpose macro-definitions
which might conflict with 3rd-party libraries.

Since those definitions are primarily useful to the Xenomai code base,
there is no point in pulling this header in the application namespace
via include/boilerplate/lock.h. Drop this indirect inclusion, and
fixup the client code to include boilerplate/ancillaries.h explicitly
when needed.

---

 include/boilerplate/lock.h |    1 -
 include/trank/trank.h      |    2 ++
 lib/boilerplate/debug.c    |    1 +
 lib/psos/pt.c              |    3 ++-
 lib/psos/queue.c           |    1 +
 lib/psos/rn.c              |    1 +
 lib/psos/sem.c             |    1 +
 lib/vxworks/memPartLib.c   |    1 +
 lib/vxworks/semLib.c       |    1 +
 lib/vxworks/taskInfo.c     |    1 +
 10 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/boilerplate/lock.h b/include/boilerplate/lock.h
index 769364c..c35c9a3 100644
--- a/include/boilerplate/lock.h
+++ b/include/boilerplate/lock.h
@@ -22,7 +22,6 @@
 #include <pthread.h>
 #include <boilerplate/atomic.h>
 #include <boilerplate/wrappers.h>
-#include <boilerplate/ancillaries.h>
 #include <boilerplate/debug.h>
 
 /*
diff --git a/include/trank/trank.h b/include/trank/trank.h
index c6dee16..693c015 100644
--- a/include/trank/trank.h
+++ b/include/trank/trank.h
@@ -20,6 +20,8 @@
 
 #ifdef __XENO_COMPAT__
 
+void warning(const char *fmt, ...);
+
 #define trank_warning(__fmt, __args...)        \
        warning("%s: " __fmt, __func__, ##__args)
 
diff --git a/lib/boilerplate/debug.c b/lib/boilerplate/debug.c
index 54e3cbd..783789e 100644
--- a/lib/boilerplate/debug.c
+++ b/lib/boilerplate/debug.c
@@ -24,6 +24,7 @@
 #include <pthread.h>
 #include <malloc.h>
 #include <errno.h>
+#include "boilerplate/ancillaries.h"
 #include "boilerplate/wrappers.h"
 #include "boilerplate/lock.h"
 #include "boilerplate/debug.h"
diff --git a/lib/psos/pt.c b/lib/psos/pt.c
index afdda32..0fc7d9b 100644
--- a/lib/psos/pt.c
+++ b/lib/psos/pt.c
@@ -21,8 +21,9 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <memory.h>
-#include <copperplate/cluster.h>
+#include <boilerplate/ancillaries.h>
 #include <boilerplate/lock.h>
+#include <copperplate/cluster.h>
 #include <psos/psos.h>
 #include "internal.h"
 #include "pt.h"
diff --git a/lib/psos/queue.c b/lib/psos/queue.c
index 42d0130..325335a 100644
--- a/lib/psos/queue.c
+++ b/lib/psos/queue.c
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <memory.h>
+#include <boilerplate/ancillaries.h>
 #include <copperplate/threadobj.h>
 #include <copperplate/heapobj.h>
 #include <copperplate/clockobj.h>
diff --git a/lib/psos/rn.c b/lib/psos/rn.c
index f87e19e..05e6f5c 100644
--- a/lib/psos/rn.c
+++ b/lib/psos/rn.c
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <memory.h>
+#include <boilerplate/ancillaries.h>
 #include <copperplate/threadobj.h>
 #include <copperplate/clockobj.h>
 #include <psos/psos.h>
diff --git a/lib/psos/sem.c b/lib/psos/sem.c
index 54fa3c5..6f66101 100644
--- a/lib/psos/sem.c
+++ b/lib/psos/sem.c
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
+#include <boilerplate/ancillaries.h>
 #include <copperplate/heapobj.h>
 #include <copperplate/cluster.h>
 #include <copperplate/clockobj.h>
diff --git a/lib/vxworks/memPartLib.c b/lib/vxworks/memPartLib.c
index 09adb13..22d77bd 100644
--- a/lib/vxworks/memPartLib.c
+++ b/lib/vxworks/memPartLib.c
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <memory.h>
 #include <boilerplate/lock.h>
+#include <boilerplate/ancillaries.h>
 #include <copperplate/heapobj.h>
 #include <vxworks/errnoLib.h>
 #include <vxworks/memPartLib.h>
diff --git a/lib/vxworks/semLib.c b/lib/vxworks/semLib.c
index 73397cc..acce160 100644
--- a/lib/vxworks/semLib.c
+++ b/lib/vxworks/semLib.c
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <limits.h>
+#include <boilerplate/ancillaries.h>
 #include <copperplate/heapobj.h>
 #include <vxworks/errnoLib.h>
 #include "reference.h"
diff --git a/lib/vxworks/taskInfo.c b/lib/vxworks/taskInfo.c
index 7989468..ec423d2 100644
--- a/lib/vxworks/taskInfo.c
+++ b/lib/vxworks/taskInfo.c
@@ -18,6 +18,7 @@
 
 #include <pthread.h>
 #include <string.h>
+#include <boilerplate/ancillaries.h>
 #include <copperplate/threadobj.h>
 #include <vxworks/errnoLib.h>
 #include <vxworks/taskInfo.h>


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to