There are several header files that are already included in modbus.h and thus do not have to be included in the C files. Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
@@ -18,7 +18,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include <termios.h>
#include <fcntl.h>
#include <string.h>
@@ -23,13 +23,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
-#if (defined OpenBSD) || (defined(__FreeBSD__ ) && __FreeBSD__ < 5)
-#include <netinet/in_systm.h>
-#endif
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
#include "modbus.h"
#include "modbus-private.h"
@@ -22,21 +22,10 @@
-#include <stdint.h>
#include <unistd.h>
#include <limits.h>
-/* Add this for macros that defined unix flavor */
-#if (defined(__unix__) || defined(unix)) && !defined(USG)
-#include <sys/param.h>
-
-#if !defined(UINT16_MAX)
-#define UINT16_MAX 0xFFFF