From a4cb05f748a1104faba456217a762befc4faf2f3 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 16 Apr 2012 23:16:00 +0200 Subject: 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. --- sigrokdecode.h.in | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sigrokdecode.h.in') 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... -- cgit v1.2.3-70-g09d2