From 1a584c45b02456ebcb197ba801b0ceae810e84e3 Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Sun, 13 Sep 2015 20:04:31 +0200 Subject: [PATCH] Build: Include config.h first in all source files --- configure.ac | 5 ----- freebsd.c | 1 + libserialport_internal.h | 1 - linux.c | 1 + linux_termios.c | 1 + linux_termios.h | 1 - macosx.c | 1 + serialport.c | 1 + windows.c | 1 + 9 files changed, 6 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 5c372dd..f5aaf99 100644 --- a/configure.ac +++ b/configure.ac @@ -33,16 +33,11 @@ AC_CONFIG_HEADERS([config.h libserialport.h]) AC_CONFIG_MACRO_DIR([autostuff]) AC_CONFIG_AUX_DIR([autostuff]) -AH_TOP([#ifndef SP_CONFIG_H -#define SP_CONFIG_H]) - AH_BOTTOM([#if HAVE_STRUCT_TERMIOS_C_ISPEED && HAVE_STRUCT_TERMIOS_C_OSPEED # define HAVE_TERMIOS_SPEED 1 #endif #if HAVE_STRUCT_TERMIOS2_C_ISPEED && HAVE_STRUCT_TERMIOS2_C_OSPEED # define HAVE_TERMIOS2_SPEED 1 -#endif - #endif]) # We require at least automake 1.11 (needed for 'silent rules'). diff --git a/freebsd.c b/freebsd.c index a1305b6..b5cd91a 100644 --- a/freebsd.c +++ b/freebsd.c @@ -76,6 +76,7 @@ * device description. */ +#include #include #include #include diff --git a/libserialport_internal.h b/libserialport_internal.h index 5db81e5..a5fc7bc 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -21,7 +21,6 @@ #ifndef LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H #define LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H -#include #ifdef __linux__ #define _BSD_SOURCE /* For timeradd, timersub, timercmp. */ diff --git a/linux.c b/linux.c index 1531f92..9016489 100644 --- a/linux.c +++ b/linux.c @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include #include "libserialport.h" #include "libserialport_internal.h" diff --git a/linux_termios.c b/linux_termios.c index e23d187..5083fff 100644 --- a/linux_termios.c +++ b/linux_termios.c @@ -33,6 +33,7 @@ * TCSETX/TCGETX ioctls used with struct termiox, others do not. */ +#include #include #include #include "linux_termios.h" diff --git a/linux_termios.h b/linux_termios.h index 213d7c5..e7c86e7 100644 --- a/linux_termios.h +++ b/linux_termios.h @@ -21,7 +21,6 @@ #define LIBSERIALPORT_LINUX_TERMIOS_H #include -#include "config.h" SP_PRIV unsigned long get_termios_get_ioctl(void); SP_PRIV unsigned long get_termios_set_ioctl(void); diff --git a/macosx.c b/macosx.c index b1e0b45..f5f1944 100644 --- a/macosx.c +++ b/macosx.c @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include #include "libserialport.h" #include "libserialport_internal.h" diff --git a/serialport.c b/serialport.c index 8c34d22..7b45229 100644 --- a/serialport.c +++ b/serialport.c @@ -21,6 +21,7 @@ * along with this program. If not, see . */ +#include #include "libserialport.h" #include "libserialport_internal.h" diff --git a/windows.c b/windows.c index 60e88cc..b411918 100644 --- a/windows.c +++ b/windows.c @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include #include "libserialport.h" #include "libserialport_internal.h"