|
From: Nathan H. <hj...@me...> - 2012-12-30 05:23:21
|
Thanks for catching that. Not sure why the missing header doesn't cause an error on 1.8. I will fix it and upload an updated tarball. I will have to look into the Windows issue. I can't run the code but I can look and see if there is something obvious from the core side. Any comment on active callbacks vs callbacks via libusb_handle_events? The more I think about it the more I feel active callbacks don't fit the libusb model. I may upload an alternate version that calls callbacks from libusb_handle_events. Either way I will add a simple hotplug example. -Nathan On Dec 29, 2012, at 9:09 PM, Xiaofan Chen <xia...@gm...> wrote: > On Sun, Dec 30, 2012 at 11:52 AM, Xiaofan Chen <xia...@gm...> wrote: >> On Sat, Dec 29, 2012 at 10:10 AM, Nathan Hjelm <hj...@me...> wrote: >>> I think it is time to get the libusb 1.0 hotplug prototype out for friendly >>> user testing. The prototype is available at >>> http://www.cs.unm.edu/~hjelmn/libusb-1.0.15.tar.bz2 . >>> Please email the mailing list with feedback on bugs or issues related >>> to the hotplug API. There is still time to change the API before the final >>> release. >> >> Is it possible that you can come out with a simple example to demonstrate >> the new hotplug API? That would help the testing. > > Under Mac OS X, there is a building error due to a missing header file. > I am using Mac OS X Lion with XCode and Homebrew. > > make all-recursive > Making all in libusb > CC libusb_1_0_la-darwin_usb.lo > os/darwin_usb.c: In function 'darwin_open': > os/darwin_usb.c:903: error: implicit declaration of function 'fcntl' > os/darwin_usb.c:903: error: 'F_SETFD' undeclared (first use in this function) > os/darwin_usb.c:903: error: (Each undeclared identifier is reported only once > os/darwin_usb.c:903: error: for each function it appears in.) > os/darwin_usb.c:903: error: 'O_NONBLOCK' undeclared (first use in this function) > make[2]: [libusb_1_0_la-darwin_usb.lo] Error 1 (ignored) > CC libusb_1_0_la-hotplug.lo > CC libusb_1_0_la-threads_posix.lo > CCLD libusb-1.0.la > libtool: link: `libusb_1_0_la-darwin_usb.lo' is not a valid libtool object > make[2]: [libusb-1.0.la] Error 1 (ignored) > Making all in doc > make[2]: Nothing to be done for `all'. > Making all in examples > CC listdevs.o > make[2]: *** No rule to make target `../libusb/libusb-1.0.la', needed > by `listdevs'. Stop. > make[1]: [all-recursive] Error 1 (ignored) > > Adding one line to darwin_usb.c (say after line 29) solved the problem. > #include <fcntl.h>. > > listdevs works as expected under Mac OS X. > > > -- > Xiaofan > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_123012 > _______________________________________________ > libusb-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-devel |