From: Uwe Hermann Date: Mon, 16 Apr 2012 21:16:00 +0000 (+0200) Subject: sr/srd: SR_API/SRD_API/etc. is a no-op on MinGW. X-Git-Tag: libsigrokdecode-0.1.0~1 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=a4cb05f748a1104faba456217a762befc4faf2f3 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. --- 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...