From 5d7cabc86c354bbca64df662024a747b034afb83 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Tue, 3 Jan 2012 01:42:09 +0100 Subject: [PATCH] Add missing C++ macros in public headers --- src/modbus-rtu.h | 4 ++++ src/modbus-tcp.h | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/modbus-rtu.h b/src/modbus-rtu.h index d34c965..67c740e 100644 --- a/src/modbus-rtu.h +++ b/src/modbus-rtu.h @@ -21,6 +21,8 @@ #include "modbus.h" +MODBUS_BEGIN_DECLS + /* Modbus_Application_Protocol_V1_1b.pdf Chapter 4 Section 1 Page 5 * RS232 / RS485 ADU = 253 bytes + slave (1 byte) + CRC (2 bytes) = 256 bytes */ @@ -42,4 +44,6 @@ int modbus_rtu_get_serial_mode(modbus_t *ctx); int modbus_rtu_set_rts(modbus_t *ctx, int mode); int modbus_rtu_get_rts(modbus_t *ctx); +MODBUS_END_DECLS + #endif /* _MODBUS_RTU_H_ */ diff --git a/src/modbus-tcp.h b/src/modbus-tcp.h index 582324d..e4f9a83 100644 --- a/src/modbus-tcp.h +++ b/src/modbus-tcp.h @@ -21,6 +21,8 @@ #include "modbus.h" +MODBUS_BEGIN_DECLS + #if defined(_WIN32) && !defined(__CYGWIN__) /* Win32 with MinGW, supplement to */ #include @@ -46,4 +48,6 @@ modbus_t* modbus_new_tcp_pi(const char *node, const char *service); int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection); int modbus_tcp_pi_accept(modbus_t *ctx, int *socket); +MODBUS_END_DECLS + #endif /* _MODBUS_TCP_H_ */ -- libgit2 0.21.4