summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-06-17 02:53:47 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-06-17 02:53:47 +0000
commit55f1ccc5c91dbd8c868990ee6fc18ddd15e53844 (patch)
tree6affa6eb2149b5cc87ab02f192993528fb629ec9 /include
parent34d61933bb059372c68a4cfacc4ce801dc1f28db (diff)
Add the in* and out* functions for i386. Note: the sys/io.h header for
glibc-2.2.2 actually defines static inline versions for i386, but only provides prototypes for externs for the other archs I looked at. Since uClibc shares this header amongst archs, I stashed the inline defs in bits/io_i386.h and included it when __i386__ was defined. Better solutions are most welcome, but it doesn't clutter sys/io.h too badly and now lilo and the pcmcia tools build against uClibc on i386 without modification.
Diffstat (limited to 'include')
-rw-r--r--include/sys/io.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sys/io.h b/include/sys/io.h
index 9f9eebc6f..9ce921365 100644
--- a/include/sys/io.h
+++ b/include/sys/io.h
@@ -35,6 +35,16 @@ extern int ioperm __P ((unsigned long int __from, unsigned long int __num,
extern int iopl __P ((int __level));
/* The functions that actually perform reads and writes. */
+#ifdef __i386__
+/*
+ * For i386, glibc defines the in* and out* functions as static inlines
+ * in this header file. For a number of other archs, these appear to be
+ * external functions. Since uClibc shares this header amongst archs,
+ * stash the i386 stuff in bits/io_i386.h for now to cut down on clutter
+ * and still give expected behavior.
+ */
+#include <bits/io_i386.h>
+#else
extern unsigned char inb (unsigned long port);
extern unsigned short inw (unsigned long port);
extern unsigned long inl (unsigned long port);
@@ -42,6 +52,7 @@ extern unsigned long inl (unsigned long port);
extern void outb (unsigned char value, unsigned long port);
extern void outw (unsigned short value, unsigned long port);
extern void outl (unsigned long value, unsigned long port);
+#endif /* __i386__ */
__END_DECLS