diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-01-22 15:53:17 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-01-24 11:21:27 -0800 |
commit | aaff15d48d1b8555aabf012b06bf39bf8aa4768a (patch) | |
tree | 1eebfa64f672df87806852b00afb2b924b4b5eae /libusb/core.c | |
parent | 325e5ac8ddf2cb100a47e39185bc9f134d3b2f98 (diff) | |
download | libusb-aaff15d48d1b8555aabf012b06bf39bf8aa4768a.tar.gz |
Misc: Trim and consolidate header file usage
Refactor libusbi.h to include the set of common header files needed by
every main source file in the library and change these source files to
include libusbi.h first, followed by any non-common headers. Including
libusbi.h first ensures that the config definitions are pulled in and
will eliminate redundant includes in the individual sources files.
Also clean up some whitespace errors and remove unnecessary definitions
in the manually generated config.h files.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/core.c')
-rw-r--r-- | libusb/core.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/libusb/core.c b/libusb/core.c index 26df871..bf68984 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -20,30 +20,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" +#include "libusbi.h" +#include "hotplug.h" -#include <errno.h> -#include <stdarg.h> +#ifdef __ANDROID__ +#include <android/log.h> +#endif #include <stdio.h> -#include <stdlib.h> #include <string.h> -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif #ifdef HAVE_SYSLOG_H #include <syslog.h> #endif -#ifdef __ANDROID__ -#include <android/log.h> -#endif - -#include "libusbi.h" -#include "hotplug.h" - struct libusb_context *usbi_default_context = NULL; static const struct libusb_version libusb_version_internal = { LIBUSB_MAJOR, LIBUSB_MINOR, LIBUSB_MICRO, LIBUSB_NANO, |