Fix compilation on windows.
authorJuho Vähä-Herttua <juhovh@iki.fi>
Sat, 17 Mar 2012 11:01:23 +0000 (13:01 +0200)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 16 May 2012 21:33:31 +0000 (00:33 +0300)
src/lib/dnssd.c

index d2186e956ce6bf4a164547f40c2ef1863190f3db..3efaa97958755b3e7a7bde8dcd6bc89b482e3b70 100644 (file)
 
 #ifndef WIN32
 # include <dns_sd.h>
+# define DNSSD_STDCALL
 #else
 # include <stdint.h>
 # if !defined(EFI32) && !defined(EFI64)
-#  define DNSSD_API __stdcall
+#  define DNSSD_STDCALL __stdcall
 # else
-#  define DNSSD_API
+#  define DNSSD_STDCALL
 # endif
 
 typedef struct _DNSServiceRef_t *DNSServiceRef;
@@ -42,7 +43,7 @@ typedef union _TXTRecordRef_t { char PrivateData[16]; char *ForceNaturalAlignmen
 typedef uint32_t DNSServiceFlags;
 typedef int32_t  DNSServiceErrorType;
 
-typedef void (DNSSD_API *DNSServiceRegisterReply)
+typedef void (DNSSD_STDCALL *DNSServiceRegisterReply)
     (
     DNSServiceRef                       sdRef,
     DNSServiceFlags                     flags,
@@ -54,7 +55,7 @@ typedef void (DNSSD_API *DNSServiceRegisterReply)
     );
 #endif
 
-typedef DNSServiceErrorType (DNSSD_API *DNSServiceRegister_t)
+typedef DNSServiceErrorType (DNSSD_STDCALL *DNSServiceRegister_t)
     (
     DNSServiceRef                       *sdRef,
     DNSServiceFlags                     flags,
@@ -69,23 +70,23 @@ typedef DNSServiceErrorType (DNSSD_API *DNSServiceRegister_t)
     DNSServiceRegisterReply             callBack,
     void                                *context
     );
-typedef void (DNSSD_API *DNSServiceRefDeallocate_t)(DNSServiceRef sdRef);
-typedef void (DNSSD_API *TXTRecordCreate_t)
+typedef void (DNSSD_STDCALL *DNSServiceRefDeallocate_t)(DNSServiceRef sdRef);
+typedef void (DNSSD_STDCALL *TXTRecordCreate_t)
     (
     TXTRecordRef     *txtRecord,
     uint16_t         bufferLen,
     void             *buffer
     );
-typedef void (DNSSD_API *TXTRecordDeallocate_t)(TXTRecordRef *txtRecord);
-typedef DNSServiceErrorType (DNSSD_API *TXTRecordSetValue_t)
+typedef void (DNSSD_STDCALL *TXTRecordDeallocate_t)(TXTRecordRef *txtRecord);
+typedef DNSServiceErrorType (DNSSD_STDCALL *TXTRecordSetValue_t)
     (
     TXTRecordRef     *txtRecord,
     const char       *key,
     uint8_t          valueSize,
     const void       *value
     );
-typedef uint16_t (DNSSD_API *TXTRecordGetLength_t)(const TXTRecordRef *txtRecord);
-typedef const void * (DNSSD_API *TXTRecordGetBytesPtr_t)(const TXTRecordRef *txtRecord);
+typedef uint16_t (DNSSD_STDCALL *TXTRecordGetLength_t)(const TXTRecordRef *txtRecord);
+typedef const void * (DNSSD_STDCALL *TXTRecordGetBytesPtr_t)(const TXTRecordRef *txtRecord);
 
 
 struct dnssd_s {