--- IMPORTANT! ---

As of libusb-0.1.7 and earlier, there is a bug in darwin.c:usb_control_msg() in which it lies about the number
of bytes returned (it always says that the number is the max requested).  Not all drivers break from this bug,
but it does impact ifd-egate. 

Here is the patch to fix libusb's darwin.c:

Index: darwin.c
===================================================================
RCS file: /cvsroot/libusb/libusb/darwin.c,v
retrieving revision 1.33
diff -r1.33 darwin.c
4a5
>  * (c) 2004 Philip Edelbrock <phil@edgedesign.us>
6c7,8
<  * (12/16/2003):
---
>  * (01/02/2004):
>  *   - (Phil) Fixed return result in usb_control_msg()
729,730c731
<   /* i am pretty sure DeviceRequest modifies this */
<   return urequest.wLength;
---
>   return urequest.wLenDone;


To build and install, use Makefile-OSX instead of the regular Makefile:

make -f Makefile-OSX clean
make -f Makefile-OSX
make -f Makefile-OSX install

By default, the driver is installed BOTH in /usr/local/pcsc/drivers and /usr/libexec/SmartCardServices/drivers.
Edit the Makefile if you want the driver installed in just one of these locations.


--Phil
