Bug 2140

Summary: lnx_video.c unnecessarily defining ioperm() and iopl()
Product: xorg Reporter: Mike A. Harris <mharris>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: high CC: ajax
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mike A. Harris 2004-12-23 11:37:58 UTC
xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c contains the
following:

/*
 * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
 * these.
 */
extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on);
extern int iopl(int __level);



sys/io.h will always define these.  I see no reason for this to be in
the lnx_video.c file, it seems like an ugly hack for something.

Can someone explain why this is needed at all?
Comment 1 Mike A. Harris 2004-12-23 11:44:46 UTC
To expand upon my question:  Can someone explain what these "conflicts"
with compiler.h are, and why this is deemed the necessary solution?
Comment 2 Erik Andren 2006-05-21 03:56:50 UTC
Without these declarations I get some compiler warnings on x86.

lnx_video.c: In function 'xf86EnableIO':
lnx_video.c:561: warning: implicit declaration of function 'ioperm'
lnx_video.c:561: warning: nested extern declaration of 'ioperm'
lnx_video.c:561: warning: implicit declaration of function 'iopl'
lnx_video.c:561: warning: nested extern declaration of 'iopl'
Comment 3 Mike A. Harris 2006-08-31 07:17:06 UTC
This bug is soooo not interesting to me anymore.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.