Ticket #9: 620_win32-usb.patch
| File 620_win32-usb.patch, 3.1 KB (added by hsattler, 18 months ago) |
|---|
-
openobex-anoncvs
old new 147 147 ]) 148 148 149 149 AC_DEFUN([AC_PATH_USB], [ 150 usb_lib_found=no 150 151 case $host in 151 152 *-*-mingw32*) 152 153 USB_CFLAGS="" 153 154 USB_LIBS="-lusb" 155 usb_lib_found=yes 154 156 ;; 155 157 *) 156 PKG_CHECK_MODULES(USB, libusb, usb_found=yes, AC_MSG_RESULT(no)) 158 PKG_CHECK_MODULES(USB, libusb, usb_lib_found=yes, AC_MSG_RESULT(no)) 159 AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb") 157 160 ;; 158 161 esac 159 162 AC_SUBST(USB_CFLAGS) 160 163 AC_SUBST(USB_LIBS) 161 AC_CHECK_LIB(usb, usb_get_busses, dummy=yes, AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.])) 162 AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes, AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.])) 164 165 usb_get_busses=no 166 AC_CHECK_LIB(usb, usb_get_busses, usb_get_busses=yes, AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.])) 167 168 usb_interrupt_read=no 169 AC_CHECK_LIB(usb, usb_interrupt_read, usb_interrupt_read=yes, AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.])) 170 171 if (test "$usb_lib_found" = "yes" && test "$usb_get_busses" = "yes" && test "$usb_interrupt_read" = "yes"); then 172 usb_found=yes 173 else 174 usb_found=no 175 fi 163 176 ]) 164 177 165 178 AC_DEFUN([AC_PATH_GLIB], [ … … 263 276 264 277 if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then 265 278 AC_DEFINE(HAVE_USB, 1, [Define if system supports USB and it's enabled]) 266 AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb")267 279 fi 268 280 269 281 AM_CONDITIONAL(GLIB, test "${glib_enable}" = "yes" && test "${glib_found}" = "yes") -
openobex-anoncvs
old new 59 59 /* "Union Functional Descriptor" from CDC spec 5.2.3.X 60 60 * used to find data/slave OBEX interface */ 61 61 struct cdc_union_desc { 62 u _int8_t bLength;63 u _int8_t bDescriptorType;64 u _int8_t bDescriptorSubType;62 uint8_t bLength; 63 uint8_t bDescriptorType; 64 uint8_t bDescriptorSubType; 65 65 66 u _int8_t bMasterInterface0;67 u _int8_t bSlaveInterface0;66 uint8_t bMasterInterface0; 67 uint8_t bSlaveInterface0; 68 68 } __attribute__ ((packed)); 69 69 70 70 /* CDC class and subclass types */ -
openobex-anoncvs
old new 37 37 #include <unistd.h> 38 38 #include <stdio.h> /* perror */ 39 39 #include <errno.h> /* errno and EADDRNOTAVAIL */ 40 41 42 #ifdef _WIN32 43 #include <windows.h> 44 #else 40 45 #include <netinet/in.h> 41 46 #include <sys/socket.h> 47 #endif 42 48 43 49 #include <usb.h> 44 50
