summaryrefslogtreecommitdiff
path: root/sigrokdecode.h.in
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-04-16 23:16:00 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2012-04-16 23:16:00 +0200
commita4cb05f748a1104faba456217a762befc4faf2f3 (patch)
tree803d36bef8e75182477881c582c5e35614fc307c /sigrokdecode.h.in
parent53a07a6d287ecdd3a9831dd3778676edf6ee8a9e (diff)
downloadlibsigrokdecode-a4cb05f748a1104faba456217a762befc4faf2f3.tar.gz
libsigrokdecode-a4cb05f748a1104faba456217a762befc4faf2f3.zip
sr/srd: SR_API/SRD_API/etc. is a no-op on MinGW.
This avoids warnings on a MinGW build. The feature depends on ELF files, but MinGW/Windows uses PE files.
Diffstat (limited to 'sigrokdecode.h.in')
-rw-r--r--sigrokdecode.h.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/sigrokdecode.h.in b/sigrokdecode.h.in
index b158e37..ad7b602 100644
--- a/sigrokdecode.h.in
+++ b/sigrokdecode.h.in
@@ -105,14 +105,25 @@ extern "C" {
*
* This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
*
+ * This feature is not available on MinGW/Windows, as it is a feature of
+ * ELF files and MinGW/Windows uses PE files.
+ *
* Details: http://gcc.gnu.org/wiki/Visibility
*/
/* Marks public libsigrokdecode API symbols. */
+#ifndef _WIN32
#define SRD_API __attribute__((visibility("default")))
+#else
+#define SRD_API
+#endif
/* Marks private, non-public libsigrokdecode symbols (not part of the API). */
+#ifndef _WIN32
#define SRD_PRIV __attribute__((visibility("hidden")))
+#else
+#define SRD_PRIV
+#endif
/*
* When adding an output type, don't forget to...