Commit e3f2c133fa8d167f275bb93fff073fbbc4cdbf2f
1 parent
77eceb6a
Remove inclusion of config.h in modbus.h. Closes GH-3.
Reported by Ivan Giuliani <giuliani.v@gmail.com> It was not possible to use libmodbus outside of projects without config.h file. The inclusion has been removed from the public header. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
Showing
5 changed files
with
6 additions
and
3 deletions
configure.ac
| @@ -28,7 +28,7 @@ AC_CONFIG_SRCDIR([src/modbus.c]) | @@ -28,7 +28,7 @@ AC_CONFIG_SRCDIR([src/modbus.c]) | ||
| 28 | AC_CONFIG_HEADERS([config.h]) | 28 | AC_CONFIG_HEADERS([config.h]) |
| 29 | AM_INIT_AUTOMAKE([foreign]) | 29 | AM_INIT_AUTOMAKE([foreign]) |
| 30 | # enable nice build output on automake1.11 | 30 | # enable nice build output on automake1.11 |
| 31 | -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 31 | +#m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
| 32 | 32 | ||
| 33 | LIBMODBUS_VERSION_MAJOR=libmodbus_version_major | 33 | LIBMODBUS_VERSION_MAJOR=libmodbus_version_major |
| 34 | LIBMODBUS_VERSION_MINOR=libmodbus_version_minor | 34 | LIBMODBUS_VERSION_MINOR=libmodbus_version_minor |
src/modbus-private.h
src/modbus.c
src/modbus.h
| @@ -18,8 +18,6 @@ | @@ -18,8 +18,6 @@ | ||
| 18 | #ifndef _MODBUS_H_ | 18 | #ifndef _MODBUS_H_ |
| 19 | #define _MODBUS_H_ | 19 | #define _MODBUS_H_ |
| 20 | 20 | ||
| 21 | -#include <config.h> | ||
| 22 | - | ||
| 23 | /* Add this for macros that defined unix flavor */ | 21 | /* Add this for macros that defined unix flavor */ |
| 24 | #if (defined(__unix__) || defined(unix)) && !defined(USG) | 22 | #if (defined(__unix__) || defined(unix)) && !defined(USG) |
| 25 | #include <sys/param.h> | 23 | #include <sys/param.h> |
tests/unit-test.h