home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Linux platform differences

On Wed, Oct 27, 2010 at 1:20 PM, piper.guy1 <piper [ dot ] guy1 [ at ] gmail [ dot ] com> wrote:

> '/usr/include/linux' is pretty common. It's in my Ubuntu platform. It
> includes a very comprehensive collection of header files and folders
> of header files. So why does it appear sometimes and not others?

/usr/include/linux should contain the "linux specific" parts, that
normally get included by the libc/compiler provided sys/* as needed.

You shouldn't need to be including linux/* directly in "normal
posix/SUS" type applications.  You should be including the system
headers, which the compiler/libc will set up to internally include
bits/*, asm/*, linux/*, as needed.

But if you're doing linux specific stuff, (i.e. stuff that's not in
the system-styled POSIX/XOPEN/SUS), you might need to include the
linux specific stuff.   Examples of programs that need to reach past
the basic system headers are stuff that poke at linux-specifc device
information, or linux-specific features.

> Is the app I'm installing (ethertool) which calls header files from
> '/usr/include/linux' just simply a bad app that no app should be
> doing?

Well, ethtool is a linux-specific tool to poke at network devices, so
I actually would expect it to include linux/* headers directly.   I
wouldn't hold much hope of compiling that on windows.

a.


-- 
Aidan Van Dyk                                             Create like a god,
aidan [ at ] highrise [ dot ] ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.