summaryrefslogtreecommitdiff
path: root/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: fixes unknown warning option from ndk buildAaron Luft2020-04-171-1/+1
| | | | | | | | | | | | | | | | A command line option is not correct. Fix by spelling the option correctly. BEFORE [x86] Compile : xusb <= xusb.c warning: unknown warning option '-Werror=unintialized'; did you mean '-Werror=uninitialized'? [-Wunknown-warning-option] AFTER [x86] Compile : xusb <= xusb.c [x86] Executable : xusb [x86] Install : xusb => libs/x86/xusb
* android: Update makefiles to include recent autobuild changesChris Dickens2020-03-305-55/+57
| | | | | | | Add C11, thread and visibility compiler flags. Enable additional warnings and errors. Unify spacing amongst the makefiles. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* build: Require C11 to build and clean up autoconfig/automake filesChris Dickens2020-03-301-10/+13
| | | | | | | | | | | | | | | | | | | | | | | C11 compiler support has been available for many years now. It is not unreasonable to require this now, and doing so allows some cleanup to the configure script. It is no longer necessary to check for compiler support of the '-fvibility' flag because any compiler that supports C11 will support this flag as well. Fix up the way that compiler and linker flags are passed down to the various makefiles. The compiler flags should be shared by all, but the linker flags and libraries should be separated between the library and the examples/tests. The visibility flag is only relevant for the library and the thread flags are only relevant for sources using thread constructs, so provide them as needed. Rearrange configure.ac to group similar functionality and consolidate where possible. Based on these changes, update the Travis configuration file to include newer versions of test platforms to ensure proper C11 compiler support. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* core: Kill the OS_* definitions and use in the source codeChris Dickens2020-03-271-3/+0
| | | | | | | These symbols are no longer necessary for the source code since commit cad7d0edd9 ("core: Kill usbi_os_backend structure definition madness"). Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* threads_posix: Improve usbi_get_tid() for various platformsChris Dickens2020-03-271-0/+3
| | | | | | | | | | | | | Add support for real thread IDs on macOS 10.6 and later using the new pthread_threadid_np() function. Add support for thread IDs on Haiku, NetBSD and Solaris. Provide a fallback value other than -1 when direct support is not available. This should suffice as a unique identifier since pthread_t, while opaque, is still distinct amongst active threads. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* configure.ac: Cleanup and refactoringChris Dickens2020-01-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the formatting consistent across the entire file. In particular: - Always quote strings whose values are derived - Use tabs consistently - Wrap all arguments with square brackets Replace the use of '-a' with '&&' to be more portable. Rearrange some of the feature checks to be conditional upon the platform or backend. For example, there is no need to check for nfds_t on Windows because poll() doesn't exist there. Similarly we now only check for timerfd on Linux and Solaris. This translates into slightly faster configure times. Explicitly define tokens for both the poll and thread implementations. This makes the preprocessor conditionals much nicer since it is not necessary to enumerate all possible OS_* tokens. Also replace POLL_NFDS_TYPE with a proper typedef that is based on the availability of the nfds_t type. Migrate to config definition names that are more consistent with autoconf. The check for timerfd actually verifies the presence of the library function instead of just the header definitions, and the token USBI_TIMERFD_AVAILABLE is now HAVE_TIMERFD. Similarly the check for syslog results in a definition of HAVE_SYSLOG. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Misc: Trim and consolidate header file usageChris Dickens2020-01-241-39/+9
| | | | | | | | | | | | | Refactor libusbi.h to include the set of common header files needed by every main source file in the library and change these source files to include libusbi.h first, followed by any non-common headers. Including libusbi.h first ensures that the config definitions are pulled in and will eliminate redundant includes in the individual sources files. Also clean up some whitespace errors and remove unnecessary definitions in the manually generated config.h files. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* core: Remove use of gettimeofday()Chris Dickens2017-01-121-3/+0
| | | | | | | | | | | | | | | | | Prior to this commit, gettimeofday() was being used for timestamps in debug messages. This function has been marked as deprecated in the latest POSIX specification and furthermore is not supported on Windows, thus requiring our own implementation as usbi_gettimeofday(). This commit changes the logging code to obtain timestamps using the clock_gettime() function provided by the backend. The implementation of usbi_gettimeofday() for Windows was actually equivalent to that of the USBI_CLOCK_REALTIME implementation for clock_gettime(), so this eliminates code duplication. In addition, the USBI_CLOCK_REALTIME implementation has been updated for Windows to leverage the timespec_get() function available in VS 2015 and later. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* core: Remove check for and inclusion of signal.hChris Dickens2017-01-121-3/+0
| | | | Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* android: update READMEWilliam Skellenger2016-03-061-1/+3
| | | | | | Added other $ARCH Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
* android: Fix typo in READMEWilliam Skellenger2016-03-061-1/+1
| | | | | | Remove the /sdcard copy and not the /system/lib copy Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
* Misc: Revert all references to libusb/libusb.infohjelmn@cs.unm.edu2014-01-081-1/+1
|
* Android: Add support for Linux/Android platformsKuangye Guo2013-12-281-9/+0
| | | | * Closes #154
* Android: Build for all Android architecturesAndrew Fernandes2013-12-281-1/+6
| | | | | | | * Don't limit support to ARM only (adds MIPS support) * Also add a workaround for a MIPS NDK linker bug * Also add a gitignore entry required to run bootstrap.sh on OS X * Closes #134
* Android: Add further documentation to Android README fileToby Gray2013-08-211-0/+90
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Android: Add examples and stress testsToby Gray2013-08-114-50/+248
|
* Android: Add formal Android supportToby Gray2013-08-114-0/+202
* Also fix an issue with LIBUSB_LOG_LEVEL_NONE