libusb-win32 recently changed the name of their header file from usb.h
to lusb0_usb.h (for whatever reason). Autoprobe for the filename during configure, and include whatever is appropriate. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1043 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
af991085ca
commit
b403105824
|
@ -1,3 +1,13 @@
|
||||||
|
2012-01-20 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* configure.ac: Check for presence of lusb_usb.h as an alternative
|
||||||
|
to usb.h; libusb-win32 switched to this name in version 1.2.5.0.
|
||||||
|
* avrftdi.c: Decide whether to include <usb.h>, or <lusb0_usb.h>.
|
||||||
|
* ser_avrdoper.c: (Dito.)
|
||||||
|
* usbasp.c: (Dito.)
|
||||||
|
* usb_libusb.c: (Dito.)
|
||||||
|
* usbtiny.c: (Dito.)
|
||||||
|
|
||||||
2012-01-19 Rene Liebscher <R.Liebscher@gmx.de>
|
2012-01-19 Rene Liebscher <R.Liebscher@gmx.de>
|
||||||
|
|
||||||
* avr.c: Unsigned variable was used for return code of paged_write/load
|
* avr.c: Unsigned variable was used for return code of paged_write/load
|
||||||
|
|
|
@ -42,7 +42,13 @@
|
||||||
#ifdef HAVE_LIBFTDI
|
#ifdef HAVE_LIBFTDI
|
||||||
|
|
||||||
#include <ftdi.h>
|
#include <ftdi.h>
|
||||||
|
#if defined(HAVE_USB_H)
|
||||||
# include <usb.h>
|
# include <usb.h>
|
||||||
|
#elif defined(HAVE_LUSB0_USB_H)
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
#else
|
||||||
|
# error "libusb needs either <usb.h> or <lusb0_usb.h>"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is for running the code without having a FTDI-device.
|
/* This is for running the code without having a FTDI-device.
|
||||||
* The generated code is useless! For debugging purposes only.
|
* The generated code is useless! For debugging purposes only.
|
||||||
|
|
|
@ -69,6 +69,8 @@ if test x$have_libusb = xyes; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_DEFINE([HAVE_LIBUSB])
|
AC_DEFINE([HAVE_LIBUSB])
|
||||||
|
AC_CHECK_HEADERS([usb.h])
|
||||||
|
AC_CHECK_HEADERS([lusb0_usb.h])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBUSB, $LIBUSB)
|
AC_SUBST(LIBUSB, $LIBUSB)
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,13 @@ static int usbGetReport(union filedescriptor *fdp, int reportType, int reportNum
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
#if defined(HAVE_USB_H)
|
||||||
# include <usb.h>
|
# include <usb.h>
|
||||||
|
#elif defined(HAVE_LUSB0_USB_H)
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
#else
|
||||||
|
# error "libusb needs either <usb.h> or <lusb0_usb.h>"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,13 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_USB_H)
|
||||||
# include <usb.h>
|
# include <usb.h>
|
||||||
|
#elif defined(HAVE_LUSB0_USB_H)
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
#else
|
||||||
|
# error "libusb needs either <usb.h> or <lusb0_usb.h>"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "avrdude.h"
|
#include "avrdude.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
|
@ -53,7 +53,13 @@
|
||||||
# include <libusb.h>
|
# include <libusb.h>
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
|
# if defined(HAVE_USB_H)
|
||||||
# include <usb.h>
|
# include <usb.h>
|
||||||
|
# elif defined(HAVE_LUSB0_USB_H)
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
# else
|
||||||
|
# error "libusb needs either <usb.h> or <lusb0_usb.h>"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LIBUSB_1_0
|
#ifdef USE_LIBUSB_1_0
|
||||||
|
|
|
@ -40,7 +40,13 @@
|
||||||
#include "usbtiny.h"
|
#include "usbtiny.h"
|
||||||
|
|
||||||
#if defined(HAVE_LIBUSB) // we use LIBUSB to talk to the board
|
#if defined(HAVE_LIBUSB) // we use LIBUSB to talk to the board
|
||||||
|
#if defined(HAVE_USB_H)
|
||||||
# include <usb.h>
|
# include <usb.h>
|
||||||
|
#elif defined(HAVE_LUSB0_USB_H)
|
||||||
|
# include <lusb0_usb.h>
|
||||||
|
#else
|
||||||
|
# error "libusb needs either <usb.h> or <lusb0_usb.h>"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_UINT_T
|
#ifndef HAVE_UINT_T
|
||||||
typedef unsigned int uint_t;
|
typedef unsigned int uint_t;
|
||||||
|
|
Loading…
Reference in New Issue