Bug 2140 - lnx_video.c unnecessarily defining ioperm() and iopl()
Summary: lnx_video.c unnecessarily defining ioperm() and iopl()
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-23 11:37 UTC by Mike A. Harris
Modified: 2006-08-31 07:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.