core: Make use of headers consistent across all files

* Include config.h before anything else in all files
* Remove unnecessary inclusion of libusb.h
* Use angle brackets for system headers and quotes for local headers

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
This commit is contained in:
Chris Dickens
2014-09-03 11:50:47 -07:00
parent 8035a77489
commit d8a2950f54
17 changed files with 31 additions and 18 deletions
+2
View File
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <config.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
+2 -1
View File
@@ -19,7 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include <config.h>
#include <assert.h>
#include <errno.h>
#include <stdint.h>
+3 -3
View File
@@ -21,7 +21,7 @@
#ifndef LIBUSBI_H
#define LIBUSBI_H
#include "config.h"
#include <config.h>
#include <stdlib.h>
@@ -32,10 +32,10 @@
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#ifdef HAVE_MISSING_H
#include "missing.h"
#include <missing.h>
#endif
#include "libusb.h"
#include "version.h"
+4 -4
View File
@@ -20,10 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "libusb.h"
#include "libusbi.h"
#include "linux_usbfs.h"
#include <config.h>
#include <ctype.h>
#include <dirent.h>
@@ -53,6 +50,9 @@
#include <linux/filter.h>
#endif
#include "libusbi.h"
#include "linux_usbfs.h"
#define KERNEL 1
static int linux_netlink_socket = -1;
+1 -2
View File
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include <config.h>
#include <assert.h>
#include <ctype.h>
@@ -39,7 +39,6 @@
#include <unistd.h>
#include <libudev.h>
#include "libusb.h"
#include "libusbi.h"
#include "linux_usbfs.h"
-1
View File
@@ -38,7 +38,6 @@
#include <sys/utsname.h>
#include <unistd.h>
#include "libusb.h"
#include "libusbi.h"
#include "linux_usbfs.h"
+2 -1
View File
@@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <config.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -28,7 +30,6 @@
#include <dev/usb/usb.h>
#include "libusb.h"
#include "libusbi.h"
struct device_priv {
+2 -1
View File
@@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <config.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -28,7 +30,6 @@
#include <dev/usb/usb.h>
#include "libusb.h"
#include "libusbi.h"
struct device_priv {
+2
View File
@@ -18,6 +18,8 @@
*
*/
#include <config.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
+2
View File
@@ -40,6 +40,8 @@
* with a fake pipe. The read/write functions are only meant to be used in that
* context.
*/
#include <config.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+2
View File
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <config.h>
#if defined(__linux__) || defined(__OpenBSD__)
# if defined(__linux__)
# define _GNU_SOURCE
+1
View File
@@ -19,6 +19,7 @@
*/
#include <config.h>
#include <objbase.h>
#include <errno.h>
#include <stdarg.h>
+2 -1
View File
@@ -22,12 +22,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <libusbi.h>
#include <config.h>
#include <stdint.h>
#include <errno.h>
#include <inttypes.h>
#include "libusbi.h"
#include "wince_usb.h"
// Forward declares
+1
View File
@@ -23,6 +23,7 @@
*/
#include <config.h>
#include <windows.h>
#include <setupapi.h>
#include <ctype.h>
+2 -2
View File
@@ -16,13 +16,13 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include <config.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include "libusb.h"
#include "libusbi.h"
#if defined(_MSC_VER)
+2 -1
View File
@@ -17,7 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include <config.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
+1 -1
View File
@@ -1 +1 @@
#define LIBUSB_NANO 10914
#define LIBUSB_NANO 10916