From: Juho Vähä-Herttua Date: Sat, 17 Mar 2012 10:05:03 +0000 (+0200) Subject: Export symbols when compiling windows DLL. X-Git-Tag: upstream/0.9.0~4^2~105 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f21dfeadfc3b08d5f35bd7e619b8deeffd3daa26;p=deb_shairplay.git Export symbols when compiling windows DLL. --- diff --git a/src/include/dnssd.h b/src/include/dnssd.h index 32f3c98..15576bb 100644 --- a/src/include/dnssd.h +++ b/src/include/dnssd.h @@ -1,5 +1,12 @@ #ifndef DNSSD_H #define DNSSD_H + +#if defined(WIN32) && defined(DLL_EXPORT) +# define DNSSD_API __declspec(dllexport) +#else +# define DNSSD_API +#endif + #ifdef __cplusplus extern "C" { #endif @@ -11,15 +18,16 @@ extern "C" { #define DNSSD_ERROR_PROCNOTFOUND 4 typedef struct dnssd_s dnssd_t; -dnssd_t *dnssd_init(const char *hwaddr, int hwaddrlen, int *error); -int dnssd_register_raop(dnssd_t *dnssd, const char *name, unsigned short port); -int dnssd_register_airplay(dnssd_t *dnssd, const char *name, unsigned short port); +DNSSD_API dnssd_t *dnssd_init(const char *hwaddr, int hwaddrlen, int *error); + +DNSSD_API int dnssd_register_raop(dnssd_t *dnssd, const char *name, unsigned short port); +DNSSD_API int dnssd_register_airplay(dnssd_t *dnssd, const char *name, unsigned short port); -void dnssd_unregister_raop(dnssd_t *dnssd); -void dnssd_unregister_airplay(dnssd_t *dnssd); +DNSSD_API void dnssd_unregister_raop(dnssd_t *dnssd); +DNSSD_API void dnssd_unregister_airplay(dnssd_t *dnssd); -void dnssd_destroy(dnssd_t *dnssd); +DNSSD_API void dnssd_destroy(dnssd_t *dnssd); #ifdef __cplusplus } diff --git a/src/include/raop.h b/src/include/raop.h index 4eb045c..13f60bb 100644 --- a/src/include/raop.h +++ b/src/include/raop.h @@ -1,5 +1,12 @@ #ifndef RAOP_H #define RAOP_H + +#if defined (WIN32) && defined(DLL_EXPORT) +# define RAOP_API __declspec(dllexport) +#else +# define RAOP_API +#endif + #ifdef __cplusplus extern "C" { #endif @@ -16,13 +23,13 @@ struct raop_callbacks_s { }; typedef struct raop_callbacks_s raop_callbacks_t; -raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey); -raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile); +RAOP_API raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey); +RAOP_API raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile); -int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen); -void raop_stop(raop_t *raop); +RAOP_API int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen); +RAOP_API void raop_stop(raop_t *raop); -void raop_destroy(raop_t *raop); +RAOP_API void raop_destroy(raop_t *raop); #ifdef __cplusplus }