I think I've found some typos in /usr/include/sys/io.h.... gcc-2.95.2 wouldn't compile my programs unless I modified the functions outb, outb_p, outw, outw_p, outl and outl_p.
Here are the errors I had:
/usr/include/sys/io.h: In function `void outb(unsigned char, short
unsigned int)':
/usr/include/sys/io.h:98: parse error before `::'
/usr/include/sys/io.h: In function `void outb_p(unsigned char, short
unsigned int)':
/usr/include/sys/io.h:104: parse error before `::'
/usr/include/sys/io.h: In function `void outw(short unsigned int,
short unsigned int)':
/usr/include/sys/io.h:111: parse error before `::'
/usr/include/sys/io.h: In function `void outw_p(short unsigned int,
short unsigned int)':
/usr/include/sys/io.h:118: parse error before `::'
/usr/include/sys/io.h: In function `void outl(unsigned int, short
unsigned int)':
/usr/include/sys/io.h:125: parse error before `::'
/usr/include/sys/io.h: In function `void outl_p(unsigned int, short
unsigned int)':
/usr/include/sys/io.h:131: parse error before `::'
And here are the differences:
98c98
< __asm__ __volatile__ ("outb %b0,%w1"::"a" (value),
"Nd" (port));
---
> __asm__ __volatile__ ("outb %b0,%w1":"=a" (value):"Nd"
(port));
104,105c104
< __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80"::"a"
(value),
< "Nd" (port));
---
> __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80":"=a"
(value):"Nd" (port));
111c110
< __asm__ __volatile__ ("outw %w0,%w1"::"a" (value),
"Nd" (port));
---
> __asm__ __volatile__ ("outw %w0,%w1":"=a" (value):"Nd"
(port));
118,119c117
< __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80"::"a"
(value),
< "Nd" (port));
---
> __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80":"=a"
(value):"Nd" (port));
125c123
< __asm__ __volatile__ ("outl %0,%w1"::"a" (value),
"Nd" (port));
---
> __asm__ __volatile__ ("outl %0,%w1":"=a" (value):"Nd"
(port));
131,132c129
< __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80"::"a"
(value),
< "Nd" (port));
---
> __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80":"=a"
(value):"Nd" (port));
Regards,
Philippe Leroux
pleroux@total.net
Computer Engineering Student
Ecole Polytechnique de Montreal