Build: Include config.h first in all source files

This commit is contained in:
Daniel Elstner 2015-09-13 20:04:31 +02:00
parent 962143bc5c
commit 1a584c45b0
9 changed files with 6 additions and 7 deletions

View File

@ -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').

View File

@ -76,6 +76,7 @@
* device description.
*/
#include <config.h>
#include <unistd.h>
#include <stdint.h>
#include <stdlib.h>

View File

@ -21,7 +21,6 @@
#ifndef LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
#define LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
#include <config.h>
#ifdef __linux__
#define _BSD_SOURCE /* For timeradd, timersub, timercmp. */

View File

@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "libserialport.h"
#include "libserialport_internal.h"

View File

@ -33,6 +33,7 @@
* TCSETX/TCGETX ioctls used with struct termiox, others do not.
*/
#include <config.h>
#include <stdlib.h>
#include <linux/termios.h>
#include "linux_termios.h"

View File

@ -21,7 +21,6 @@
#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);

View File

@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "libserialport.h"
#include "libserialport_internal.h"

View File

@ -21,6 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "libserialport.h"
#include "libserialport_internal.h"

View File

@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "libserialport.h"
#include "libserialport_internal.h"