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

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Tue May 28 21:49:08 2013 +0200

posix: use pragma instead of __extension__

to avoid gcc warning with #include_next in pedantic mode

---

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

diff --git a/include/posix/errno.h b/include/posix/errno.h
index fc098f7..3e9c3c1 100644
--- a/include/posix/errno.h
+++ b/include/posix/errno.h
@@ -48,7 +48,8 @@ int *xnthread_get_errno_location(xnthread_t *thread);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
-__extension__ 
+#pragma GCC system_header
+
 #include_next <errno.h>
 
 #endif /* !(__KERNEL__ || __XENO_SIM__) */
diff --git a/include/posix/fcntl.h b/include/posix/fcntl.h
index d05e227..88a4d82 100644
--- a/include/posix/fcntl.h
+++ b/include/posix/fcntl.h
@@ -39,8 +39,9 @@ int open(const char *path, int oflag, ...);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+#pragma GCC system_header
+
 #include <time.h>
-__extension__
 #include_next <fcntl.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/mqueue.h b/include/posix/mqueue.h
index 54a8813..22368db 100644
--- a/include/posix/mqueue.h
+++ b/include/posix/mqueue.h
@@ -106,7 +106,8 @@ int mq_unlink(const char *name);
 
 #else /* !(__KERNEL__ || __XENO_SIM__ || !CONFIG_XENO_HAVE_MQUEUE_H) */
 
-__extension__
+#pragma GCC system_header
+
 #include_next <mqueue.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/pthread.h b/include/posix/pthread.h
index 85aa2f0..e90e94e 100644
--- a/include/posix/pthread.h
+++ b/include/posix/pthread.h
@@ -131,8 +131,9 @@ typedef struct
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+#pragma GCC system_header
+
 #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 ec1de0e..71403d5 100644
--- a/include/posix/sched.h
+++ b/include/posix/sched.h
@@ -55,7 +55,8 @@ int sched_rr_get_interval(int pid, struct timespec *interval);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
-__extension__
+#pragma GCC system_header
+
 #include_next <sched.h>
 
 int __real_sched_yield(void);
diff --git a/include/posix/semaphore.h b/include/posix/semaphore.h
index 0a92ba6..9f30058 100644
--- a/include/posix/semaphore.h
+++ b/include/posix/semaphore.h
@@ -53,8 +53,9 @@ typedef struct
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
+#pragma GCC system_header
+
 #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 fcaffde..e3a4921 100644
--- a/include/posix/signal.h
+++ b/include/posix/signal.h
@@ -107,11 +107,11 @@ int pthread_sigqueue_np (struct pse51_thread *thread, int 
sig, union sigval valu
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
-__extension__
+#pragma GCC system_header
+
 #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 999d1cd..8a07752 100644
--- a/include/posix/stdio.h
+++ b/include/posix/stdio.h
@@ -1,6 +1,7 @@
 #ifndef __KERNEL__
 
-__extension__
+#pragma GCC system_header
+
 #include_next <stdio.h>
 
 #ifndef _XENO_POSIX_STDIO_H
diff --git a/include/posix/sys/ioctl.h b/include/posix/sys/ioctl.h
index 325782e..dbd0ee3 100644
--- a/include/posix/sys/ioctl.h
+++ b/include/posix/sys/ioctl.h
@@ -21,7 +21,8 @@
 
 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
 
-__extension__
+#pragma GCC system_header
+
 #include_next <sys/ioctl.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/sys/mman.h b/include/posix/sys/mman.h
index 34797f0..39e44b4 100644
--- a/include/posix/sys/mman.h
+++ b/include/posix/sys/mman.h
@@ -28,7 +28,8 @@
 #endif /* __KERNEL__ */
 
 #ifdef __XENO_SIM__
-__extension__
+#pragma GCC system_header
+
 #include_next <sys/mman.h>
 #include <posix_overrides.h>
 #endif /* __XENO_SIM__ */
@@ -54,7 +55,8 @@ int munmap(void *addr, size_t len);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
-__extension__
+#pragma GCC system_header
+
 #include_next <sys/mman.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/sys/select.h b/include/posix/sys/select.h
index 32b1b8b..49b0420 100644
--- a/include/posix/sys/select.h
+++ b/include/posix/sys/select.h
@@ -3,7 +3,8 @@
 
 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
 
-__extension__
+#pragma GCC system_header
+
 #include_next <sys/select.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/sys/socket.h b/include/posix/sys/socket.h
index 415503a..4373fd8 100644
--- a/include/posix/sys/socket.h
+++ b/include/posix/sys/socket.h
@@ -21,7 +21,8 @@
 
 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
 
-__extension__
+#pragma GCC system_header
+
 #include_next <sys/socket.h>
 
 #ifdef __cplusplus
diff --git a/include/posix/syslog.h b/include/posix/syslog.h
index 509c887..b214954 100644
--- a/include/posix/syslog.h
+++ b/include/posix/syslog.h
@@ -1,8 +1,9 @@
 #ifndef SYSLOG_H
 #define SYSLOG_H
 
+#pragma GCC system_header
+
 #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 0817d5d..afbb56f 100644
--- a/include/posix/time.h
+++ b/include/posix/time.h
@@ -38,11 +38,11 @@
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
-__extension__
+#pragma GCC system_header
+
 #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 8136944..d9096bc 100644
--- a/include/posix/unistd.h
+++ b/include/posix/unistd.h
@@ -48,7 +48,8 @@ int ftruncate(int fildes, off_t length);
 
 #else /* !(__KERNEL__ || __XENO_SIM__) */
 
-__extension__
+#pragma GCC system_header
+
 #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