Commit 3f10ef1dfb8dd98116f28a832cde0656e648c6fb
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>
Showing
3 changed files
with
0 additions
and
19 deletions
src/modbus-rtu.c
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 |