From 6eccd43bbac449f6fd939278381d0e6219ba2e16 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 27 Dec 2007 14:18:20 -0500 Subject: [PATCH] Use AC_HEADER_ASSERT to allow users to disable assertions. --- configure.ac | 1 + src/byteorder.h | 4 ++-- src/lbx.c | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 5883fd9..8458e71 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,7 @@ AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC_C99 +AC_HEADER_ASSERT AC_C_BIGENDIAN dnl Dirty hack to disable useless C++/Fortran checks diff --git a/src/byteorder.h b/src/byteorder.h index 5eb4daf..ea6c759 100644 --- a/src/byteorder.h +++ b/src/byteorder.h @@ -1,12 +1,12 @@ #ifndef BYTEORDER_H_ #define BYTEORDER_H_ -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include + static inline uint16_t _flip16(uint16_t val) { uint16_t hostval; diff --git a/src/lbx.c b/src/lbx.c index 8ddcf18..253da5e 100644 --- a/src/lbx.c +++ b/src/lbx.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #include #include -- 2.43.2