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.
This commit is contained in:
parent
787c43905d
commit
69e70c233e
11
sigrok.h.in
11
sigrok.h.in
|
@ -115,14 +115,25 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
|
* 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
|
* Details: http://gcc.gnu.org/wiki/Visibility
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Marks public libsigrok API symbols. */
|
/* Marks public libsigrok API symbols. */
|
||||||
|
#ifndef _WIN32
|
||||||
#define SR_API __attribute__((visibility("default")))
|
#define SR_API __attribute__((visibility("default")))
|
||||||
|
#else
|
||||||
|
#define SR_API
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Marks private, non-public libsigrok symbols (not part of the API). */
|
/* Marks private, non-public libsigrok symbols (not part of the API). */
|
||||||
|
#ifndef _WIN32
|
||||||
#define SR_PRIV __attribute__((visibility("hidden")))
|
#define SR_PRIV __attribute__((visibility("hidden")))
|
||||||
|
#else
|
||||||
|
#define SR_PRIV
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef int (*sr_receive_data_callback_t)(int fd, int revents, void *cb_data);
|
typedef int (*sr_receive_data_callback_t)(int fd, int revents, void *cb_data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue