[LinuxPPS] Kernel Include files needed in Userland.

Cirilo Bernardo cirilo.bernardo at gmail.com
Tue Aug 26 10:14:36 CEST 2008


On Tue, Aug 26, 2008 at 5:07 PM, Rodolfo Giometti <giometti at enneenne.com> wrote:
> On Mon, Aug 25, 2008 at 11:12:58AM -0600, clemens at dwf.com wrote:
>> Im sure this info is in the Wiki, but I would propose that there be
>> one more short file in the kernel Documentation/pps directory
>> (for those that dont know about the linuxPPS wiki) containing
>> the following info.
>>
>> I would propose a file named 'userland-info' with the following
>> information in it:
>>
>> ---
>>
>> Until the Linux userland include files in /usr/include get updated
>> to include the linuxPPS changes, the user will have to copy the
>> following files from a recent (linux-2.6.27 or later) kernel
>> to /usr/include to get user programs to compile correctly.
>>
>> <kernel>/Documentation/pps/timepps.h        -> /usr/include/timepps.h
>> <kernel>/linux/timex.h                        -> /usr/include/linux/timex.h
>> <kernel>/linux/pps.h                  -> /usr/include/linux/pps.h
>
> This info is temporary and not suitable for kernel documentation (I
> fear that kernel's guru will reject file
> linux/Documentation/pps/timepps.h). Also this info is reported into
> the wiki.
>
> This kind of information will be useful in «LinuxPPS HOWTO»... does
> nobody wish to write one? ;)
>
> Ciao,
>
> Rodolfo
>

If I recall correctly, there is a kernel config mechanism for putting
a header into the "kernel headers" directory, so there should be no
need for an extra copy of pps.h since it should be installed when the
"kernel headers" are installed.

To see how the mechanism works I would suggest looking at any file in
the kernel's user-space include directory then looking at the kernel
tree to see how the Kconfig file determines whether or not that header
goes into the user includes.  I don't know what mechanisms are used to
separate kernel internals from user-space (API) information (multiple
includes, #ifdefs etc).

That would also make things much simpler on the wiki since the
instructions will just be "install the kernel headers then compile
NTP" (well, maybe after patching NTP).

- Cirilo



More information about the LinuxPPS mailing list