Эх сурвалжийг харах

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>
Tobias Doerffel 14 жил өмнө
parent
commit
3f10ef1dfb
3 өөрчлөгдсөн 0 нэмэгдсэн , 19 устгасан
  1. 0 1
      src/modbus-rtu.c
  2. 0 7
      src/modbus-tcp.c
  3. 0 11
      src/modbus.c

+ 0 - 1
src/modbus-rtu.c

@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <termios.h>
 #include <fcntl.h>
 #include <string.h>
 

+ 0 - 7
src/modbus-tcp.c

@@ -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"

+ 0 - 11
src/modbus.c

@@ -22,21 +22,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <stdint.h>
-#include <termios.h>
 #include <unistd.h>
 #include <errno.h>
 #include <limits.h>
 
-/* Add this for macros that defined unix flavor */
-#if (defined(__unix__) || defined(unix)) && !defined(USG)
-#include <sys/param.h>
-#endif
-
-#if !defined(UINT16_MAX)
-#define UINT16_MAX 0xFFFF
-#endif
-
 #include "modbus.h"
 #include "modbus-private.h"