Skip to content

Commit 5b4e9a3

Browse files
committed
fix some windows stuffs
1 parent 1edda23 commit 5b4e9a3

File tree

8 files changed

+26
-5
lines changed

8 files changed

+26
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ CPMAddPackage(
5252
NAME struc
5353
GITHUB_REPOSITORY rayandrews/struc
5454
VERSION 1
55-
GIT_TAG 44e3c94a4f244aaa600f08353ae270c8f686ab09
55+
GIT_TAG f775d24f26f6053be1db95055ffcb5a55894a5a3
5656
)
5757

5858
# Asio2

include/modbuscpp/details/constants.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
#include <cstdint>
55
#include <string_view>
66

7+
#if defined(WIN32) || defined(_WIN32) \
8+
|| defined(__WIN32) && !defined(__CYGWIN__)
9+
# undef exception_code
10+
#endif
11+
712
namespace modbus {
813
namespace constants {
914
/**

include/modbuscpp/details/exception.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
#include "constants.hpp"
1111
#include "types.hpp"
1212

13+
#if defined(WIN32) || defined(_WIN32) \
14+
|| defined(__WIN32) && !defined(__CYGWIN__)
15+
# undef exception_code
16+
#endif
17+
1318
namespace modbus {
1419
namespace ex {
1520
// forward declarations

include/modbuscpp/details/response.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
#include "exception.hpp"
1212
#include "types.hpp"
1313

14+
#if defined(WIN32) || defined(_WIN32) \
15+
|| defined(__WIN32) && !defined(__CYGWIN__)
16+
# undef exception_code
17+
#endif
18+
1419
namespace modbus {
1520
// forward declarations
1621
namespace ex {

include/modbuscpp/details/types.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <type_traits>
77
#include <vector>
88

9-
#include <fmt/compile.h>
109
#include <fmt/format.h>
1110

1211
#include "constants.hpp"

include/modbuscpp/modbus.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,19 @@
77

88
#pragma GCC system_header
99

10+
#if defined(WIN32) || defined(_WIN32) \
11+
|| defined(__WIN32) && !defined(__CYGWIN__)
12+
# undef exception_code
13+
#endif
14+
1015
#include "details/asio2.hpp"
1116
#include "details/struct.hpp"
1217

1318
#include "details/constants.hpp"
14-
#include "details/exception.hpp"
1519
#include "details/types.hpp"
20+
21+
#include "details/exception.hpp"
22+
1623
#include "details/utilities.hpp"
1724

1825
#include "details/logger.hpp"

standalone/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CPMAddPackage(
2828
NAME struc
2929
GITHUB_REPOSITORY rayandrews/struc
3030
VERSION 1
31-
GIT_TAG 44e3c94a4f244aaa600f08353ae270c8f686ab09
31+
GIT_TAG f775d24f26f6053be1db95055ffcb5a55894a5a3
3232
)
3333

3434
CPMAddPackage(NAME modbuscpp SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ CPMAddPackage(
3535
NAME struc
3636
GITHUB_REPOSITORY rayandrews/struc
3737
VERSION 1
38-
GIT_TAG 44e3c94a4f244aaa600f08353ae270c8f686ab09
38+
GIT_TAG f775d24f26f6053be1db95055ffcb5a55894a5a3
3939
)
4040

4141
if(TEST_INSTALLED_VERSION)

0 commit comments

Comments
 (0)