[PATCH] Work around ARM define/undef hackery to allow sys.c to compile

Matt Turner mattst88 at gmail.com
Mon Nov 9 08:43:40 PST 2009


On Mon, Nov 9, 2009 at 11:06 AM, Tiago Vignatti
<tiago.vignatti at nokia.com> wrote:
> On Mon, Nov 09, 2009 at 04:52:38AM +0100, ext Matt Turner wrote:
>> The '#define outb xf_outb' stuff breaks sys.c compilation. Let's just
>> put in this hack until we get PCI in/out sorted out for good.
>>
>> Signed-off-by: Matt Turner <mattst88 at gmail.com>
>> ---
>>  hw/xfree86/common/compiler.h |   39 +++++++++++++++++++++++++++++----------
>>  1 files changed, 29 insertions(+), 10 deletions(-)
>>
>> diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
>> index dc5f157..a1871a0 100644
>> --- a/hw/xfree86/common/compiler.h
>> +++ b/hw/xfree86/common/compiler.h
>> @@ -980,29 +980,48 @@ inl(unsigned short port)
>>  /* note that the appropriate setup via "ioperm" needs to be done */
>>  /*  *before* any inx/outx is done. */
>>
>> -#include <sys/io.h>
>> +extern _X_EXPORT void _outb(unsigned char val, unsigned long port);
>> +extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
>> +extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
>> +extern _X_EXPORT unsigned int _inb(unsigned long port);
>> +extern _X_EXPORT unsigned int _inw(unsigned long port);
>> +extern _X_EXPORT unsigned int _inl(unsigned long port);
>>
>
> NACK. They have extern modifiers, so such symbols are expected to be compiled
> somewhere missed place and failing the compilation.

How about if we get rid of the extern?

Matt


More information about the xorg-devel mailing list