aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-08-14 13:55:09 -0700
committerKoushik Dutta <koushd@gmail.com>2013-08-14 13:55:09 -0700
commit128f4a25a580449d413085ce95505aeaf6903ca4 (patch)
tree689e4feb17c600b3751a79252129c3a67b019790
parent591d9768c61fe4f50fb5b4919df07ec37d9db891 (diff)
downloadandroid_external_libusbx-stable/cm-11.0-XNF9X.tar.gz
android_external_libusbx-stable/cm-11.0-XNF9X.tar.bz2
android_external_libusbx-stable/cm-11.0-XNF9X.zip
Change-Id: I4c26d86e57c6373c23a9908104f11119dfc467da
-rw-r--r--config.h37
-rw-r--r--libusb/Android.mk4
2 files changed, 22 insertions, 19 deletions
diff --git a/config.h b/config.h
index 4985a57..fa4be13 100644
--- a/config.h
+++ b/config.h
@@ -1,6 +1,16 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
+#if defined(__APPLE__)
+#define OS_DARWIN
+#define THREADS_POSIX
+#elif defined(__linux__)
+#define OS_LINUX
+#define THREADS_POSIX
+#else
+#define OS_WINDOWS
+#endif
+
/* Default visibility */
#define DEFAULT_VISIBILITY __attribute__((visibility("default")))
@@ -38,7 +48,9 @@
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <poll.h> header file. */
+#ifndef OS_WINDOWS
#define HAVE_POLL_H 1
+#endif
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
@@ -56,13 +68,17 @@
#define HAVE_STRING_H 1
/* Define to 1 if the system has the type `struct timespec'. */
+#ifndef OS_WINDOWS
#define HAVE_STRUCT_TIMESPEC 1
+#endif
/* syslog() function available */
#define HAVE_SYSLOG_FUNC 1
/* Define to 1 if you have the <syslog.h> header file. */
+#ifndef OS_WINDOWS
#define HAVE_SYSLOG_H 1
+#endif
/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */
@@ -83,26 +99,9 @@
*/
#define LT_OBJDIR ".libs/"
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-/* #undef NO_MINUS_C_MINUS_O */
-
-#if defined(__APPLE__)
-#define OS_DARWIN
-#define THREADS_POSIX
-#elif defined(__linux__)
-#define OS_LINUX
-#define THREADS_POSIX
-#endif
-
-/* Linux backend */
-/* #undef OS_LINUX */
-
/* OpenBSD/NetBSD backend */
/* #undef OS_OPENBSD */
-/* Windows backend */
-/* #undef OS_WINDOWS */
-
/* Name of package */
#define PACKAGE "libusbx"
@@ -125,7 +124,11 @@
#define PACKAGE_VERSION "1.0.16"
/* type of second poll() argument */
+#ifndef OS_WINDOWS
#define POLL_NFDS_TYPE nfds_t
+#else
+#define POLL_NFDS_TYPE unsigned int
+#endif
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
diff --git a/libusb/Android.mk b/libusb/Android.mk
index f3e0425..dfa4213 100644
--- a/libusb/Android.mk
+++ b/libusb/Android.mk
@@ -20,7 +20,7 @@ LOCAL_C_INCLUDES += \
LOCAL_CFLAGS := -D_SHARED_LIBRARY_
LOCAL_MODULE_TAGS:= optional
LOCAL_MODULE:= libusbx
-include $(BUILD_STATIC_LIBRARY)
+#include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -45,7 +45,7 @@ ifeq ($(HOST_OS),darwin)
endif
ifeq ($(HOST_OS),windows)
- LOCAL_SRC_FILES += os/windows_usbfs.c
+ LOCAL_SRC_FILES += os/windows_usb.c os/threads_windows.c os/poll_windows.c
endif