Module: xenomai-forge
Branch: next
Commit: 7b30ed64fed09a528d7ed50135d072d82e4ed758
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7b30ed64fed09a528d7ed50135d072d82e4ed758

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Feb  4 19:23:43 2014 +0100

include: Replace typeof with __typeof__ in publicly accessible headers

Avoids clashes when compiling application in strict standard mode.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/boilerplate/compiler.h  |    2 +-
 include/boilerplate/scope.h     |    2 +-
 include/cobalt/wrappers.h       |    5 ++++-
 include/copperplate/reference.h |    2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h
index 6f2c809..e3fe413 100644
--- a/include/boilerplate/compiler.h
+++ b/include/boilerplate/compiler.h
@@ -22,7 +22,7 @@
 
 #define container_of(ptr, type, member)                                        
\
        ({                                                              \
-               const typeof(((type *)0)->member) *__mptr = (ptr);      \
+               const __typeof__(((type *)0)->member) *__mptr = (ptr);  \
                (type *)((char *)__mptr - offsetof(type, member));      \
        })
 
diff --git a/include/boilerplate/scope.h b/include/boilerplate/scope.h
index 2bdc747..9e551ae 100644
--- a/include/boilerplate/scope.h
+++ b/include/boilerplate/scope.h
@@ -47,7 +47,7 @@ int pshared_check(void *heap, void *addr);
 
 #define __main_heap    NULL
 
-#define dref_type(t)           typeof(t)
+#define dref_type(t)           __typeof__(t)
 #define __memoff(base, addr)   (addr)
 #define __memptr(base, off)    (off)
 #define __memchk(base, addr)   1
diff --git a/include/cobalt/wrappers.h b/include/cobalt/wrappers.h
index e0f7a63..aab50e6 100644
--- a/include/cobalt/wrappers.h
+++ b/include/cobalt/wrappers.h
@@ -25,7 +25,10 @@
 #define __STD(call)            __real_ ## call
 #define __COBALT(call)         __cobalt_ ## call
 #define __RT(call)             __COBALT(call)
-#define COBALT_DECL(T, P)      typeof(T) __RT(P); typeof(T) __STD(P); 
typeof(T) __WRAP(P)
+#define COBALT_DECL(T, P)      \
+       __typeof__(T) __RT(P);  \
+       __typeof__(T) __STD(P); \
+       __typeof__(T) __WRAP(P)
 
 /*
  * 
diff --git a/include/copperplate/reference.h b/include/copperplate/reference.h
index 484eae6..37bdadc 100644
--- a/include/copperplate/reference.h
+++ b/include/copperplate/reference.h
@@ -87,7 +87,7 @@ int __fnref_register(const char *libname,
 
 #else /* !CONFIG_XENO_PSHARED */
 
-#define fnref_type(t)          typeof(t)
+#define fnref_type(t)          __typeof__(t)
 #define fnref_null             NULL
 #define fnref_put(l, s)                (s)
 #define fnref_get(v, r)                ((v) = (r))


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

Reply via email to