[openbeosnetteam] Re: R5 compatibility and libnetapi.so

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Thu, 05 Oct 2006 19:41:52 +0200 CEST

Hi Oliver,

Oliver Tappe <openbeos@xxxxxxxxxxxxxxx> wrote:
> > a) would have the benefit that a BONE application that loads a
> > net_server add-on would still work; but since this is a very
> > constructed example, I don't know if that should really matter.
> Hm, why would that be the case? Because the check you proposed for 
> option b) 
> would fail for an add-on?

No, but since libnetwork.so would only be loaded and therefore 
initialized once, the check wouldn't be done again, and couldn't even 
differentiate between the different usages.

> > About b): am I right that only calls to socket(), setsockopt(), ...
> > including sockaddr_ins need to be converted? Do you have any 
> > indication
> > that checking against being linked against "libnet.so" is not an
> > unambiguous sign of activating the compatibility layer?
> ...I think I would not consider it fine behaviour if I write a 
> networking 
> program (using haiku's API) and have it crash simply because I forgot 
> to 
> remove the '-lnet' that I forgot to remove from my Makefile. 
> In that case (and for a C-program only), the runtime check would 
> trigger the 
> conversion from old to new API, although the program is in fact using 
> the new 
> API, right?

That's indeed true, even though we could compensate the effect by not 
having libnet.so in /boot/develop/lib/x86/ - then you couldn't link 
your application with -lnet.
But I'm of course open to other suggestions as well :-)

Bye,
   Axel.


Other related posts: