summaryrefslogtreecommitdiff
path: root/irmp/irmp-main-sharedlib.c
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2020-02-23 05:26:18 +0100
committerGerhard Sittig <gerhard.sittig@gmx.net>2020-07-18 15:32:08 +0200
commitab88bae1c7b966e686b313625dd799a522e2093e (patch)
tree446ac07d4962883a4c219ffaa4a47e0cc67ca5df /irmp/irmp-main-sharedlib.c
parent2a295b87d7f7f9fc8121b9ff61dd3ea430aa5567 (diff)
downloadlibsigrokdecode-ab88bae1c7b966e686b313625dd799a522e2093e.tar.gz
libsigrokdecode-ab88bae1c7b966e686b313625dd799a522e2093e.zip
irmp: workaround incomplete platform detection when under libtool
The upstream IRMP project builds fine with direct gcc(1) invocation. While the same imported source fails detection and then defaults to AVR when built under libtool in the libsigrokdecode setup. Provide the symbols which IRMP logic expects, to reduce changes against upstream sources. Derive these symbols from conditions that are checked in the sigrok project in other locations, too.
Diffstat (limited to 'irmp/irmp-main-sharedlib.c')
-rw-r--r--irmp/irmp-main-sharedlib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/irmp/irmp-main-sharedlib.c b/irmp/irmp-main-sharedlib.c
index 570df95..6f5c058 100644
--- a/irmp/irmp-main-sharedlib.c
+++ b/irmp/irmp-main-sharedlib.c
@@ -23,7 +23,18 @@
* Include the IRMP core logic. This approach is required because of
* static variables which hold internal state. The core logic started
* as an MCU project where resources are severely constrained.
+ *
+ * This libsigrokdecode incarnation of IRMP will always be used in the
+ * UNIX_OR_WINDOWS configuration. But libtool(1) breaks the upstream
+ * logic's platform detection. Check reliably available conditions here
+ * and provide expected symbols to the library, to reduce changes to the
+ * upstream project.
*/
+#if defined _WIN32
+# define WIN32
+#else
+# define unix
+#endif
#include "irmp.h"
#include "irmp.c"