[lsb-discuss] Help understand lsb headers

Petrie, Glen glen.petrie at eitc.epson.com
Fri Sep 28 21:57:26 UTC 2012


The issue with poll.h is that are two of them defined (not an error).
One is in .../include and the other is in .../include/sys.   This the
same for both LSB and the Std header file structure.  The important
difference is that the lsb/include/poll.h contains actual header data
while the Std /usr/include/poll.h only has an include statement for
/usr/include/sys/poll.h.

 

Thus, when using LSB you have to have explicit include statements for
both poll.h header files while in the Std you can include either of
them.

 

I think this is bug 

 

Depending upon any response, I will either fix the SANE code to include
both headers or change my test version of the two lsb poll header to
match the Std

 

Glen

 

________________________________

From: lsb-discuss-bounces at lists.linux-foundation.org
[mailto:lsb-discuss-bounces at lists.linux-foundation.org] On Behalf Of
Petrie, Glen
Sent: Friday, September 28, 2012 12:58 PM
To: lsb-discuss at lists.linux-foundation.org
Subject: Re: [lsb-discuss] Help understand lsb headers

 

All,

 

There is same problem in sys/io.h with functions: ioperm, inb and outb

 

And the same problem in sys/poll.h with function: poll

 

glen

 

________________________________

From: lsb-discuss-bounces at lists.linux-foundation.org
[mailto:lsb-discuss-bounces at lists.linux-foundation.org] On Behalf Of
Petrie, Glen
Sent: Friday, September 28, 2012 12:21 PM
To: lsb-discuss at lists.linux-foundation.org
Subject: [lsb-discuss] Help understand lsb headers

 

All,

 

This note was original a communication between Mats and myself but we
both thought it was a good idea to share it on the mail list.

 

Glen

 

=======================================

Mats

 

I don't think it is an architecture issues.

 

Glen

 

=======================================

Glen

 

Sure, it's never a clean picture, no matter how much it may look that
way at the time.

 

All those years ago, it was concluded that system apps were never a
target of LSB, just 3rd party apps.  So privileged operations were out.

 

This model of doing printer/scanner drivers as LSB conforming binaries
so they can be portably distributed does not fit into that model -
meaning the model doesn't quite fit any more.

 

This may be an escalation thing (to the mailing list).

 

Is it still true that this is an i386 only function?  If so, what do the
drivers do in other cases?

 

Mats

=======================================

Mats

 

I understand that "app's don't get to do that".  In this case the
"""apps""" are scanner drivers; so, maybe "they get to do that".   But I
understand if it is added back into sys/io.h then "any app can do that";
likely, not the best idea.  So in case, the extern/define statement
should be in the SANE code; just to keep LSB clean. 

 

Glen

 

=======================================

Glen,

 

I think we have sys/io.h because the function was once in LSB, and no
longer is.  However as you surmise, the presence of the header prevents
a fall through to the system header, which would let you pick up the
non-LSB interfaces in there.

 

We had it [iopl], and it was removed.

 

http://navigator.lsbtest.net/navigator/browse/int_single.php?cmd=list-by
-name&Ilibrary=libc&Iname=iopl

 

I didn't recall the history, but I find some in bugzilla:

 

https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=96

 

The summary being "applications don't get to do that".

 

Mats

 

=====================================

Hi Mats,

 

I need to understand how the LSB headers work.   I think I know (but I
have misunderstood things before).  

 

I need the function "iopl();".

 

In the standard headers; iopl is defined in sys/io.h; however, the lsb
sys/io.h does not have any function extern/define statements.  So that
is either because 

 

1.	lsb sys/io.h does not support (any) io functions or 
2.	(and I don't think so, but) somehow the lsb sys/io.h is called
and later the std sys/io.h is called (can't see how since they have the
same #ifndef symbol).

 

Assuming (1.) is the right answer; then, would LSB consider adding the
iopl function extern/define statement in the lsb sys/io.h or should this
be a case where I should add the function extern/define statement to the
SANE code directly (where ever sys/io.h is used)?

 

Thanks ahead of time

 

glen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lsb-discuss/attachments/20120928/8cd1400e/attachment-0001.html>


More information about the lsb-discuss mailing list