Get a working libusb
This commit is contained in:
parent
9853267ee1
commit
c13fa25a13
111
libusbx-1.0.9/config.h
Normal file
111
libusbx-1.0.9/config.h
Normal file
|
@ -0,0 +1,111 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Default visibility */
|
||||
#define DEFAULT_VISIBILITY __attribute__((visibility("default")))
|
||||
|
||||
/* Debug message logging */
|
||||
/* #undef ENABLE_DEBUG_LOGGING */
|
||||
|
||||
/* Message logging */
|
||||
#define ENABLE_LOGGING 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct timespec'. */
|
||||
#define HAVE_STRUCT_TIMESPEC 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Darwin backend */
|
||||
/* #undef OS_DARWIN */
|
||||
|
||||
/* Linux backend */
|
||||
#define OS_LINUX 1
|
||||
|
||||
/* OpenBSD backend */
|
||||
/* #undef OS_OPENBSD */
|
||||
|
||||
/* Windows backend */
|
||||
/* #undef OS_WINDOWS */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libusbx"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "libusbx-devel@lists.sourceforge.net"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "libusbx"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libusbx 1.0.9"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libusbx"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "http://www.libusbx.org/"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.0.9"
|
||||
|
||||
/* type of second poll() argument */
|
||||
#define POLL_NFDS_TYPE nfds_t
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Use POSIX Threads */
|
||||
#define THREADS_POSIX 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.0.9"
|
||||
|
||||
/* Use GNU extensions */
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
113
libusbx-1.0.9/config.h.in
Normal file
113
libusbx-1.0.9/config.h.in
Normal file
|
@ -0,0 +1,113 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Default visibility */
|
||||
#undef DEFAULT_VISIBILITY
|
||||
|
||||
/* Debug message logging */
|
||||
#undef ENABLE_DEBUG_LOGGING
|
||||
|
||||
/* Message logging */
|
||||
#undef ENABLE_LOGGING
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#undef HAVE_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if the system has the type `struct timespec'. */
|
||||
#undef HAVE_STRUCT_TIMESPEC
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
/* Darwin backend */
|
||||
#undef OS_DARWIN
|
||||
|
||||
/* Linux backend */
|
||||
#undef OS_LINUX
|
||||
|
||||
/* OpenBSD backend */
|
||||
#undef OS_OPENBSD
|
||||
|
||||
/* Windows backend */
|
||||
#undef OS_WINDOWS
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* type of second poll() argument */
|
||||
#undef POLL_NFDS_TYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Use POSIX Threads */
|
||||
#undef THREADS_POSIX
|
||||
|
||||
/* timerfd headers available */
|
||||
#undef USBI_TIMERFD_AVAILABLE
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Use GNU extensions */
|
||||
#undef _GNU_SOURCE
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include "libusbi.h"
|
||||
|
||||
#define LIBUSB_DESCRIBE ""
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
const struct usbi_os_backend * const usbi_backend = &linux_usbfs_backend;
|
||||
#elif defined(OS_DARWIN)
|
||||
|
|
|
@ -36,6 +36,15 @@
|
|||
|
||||
#include "libusbi.h"
|
||||
|
||||
#ifndef TIMESPEC_TO_TIMEVAL
|
||||
#define TIMESPEC_TO_TIMEVAL(tv, ts) \
|
||||
do { \
|
||||
(tv)->tv_sec = (ts)->tv_sec; \
|
||||
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
|
||||
} while(0)
|
||||
#endif /* end of TIMESPEC_TO_TIMEVAL */
|
||||
|
||||
|
||||
/**
|
||||
* \page io Synchronous and asynchronous device I/O
|
||||
*
|
||||
|
|
10
libusbx-1.0.9/libusb/os/poll_posix.h
Normal file
10
libusbx-1.0.9/libusb/os/poll_posix.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef LIBUSB_POLL_POSIX_H
|
||||
#define LIBUSB_POLL_POSIX_H
|
||||
|
||||
#define usbi_write write
|
||||
#define usbi_read read
|
||||
#define usbi_close close
|
||||
#define usbi_pipe pipe
|
||||
#define usbi_poll poll
|
||||
|
||||
#endif /* LIBUSB_POLL_POSIX_H */
|
Loading…
Reference in a new issue