Module: xenomai-2.6
Branch: master
Commit: 5cd75fb900636db41b61864e2ecfc06530884a14
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=5cd75fb900636db41b61864e2ecfc06530884a14

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Apr 28 00:55:26 2013 +0200

posix: allow headers compilation with GCC pedantic flag

---

 include/posix/errno.h      |    1 +
 include/posix/fcntl.h      |    1 +
 include/posix/mqueue.h     |    1 +
 include/posix/pthread.h    |    1 +
 include/posix/sched.h      |    3 ++-
 include/posix/semaphore.h  |    1 +
 include/posix/signal.h     |    2 ++
 include/posix/stdio.h      |    1 +
 include/posix/sys/ioctl.h  |    1 +
 include/posix/sys/mman.h   |    2 ++
 include/posix/sys/select.h |    1 +
 include/posix/sys/socket.h |    1 +
 include/posix/syslog.h     |    1 +
 include/posix/time.h       |    2 ++
 include/posix/unistd.h     |    1 +
 15 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/include/posix/errno.h b/include/posix/errno.h
index 9215a06..fc098f7 100644
--- a/include/posix/errno.h
+++ b/include/posix/errno.h
@@ -48,6 +48,7 @@ int *xnthread_get_errno_location(xnthread_t *thread);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+__extension__ 
 #include_next <errno.h>
 
 #endif /* !(__KERNEL__ || __XENO_SIM__) */
diff --git a/include/posix/fcntl.h b/include/posix/fcntl.h
index ed19116..d05e227 100644
--- a/include/posix/fcntl.h
+++ b/include/posix/fcntl.h
@@ -40,6 +40,7 @@ int open(const char *path, int oflag, ...);
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
 #include <time.h>
+__extension__
 #include_next <fcntl.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/mqueue.h b/include/posix/mqueue.h
index ac673f4..bd131c5 100644
--- a/include/posix/mqueue.h
+++ b/include/posix/mqueue.h
@@ -106,6 +106,7 @@ int mq_unlink(const char *name);
 
 #else /* !(__KERNEL__ || __XENO_SIM__ || !HAVE_MQUEUE_H) */
 
+__extension__
 #include_next <mqueue.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/pthread.h b/include/posix/pthread.h
index 243078a..31e50a4 100644
--- a/include/posix/pthread.h
+++ b/include/posix/pthread.h
@@ -132,6 +132,7 @@ typedef struct
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
 #include <sched.h>
+__extension__
 #include_next <pthread.h>
 #include <nucleus/thread.h>
 #include <nucleus/intr.h>
diff --git a/include/posix/sched.h b/include/posix/sched.h
index bb0d209..ec1de0e 100644
--- a/include/posix/sched.h
+++ b/include/posix/sched.h
@@ -55,6 +55,7 @@ int sched_rr_get_interval(int pid, struct timespec *interval);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+__extension__
 #include_next <sched.h>
 
 int __real_sched_yield(void);
@@ -104,7 +105,7 @@ struct sched_tp_window {
 
 struct __sched_config_tp {
        int nr_windows;
-       struct sched_tp_window windows[0];
+       struct sched_tp_window windows[];
 };
 
 union sched_config {
diff --git a/include/posix/semaphore.h b/include/posix/semaphore.h
index 7ee039b..0a92ba6 100644
--- a/include/posix/semaphore.h
+++ b/include/posix/semaphore.h
@@ -54,6 +54,7 @@ typedef struct
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
 #include <fcntl.h>              /* For sem_open flags. */
+__extension__
 #include_next <semaphore.h>
 
 #endif /* !(__KERNEL__ || __XENO_SIM__) */
diff --git a/include/posix/signal.h b/include/posix/signal.h
index 9f64937..fcaffde 100644
--- a/include/posix/signal.h
+++ b/include/posix/signal.h
@@ -107,9 +107,11 @@ int pthread_sigqueue_np (struct pse51_thread *thread, int 
sig, union sigval valu
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+__extension__
 #include_next <signal.h>
 /* In case signal.h is included for a side effect of an __need* macro, include
    it a second time to get all definitions. */
+__extension__
 #include_next <signal.h>
 
 #endif /* !(__KERNEL__ || __XENO_SIM__) */
diff --git a/include/posix/stdio.h b/include/posix/stdio.h
index 339aac1..999d1cd 100644
--- a/include/posix/stdio.h
+++ b/include/posix/stdio.h
@@ -1,5 +1,6 @@
 #ifndef __KERNEL__
 
+__extension__
 #include_next <stdio.h>
 
 #ifndef _XENO_POSIX_STDIO_H
diff --git a/include/posix/sys/ioctl.h b/include/posix/sys/ioctl.h
index 185889c..325782e 100644
--- a/include/posix/sys/ioctl.h
+++ b/include/posix/sys/ioctl.h
@@ -21,6 +21,7 @@
 
 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
 
+__extension__
 #include_next <sys/ioctl.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/sys/mman.h b/include/posix/sys/mman.h
index a542759..34797f0 100644
--- a/include/posix/sys/mman.h
+++ b/include/posix/sys/mman.h
@@ -28,6 +28,7 @@
 #endif /* __KERNEL__ */
 
 #ifdef __XENO_SIM__
+__extension__
 #include_next <sys/mman.h>
 #include <posix_overrides.h>
 #endif /* __XENO_SIM__ */
@@ -53,6 +54,7 @@ int munmap(void *addr, size_t len);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+__extension__
 #include_next <sys/mman.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/sys/select.h b/include/posix/sys/select.h
index 40307bd..32b1b8b 100644
--- a/include/posix/sys/select.h
+++ b/include/posix/sys/select.h
@@ -3,6 +3,7 @@
 
 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
 
+__extension__
 #include_next <sys/select.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/sys/socket.h b/include/posix/sys/socket.h
index 1d76802..415503a 100644
--- a/include/posix/sys/socket.h
+++ b/include/posix/sys/socket.h
@@ -21,6 +21,7 @@
 
 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
 
+__extension__
 #include_next <sys/socket.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/syslog.h b/include/posix/syslog.h
index eec4a44..509c887 100644
--- a/include/posix/syslog.h
+++ b/include/posix/syslog.h
@@ -2,6 +2,7 @@
 #define SYSLOG_H
 
 #include <stdarg.h>
+__extension__
 #include_next <syslog.h>
 #include <xeno_config.h>
 
diff --git a/include/posix/time.h b/include/posix/time.h
index 50c5189..0817d5d 100644
--- a/include/posix/time.h
+++ b/include/posix/time.h
@@ -38,9 +38,11 @@
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+__extension__
 #include_next <time.h>
 /* In case time.h is included for a side effect of an __need* macro, include it
    a second time to get all definitions. */
+__extension__
 #include_next <time.h>
 
 #endif /* !(__KERNEL__ || __XENO_SIM__) */
diff --git a/include/posix/unistd.h b/include/posix/unistd.h
index 4eb3ec4..8136944 100644
--- a/include/posix/unistd.h
+++ b/include/posix/unistd.h
@@ -48,6 +48,7 @@ int ftruncate(int fildes, off_t length);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+__extension__
 #include_next <unistd.h>
 
 #ifdef __cplusplus


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

Reply via email to