Commit 3f10ef1dfb8dd98116f28a832cde0656e648c6fb

Authored by Tobias Doerffel
Committed by Stéphane Raimbault
1 parent 057be70d

Removed duplicate header inclusions

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>
src/modbus-rtu.c
@@ -18,7 +18,6 @@ @@ -18,7 +18,6 @@
18 #include <stdio.h> 18 #include <stdio.h>
19 #include <stdlib.h> 19 #include <stdlib.h>
20 #include <errno.h> 20 #include <errno.h>
21 -#include <termios.h>  
22 #include <fcntl.h> 21 #include <fcntl.h>
23 #include <string.h> 22 #include <string.h>
24 23
src/modbus-tcp.c
@@ -23,13 +23,6 @@ @@ -23,13 +23,6 @@
23 #include <sys/types.h> 23 #include <sys/types.h>
24 #include <sys/socket.h> 24 #include <sys/socket.h>
25 #include <sys/ioctl.h> 25 #include <sys/ioctl.h>
26 -#if (defined OpenBSD) || (defined(__FreeBSD__ ) && __FreeBSD__ < 5)  
27 -#include <netinet/in_systm.h>  
28 -#endif  
29 -#include <netinet/in.h>  
30 -#include <netinet/ip.h>  
31 -#include <netinet/tcp.h>  
32 -#include <arpa/inet.h>  
33 26
34 #include "modbus.h" 27 #include "modbus.h"
35 #include "modbus-private.h" 28 #include "modbus-private.h"
src/modbus.c
@@ -22,21 +22,10 @@ @@ -22,21 +22,10 @@
22 #include <stdio.h> 22 #include <stdio.h>
23 #include <string.h> 23 #include <string.h>
24 #include <stdlib.h> 24 #include <stdlib.h>
25 -#include <stdint.h>  
26 -#include <termios.h>  
27 #include <unistd.h> 25 #include <unistd.h>
28 #include <errno.h> 26 #include <errno.h>
29 #include <limits.h> 27 #include <limits.h>
30 28
31 -/* Add this for macros that defined unix flavor */  
32 -#if (defined(__unix__) || defined(unix)) && !defined(USG)  
33 -#include <sys/param.h>  
34 -#endif  
35 -  
36 -#if !defined(UINT16_MAX)  
37 -#define UINT16_MAX 0xFFFF  
38 -#endif  
39 -  
40 #include "modbus.h" 29 #include "modbus.h"
41 #include "modbus-private.h" 30 #include "modbus-private.h"
42 31