]> sigrok.org Git - libserialport.git/commitdiff
Build: Include config.h first in all source files
authorDaniel Elstner <redacted>
Sun, 13 Sep 2015 18:04:31 +0000 (20:04 +0200)
committerDaniel Elstner <redacted>
Sun, 13 Sep 2015 18:04:31 +0000 (20:04 +0200)
configure.ac
freebsd.c
libserialport_internal.h
linux.c
linux_termios.c
linux_termios.h
macosx.c
serialport.c
windows.c

index 5c372dd45e47875574eccc851d56d58945db1f6a..f5aaf9903446e014d0cd8f6c8a3b13de894ae1b9 100644 (file)
@@ -33,16 +33,11 @@ AC_CONFIG_HEADERS([config.h libserialport.h])
 AC_CONFIG_MACRO_DIR([autostuff])
 AC_CONFIG_AUX_DIR([autostuff])
 
 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
 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').
 #endif])
 
 # We require at least automake 1.11 (needed for 'silent rules').
index a1305b6ebdcfde05e6a25d9414395ba91256e0bc..b5cd91a2af52546188e6e1bd417aad53b93d46ea 100644 (file)
--- a/freebsd.c
+++ b/freebsd.c
@@ -76,6 +76,7 @@
  *    device description.
  */
 
  *    device description.
  */
 
+#include <config.h>
 #include <unistd.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdint.h>
 #include <stdlib.h>
index 5db81e5ba4b0782c22e448e89288104099618be5..a5fc7bc54bcebdcc639a9dbdf8470461eb612143 100644 (file)
@@ -21,7 +21,6 @@
 #ifndef LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
 #define LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
 
 #ifndef LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
 #define LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
 
-#include <config.h>
 
 #ifdef __linux__
 #define _BSD_SOURCE /* For timeradd, timersub, timercmp. */
 
 #ifdef __linux__
 #define _BSD_SOURCE /* For timeradd, timersub, timercmp. */
diff --git a/linux.c b/linux.c
index 1531f9276a7ae70cd9965e181b23623d7f4ca831..9016489fb16f95afcedc2db0c9d8d2c8feb5a1f3 100644 (file)
--- a/linux.c
+++ b/linux.c
@@ -18,6 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
index e23d187b0dac63210c203edfa3b177ab6d44980a..5083fff5ba6511b39499ac356f0596c5bfe1123e 100644 (file)
@@ -33,6 +33,7 @@
  * TCSETX/TCGETX ioctls used with struct termiox, others do not.
  */
 
  * TCSETX/TCGETX ioctls used with struct termiox, others do not.
  */
 
+#include <config.h>
 #include <stdlib.h>
 #include <linux/termios.h>
 #include "linux_termios.h"
 #include <stdlib.h>
 #include <linux/termios.h>
 #include "linux_termios.h"
index 213d7c5df9ad08ae09bbb4d10d95c4ad209ed126..e7c86e705b2c7fc78ba3c5e33e3a4f49c4f5599c 100644 (file)
@@ -21,7 +21,6 @@
 #define LIBSERIALPORT_LINUX_TERMIOS_H
 
 #include <stdlib.h>
 #define LIBSERIALPORT_LINUX_TERMIOS_H
 
 #include <stdlib.h>
-#include "config.h"
 
 SP_PRIV unsigned long get_termios_get_ioctl(void);
 SP_PRIV unsigned long get_termios_set_ioctl(void);
 
 SP_PRIV unsigned long get_termios_get_ioctl(void);
 SP_PRIV unsigned long get_termios_set_ioctl(void);
index b1e0b4579524ff716174d83f800564f8dc51bb96..f5f19448498f0f5de9819d7413ab180fade6ec7a 100644 (file)
--- a/macosx.c
+++ b/macosx.c
@@ -18,6 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
index 8c34d2227fb66ec3aea032ce343ff0a7d4b2c1ca..7b45229cca8281abf2cd9b1173ad031376ed8a76 100644 (file)
@@ -21,6 +21,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
index 60e88cc5eee9db3e18b89c4ac68c8be9608426d6..b4119187de70a820f7e44ac113a5da437c620c08 100644 (file)
--- a/windows.c
+++ b/windows.c
@@ -18,6 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "libserialport.h"
 #include "libserialport_internal.h"
 
 #include "libserialport.h"
 #include "libserialport_internal.h"