From 55f1ccc5c91dbd8c868990ee6fc18ddd15e53844 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Sun, 17 Jun 2001 02:53:47 +0000 Subject: 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. --- include/sys/io.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') 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 +#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 -- cgit v1.2.3