utils: convenience functions

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_adsb: fix threading

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_test: useful ppm

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_power: fix dBm math

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_fm: overhaul

Signed-off-by: Steve Markgraf <steve@steve-m.de>
lib: speed up exiting from async handler

Now we're using libusb_handle_events_timeout_completed()
instead of the deprecated libusb_handle_events_timeout(),
and notify our async state machine when rtlsdr_cancel_async()
is called. This speeds up exiting from any program that uses the
device asynchronously.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
lib: add SVEON STV27, sort device list

Signed-off-by: Steve Markgraf <steve@steve-m.de>
lib/cmake: check for libusb_handle_events_timeout_completed()

libusb < 1.0.9 doesn't have libusb_handle_events_timeout_completed(),
but libusb <= 1.0.8 doesn't have version.h, so we need to check
for the function.

The cmake-code was borrowed from UHD, which also checks
for libusb_error_name(), we add that as well since it might come
handy later on.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
unbreak automake build

after the latest sublib changes we got:
src/Makefile.am:31: compiling `convenience/convenience.c' in
subdir requires `AM_PROG_CC_C_O' in `configure.ac'

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_fm/rtl_test: fix build with MSVC after recent changes

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_tcp: fix warning

Signed-off-by: Steve Markgraf <steve@steve-m.de>
cflags: add -Wdeclaration-after-statement

This allows people working on the code to spot the
most common error that breaks the MSVC build

Signed-off-by: Steve Markgraf <steve@steve-m.de>
rtl_test: monotonic from MikeT