[haiku-gsoc] Re: Implementation Queries

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Wed, 21 Jun 2017 07:07:22 +0200

On Wed, Jun 21, 2017 at 12:17:36AM +0530, Vivek Roy wrote:

Linux has it in linux/compiler.h
I will just include that (I already have that compiled correctly)

Can you just tell me why the freebsd_network compatibility layer has been
implemented in /src/libs/compat/freebsd_network/compat rather than say
headers/compatibility/freebsd_network? I might be needing a lot of those,
should I use them from src or copy the ones I require to headers?

I don't know. This was implemented by another GSoC student (Hugo Santos),
before I even joined the project. I think the idea was that these were
private and meant to be used only internally by drivers, so they didn't
need to be in the public headers directory (which means they are not put
in the haiku_devel package).

You could do the same for the linux compatibility
(src/libs/compat/linux), since there as well we are talking about
kernel-side only things.

There is a separate headers/compatibility/bsd, which is meant to be used
by applications written to run on BSD systems. There we provide only
things that *BSD makes available to applications, not kernel/drivers.

If you put your files in headers/compatibility/linux, they will be
installed in the haiku_devel package, and people writting applications
may try to #include them, and maybe find that it doesn't work (as the
code you write is meant to run kernel-side).

-- 
Adrien.

Other related posts: