[git commit future 1/1] remove libc_hidden_proto(ioperm) from all headers except arm

Peter S. Mazinger ps.m at gmx.net
Tue Mar 15 05:45:33 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=4ab59781bad3862390db55519cbbc62f96f13b10
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future

While there, guard everywhere ioperm and iopl prototypes with __UCLIBC_LINUX_SPECIFIC__

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 libc/sysdeps/linux/alpha/sys/io.h    |    3 ++-
 libc/sysdeps/linux/arm/sys/io.h      |    2 ++
 libc/sysdeps/linux/bfin/sys/io.h     |    3 ++-
 libc/sysdeps/linux/common/ioperm.c   |    4 ----
 libc/sysdeps/linux/i386/sys/io.h     |    1 -
 libc/sysdeps/linux/i386/sys/perm.h   |    1 -
 libc/sysdeps/linux/ia64/sys/io.h     |    3 ++-
 libc/sysdeps/linux/sh/sys/io.h       |    3 ++-
 libc/sysdeps/linux/x86_64/sys/io.h   |    3 ++-
 libc/sysdeps/linux/x86_64/sys/perm.h |    1 -
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libc/sysdeps/linux/alpha/sys/io.h b/libc/sysdeps/linux/alpha/sys/io.h
index 9cb8d25..48ba16f 100644
--- a/libc/sysdeps/linux/alpha/sys/io.h
+++ b/libc/sysdeps/linux/alpha/sys/io.h
@@ -23,6 +23,7 @@
 
 __BEGIN_DECLS
 
+#if defined __UCLIBC_LINUX_SPECIFIC__
 /* If TURN_ON is TRUE, request for permission to do direct i/o on the
    port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
    permission off for that range.  This call requires root privileges.
@@ -32,12 +33,12 @@ __BEGIN_DECLS
    E.g., Linux/Alpha for Alpha PCs supports this.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
 		   int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 /* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
    access any I/O port is granted.  This call requires root
    privileges. */
 extern int iopl (int __level) __THROW;
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
 
 /* Return the physical address of the DENSE I/O memory or NULL if none
    is available (e.g. on a jensen).  */
diff --git a/libc/sysdeps/linux/arm/sys/io.h b/libc/sysdeps/linux/arm/sys/io.h
index 81762be..c849960 100644
--- a/libc/sysdeps/linux/arm/sys/io.h
+++ b/libc/sysdeps/linux/arm/sys/io.h
@@ -23,6 +23,7 @@
 
 __BEGIN_DECLS
 
+#if defined __UCLIBC_LINUX_SPECIFIC__
 /* If TURN_ON is TRUE, request for permission to do direct i/o on the
    port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
    permission off for that range.  This call requires root privileges.  */
@@ -34,6 +35,7 @@ libc_hidden_proto(ioperm)
    permission to access any I/O port is granted.  This call requires
    root privileges. */
 extern int iopl (int __level) __THROW;
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
 
 /* The functions that actually perform reads and writes.  */
 extern unsigned char inb (unsigned long int port) __THROW;
diff --git a/libc/sysdeps/linux/bfin/sys/io.h b/libc/sysdeps/linux/bfin/sys/io.h
index 81762be..288490f 100644
--- a/libc/sysdeps/linux/bfin/sys/io.h
+++ b/libc/sysdeps/linux/bfin/sys/io.h
@@ -23,17 +23,18 @@
 
 __BEGIN_DECLS
 
+#if defined __UCLIBC_LINUX_SPECIFIC__
 /* If TURN_ON is TRUE, request for permission to do direct i/o on the
    port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
    permission off for that range.  This call requires root privileges.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
 		   int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 /* Set the I/O privilege level to LEVEL.  If LEVEL is nonzero,
    permission to access any I/O port is granted.  This call requires
    root privileges. */
 extern int iopl (int __level) __THROW;
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
 
 /* The functions that actually perform reads and writes.  */
 extern unsigned char inb (unsigned long int port) __THROW;
diff --git a/libc/sysdeps/linux/common/ioperm.c b/libc/sysdeps/linux/common/ioperm.c
index bca2fff..b64a822 100644
--- a/libc/sysdeps/linux/common/ioperm.c
+++ b/libc/sysdeps/linux/common/ioperm.c
@@ -13,10 +13,6 @@
 
 /* psm: can't #include <sys/io.h>, some archs miss it */
 extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on) __THROW;
-/* Not needed internally;
-libc_hidden_proto(ioperm)
-*/
 _syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on)
-/*libc_hidden_def(ioperm)*/
 
 #endif
diff --git a/libc/sysdeps/linux/i386/sys/io.h b/libc/sysdeps/linux/i386/sys/io.h
index 00205e4..87b99a9 100644
--- a/libc/sysdeps/linux/i386/sys/io.h
+++ b/libc/sysdeps/linux/i386/sys/io.h
@@ -33,7 +33,6 @@ __BEGIN_DECLS
    E.g., Linux/Alpha for Alpha PCs supports this.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
                    int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 /* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
    access any I/O port is granted.  This call requires root
diff --git a/libc/sysdeps/linux/i386/sys/perm.h b/libc/sysdeps/linux/i386/sys/perm.h
index db67d36..e389e66 100644
--- a/libc/sysdeps/linux/i386/sys/perm.h
+++ b/libc/sysdeps/linux/i386/sys/perm.h
@@ -26,7 +26,6 @@ __BEGIN_DECLS
 /* Set port input/output permissions.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
 		   int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 
 /* Change I/O privilege level.  */
diff --git a/libc/sysdeps/linux/ia64/sys/io.h b/libc/sysdeps/linux/ia64/sys/io.h
index cdd6091..6d2a4ab 100644
--- a/libc/sysdeps/linux/ia64/sys/io.h
+++ b/libc/sysdeps/linux/ia64/sys/io.h
@@ -24,6 +24,7 @@
 
 __BEGIN_DECLS
 
+#if defined __UCLIBC_LINUX_SPECIFIC__
 /* If TURN_ON is TRUE, request for permission to do direct i/o on the
    port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
    permission off for that range.  This call requires root privileges.
@@ -33,12 +34,12 @@ __BEGIN_DECLS
    E.g., Linux/Alpha for Alpha PCs supports this.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
 		   int __turn_on);
-libc_hidden_proto(ioperm)
 
 /* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
    access any I/O port is granted.  This call requires root
    privileges. */
 extern int iopl (int __level);
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
 
 extern unsigned int _inb (unsigned long int __port);
 extern unsigned int _inb (unsigned long int __port);
diff --git a/libc/sysdeps/linux/sh/sys/io.h b/libc/sysdeps/linux/sh/sys/io.h
index f833c4e..e4d16c4 100644
--- a/libc/sysdeps/linux/sh/sys/io.h
+++ b/libc/sysdeps/linux/sh/sys/io.h
@@ -23,17 +23,18 @@
 
 __BEGIN_DECLS
 
+#if defined __UCLIBC_LINUX_SPECIFIC__
 /* If TURN_ON is TRUE, request for permission to do direct i/o on the
    port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
    permission off for that range.  This call requires root privileges.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
 		   int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 /* Set the I/O privilege level to LEVEL.  If LEVEL is nonzero,
    permission to access any I/O port is granted.  This call requires
    root privileges. */
 extern int iopl (int __level) __THROW;
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
 
 /* The functions that actually perform reads and writes.  */
 extern unsigned char inb (unsigned long int port) __THROW;
diff --git a/libc/sysdeps/linux/x86_64/sys/io.h b/libc/sysdeps/linux/x86_64/sys/io.h
index ec12125..1637804 100644
--- a/libc/sysdeps/linux/x86_64/sys/io.h
+++ b/libc/sysdeps/linux/x86_64/sys/io.h
@@ -23,6 +23,7 @@
 
 __BEGIN_DECLS
 
+#if defined __UCLIBC_LINUX_SPECIFIC__
 /* If TURN_ON is TRUE, request for permission to do direct i/o on the
    port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
    permission off for that range.  This call requires root privileges.
@@ -32,12 +33,12 @@ __BEGIN_DECLS
    E.g., Linux/Alpha for Alpha PCs supports this.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
                    int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 /* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
    access any I/O port is granted.  This call requires root
    privileges. */
 extern int iopl (int __level) __THROW;
+#endif /* __UCLIBC_LINUX_SPECIFIC__ */
 
 #if defined __GNUC__ && __GNUC__ >= 2
 
diff --git a/libc/sysdeps/linux/x86_64/sys/perm.h b/libc/sysdeps/linux/x86_64/sys/perm.h
index 3796455..382fa92 100644
--- a/libc/sysdeps/linux/x86_64/sys/perm.h
+++ b/libc/sysdeps/linux/x86_64/sys/perm.h
@@ -26,7 +26,6 @@ __BEGIN_DECLS
 /* Set port input/output permissions.  */
 extern int ioperm (unsigned long int __from, unsigned long int __num,
 		   int __turn_on) __THROW;
-libc_hidden_proto(ioperm)
 
 
 /* Change I/O privilege level.  */
-- 
1.7.3.4



More information about the uClibc-cvs mailing list