summaryrefslogtreecommitdiff
path: root/msvc
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 /msvc
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 'msvc')
-rw-r--r--msvc/config.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/msvc/config.h b/msvc/config.h
index ad3dcaa..840c8df 100644
--- a/msvc/config.h
+++ b/msvc/config.h
@@ -41,8 +41,11 @@
/* Windows backend */
#define OS_WINDOWS 1
-/* type of second poll() argument */
-#define POLL_NFDS_TYPE unsigned int
+/* Use Windows poll() implementation */
+#define POLL_WINDOWS 1
+
+/* Use Windows Threads */
+#define THREADS_WINDOWS 1
/* Uncomment to enabling output to system log */
// #define USE_SYSTEM_LOGGING_FACILITY