[haiku-gsoc] Re: [libusb] Libusb Port to Haiku OS

  • From: pulkomandy <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Fri, 8 Aug 2014 10:58:43 +0200

On Fri, Aug 08, 2014 at 10:29:46AM +0200, Ludovic Rousseau wrote:
> Hello,
> 
> 2014-08-08 10:08 GMT+02:00 Akshay Jaggi <akshay1994.leo@xxxxxxxxx>:
> > A way I see through this, is add a check in bootstrap.sh, and if we detect 
> > that the system is Haiku, add the corresponding lines (the cpp sources one, 
> > and AC_PROG_CXX) to configure.ac and Makefile.am. This seems better than 
> > playing with Makefile and Configure scripts, making them all the more 
> > complicated.
> > I would like to know your views on this.
> 
> Another option is to write the Haiky backend in C instead of C++.
> 
> I had a rapid look at your code and see no strong reason to use C++
> instead of C. But I may have missing something.
> How do you justify the use of C++?

Hello,

The code uses Haiku APIs which are only available in C++ (defined in our
USBKit.h header). Even if the backend itself was converted mostly to C,
it would require subclassing BUSBRoster to listen for USB devices being
plugged and unplugged. We are not really willing to modify Haiku to add
an equivalent C API specifically for libusb.

-- 
Adrien.

Other related posts: