diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-01-22 17:39:14 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-01-24 11:22:49 -0800 |
commit | d5bb64b3dc438a0a03c66d08a7fd12de5543f538 (patch) | |
tree | db651da15f518b5cb0ab260bfab85c326586c931 /libusb/os/windows_common.c | |
parent | 21a163a3954a0f8ae647283f48215e3e3c8caaa2 (diff) | |
download | libusb-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 'libusb/os/windows_common.c')
-rw-r--r-- | libusb/os/windows_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libusb/os/windows_common.c b/libusb/os/windows_common.c index a8ee237..df05eaf 100644 --- a/libusb/os/windows_common.c +++ b/libusb/os/windows_common.c @@ -678,12 +678,12 @@ static int windows_cancel_transfer(struct usbi_transfer *itransfer) return priv->backend->cancel_transfer(itransfer); } -static int windows_handle_events(struct libusb_context *ctx, struct pollfd *fds, POLL_NFDS_TYPE nfds, int num_ready) +static int windows_handle_events(struct libusb_context *ctx, struct pollfd *fds, usbi_nfds_t nfds, int num_ready) { struct windows_context_priv *priv = _context_priv(ctx); struct usbi_transfer *itransfer; DWORD io_size, io_result; - POLL_NFDS_TYPE i; + usbi_nfds_t i; bool found; int transfer_fd; int r = LIBUSB_SUCCESS; |