summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-01-22 17:39:14 -0800
committerChris Dickens <christopher.a.dickens@gmail.com>2020-01-24 11:22:49 -0800
commitd5bb64b3dc438a0a03c66d08a7fd12de5543f538 (patch)
treedb651da15f518b5cb0ab260bfab85c326586c931 /android
parent21a163a3954a0f8ae647283f48215e3e3c8caaa2 (diff)
downloadlibusb-d5bb64b3dc438a0a03c66d08a7fd12de5543f538.tar.gz
configure.ac: Cleanup and refactoring
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>
Diffstat (limited to 'android')
-rw-r--r--android/config.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/android/config.h b/android/config.h
index e880d1e..9b95bb2 100644
--- a/android/config.h
+++ b/android/config.h
@@ -29,14 +29,20 @@
/* Define to 1 if you have the <asm/types.h> header file. */
#define HAVE_ASM_TYPES_H 1
+/* Define to 1 if the system has the type `nfds_t'. */
+#define HAVE_NFDS_T 1
+
+/* Define to 1 if you have the `pipe2' function. */
+#define HAVE_PIPE2 1
+
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Linux backend */
#define OS_LINUX 1
-/* type of second poll() argument */
-#define POLL_NFDS_TYPE nfds_t
+/* Use POSIX poll() implementation */
+#define POLL_POSIX 1
/* Use POSIX Threads */
#define THREADS_POSIX 1