1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
From 907c28e0ed8785b527696b2036e6dc454975240b Mon Sep 17 00:00:00 2001
From: Lars Kanis <lars.kanis@sincnovation.com>
Date: Thu, 13 Feb 2025 10:19:11 +0100
Subject: [PATCH 10/10] Avoid compiler waring about redefinition:
warning: "PURGE_RXABORT" redefined
581 | #define PURGE_RXABORT 0x02
| ^~~~~~~~~~~~~
In file included from C:/msys64/ucrt64/include/windows.h:70,
---
ext/native/win_serialport_impl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ext/native/win_serialport_impl.c b/ext/native/win_serialport_impl.c
index 0cfb77e..2b7abe6 100644
--- a/ext/native/win_serialport_impl.c
+++ b/ext/native/win_serialport_impl.c
@@ -578,8 +578,12 @@ VALUE RB_SERIAL_EXPORT sp_get_dtr_impl(VALUE self)
return self;
}
+#ifndef PURGE_RXABORT
#define PURGE_RXABORT 0x02
+#endif
+#ifndef PURGE_RXCLEAR
#define PURGE_RXCLEAR 0x08
+#endif
VALUE RB_SERIAL_EXPORT sp_flush_input_data_impl(VALUE self)
{
BOOL ret;
@@ -594,8 +598,12 @@ VALUE RB_SERIAL_EXPORT sp_flush_input_data_impl(VALUE self)
return Qtrue;
}
+#ifndef PURGE_TXABORT
#define PURGE_TXABORT 0x01
+#endif
+#ifndef PURGE_TXCLEAR
#define PURGE_TXCLEAR 0x04
+#endif
VALUE RB_SERIAL_EXPORT sp_flush_output_data_impl(VALUE self)
{
BOOL ret;
--
2.39.5
|