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/sunos_usb.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/sunos_usb.c')
-rw-r--r-- | libusb/os/sunos_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libusb/os/sunos_usb.c b/libusb/os/sunos_usb.c index 9d42b8a..85d0fdf 100644 --- a/libusb/os/sunos_usb.c +++ b/libusb/os/sunos_usb.c @@ -1641,7 +1641,7 @@ sunos_usb_get_status(int fd) return (status); } -#ifdef USBI_TIMERFD_AVAILABLE +#ifdef HAVE_TIMERFD static clockid_t op_get_timerfd_clockid(void) { return CLOCK_MONOTONIC; @@ -1672,7 +1672,7 @@ const struct usbi_os_backend usbi_backend = { .cancel_transfer = sunos_cancel_transfer, .handle_transfer_completion = sunos_handle_transfer_completion, .clock_gettime = sunos_clock_gettime, -#ifdef USBI_TIMERFD_AVAILABLE +#ifdef HAVE_TIMERFD .get_timerfd_clockid = op_get_timerfd_clockid, #endif .device_priv_size = sizeof(sunos_dev_priv_t), |