Thomas Reitelbach wrote:

My thought of the logic:

content of mykernelheader.h:
----------------------------
<...>
/* BEGIN USERSPACE HEADER */
...
...some header important for userspace...
...
/* END USERSPACE HEADER */
<...>

If think that's essentially what the #ifdef __KERNEL__ guards do in some of the headers, though they work exactly opposite to what you had in mind. That is, if you're compiling a kernel, those definitions are visible, but if you're in userspace you don't see the guarded code. Unfortunately, as Jurg points out earlier in this thread, there are plenty of headers that are missing those guards and I'm not entirely sure that such guards are a complete solution (if they were I don't think all the hairy looking `sed's I've seen on this list just recently would be required).

Regards,

Matt.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to