summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/ioperm.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/sysdeps/linux/arm/ioperm.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/sysdeps/linux/arm/ioperm.c')
-rw-r--r--libc/sysdeps/linux/arm/ioperm.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c
index 0c0c21182..ed370d551 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/ioperm.c
@@ -33,12 +33,6 @@
the area affected (this is a kernel limitation). So we now just
enable all the ports all of the time. */
-#define readlink __readlink
-#define mmap __mmap
-#define sscanf __sscanf
-#define fscanf __fscanf
-#define fgets __fgets
-
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -53,6 +47,18 @@
#include <asm/page.h>
#include <sys/sysctl.h>
+libc_hidden_proto(readlink)
+libc_hidden_proto(mmap)
+libc_hidden_proto(sscanf)
+libc_hidden_proto(fscanf)
+libc_hidden_proto(fprintf)
+libc_hidden_proto(fgets)
+libc_hidden_proto(fopen)
+libc_hidden_proto(fclose)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(open)
+libc_hidden_proto(close)
+
#include <linux/version.h>
#define PATH_ARM_SYSTYPE "/etc/arm_systype"
@@ -163,7 +169,7 @@ init_iosys (void)
/* translate systype name into i/o system: */
for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) {
- if (__strcmp (platform[i].name, systype) == 0) {
+ if (strcmp (platform[i].name, systype) == 0) {
io.shift = platform[i].shift;
io.io_base = platform[i].io_base;
io.initdone = 1;
@@ -191,14 +197,14 @@ int ioperm (unsigned long int from, unsigned long int num, int turn_on)
if (! io.base) {
int fd;
- fd = __open ("/dev/mem", O_RDWR);
+ fd = open ("/dev/mem", O_RDWR);
if (fd < 0)
return -1;
io.base = (unsigned long int) mmap (0, MAX_PORT << io.shift,
PROT_READ | PROT_WRITE,
MAP_SHARED, fd, io.io_base);
- __close (fd);
+ close (fd);
if ((long) io.base == -1)
return -1;
}
@@ -206,6 +212,8 @@ int ioperm (unsigned long int from, unsigned long int num, int turn_on)
return 0;
}
+libc_hidden_proto(ioperm)
+libc_hidden_def(ioperm)
void