changeset 22909:1c87e81c44fa

Bonjour build fixes for MSVC.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 12 May 2008 02:08:04 +0000
parents 67148f43fd2f
children 3f9877080462
files libpurple/protocols/bonjour/bonjour.c libpurple/protocols/bonjour/dns_sd_proxy.h libpurple/protocols/bonjour/jabber.c libpurple/protocols/bonjour/parser.c
diffstat 4 files changed, 39 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/bonjour.c	Mon May 12 02:03:13 2008 +0000
+++ b/libpurple/protocols/bonjour/bonjour.c	Mon May 12 02:08:04 2008 +0000
@@ -24,6 +24,7 @@
 #include <pwd.h>
 #else
 #define UNICODE
+#include <winsock2.h>
 #include <windows.h>
 #include <lm.h>
 #include "dns_sd_proxy.h"
--- a/libpurple/protocols/bonjour/dns_sd_proxy.h	Mon May 12 02:03:13 2008 +0000
+++ b/libpurple/protocols/bonjour/dns_sd_proxy.h	Mon May 12 02:08:04 2008 +0000
@@ -21,10 +21,13 @@
 #ifndef _DNS_SD_PROXY
 #define _DNS_SD_PROXY
 
+
+#ifndef _MSC_VER
 #include <stdint.h>
+#endif
 
 /* fixup to make pidgin compile against win32 bonjour */
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(_MSC_VER)
 #define _MSL_STDINT_H
 #endif
 
--- a/libpurple/protocols/bonjour/jabber.c	Mon May 12 02:03:13 2008 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Mon May 12 02:08:04 2008 +0000
@@ -39,7 +39,9 @@
 #endif
 
 #include <glib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <fcntl.h>
 
 #include "network.h"
--- a/libpurple/protocols/bonjour/parser.c	Mon May 12 02:03:13 2008 +0000
+++ b/libpurple/protocols/bonjour/parser.c	Mon May 12 02:08:04 2008 +0000
@@ -157,38 +157,38 @@
 }
 
 static xmlSAXHandler bonjour_parser_libxml = {
-	.internalSubset         = NULL,
-	.isStandalone           = NULL,
-	.hasInternalSubset      = NULL,
-	.hasExternalSubset      = NULL,
-	.resolveEntity          = NULL,
-	.getEntity              = NULL,
-	.entityDecl             = NULL,
-	.notationDecl           = NULL,
-	.attributeDecl          = NULL,
-	.elementDecl            = NULL,
-	.unparsedEntityDecl     = NULL,
-	.setDocumentLocator     = NULL,
-	.startDocument          = NULL,
-	.endDocument            = NULL,
-	.startElement           = NULL,
-	.endElement             = NULL,
-	.reference              = NULL,
-	.characters             = bonjour_parser_element_text_libxml,
-	.ignorableWhitespace    = NULL,
-	.processingInstruction  = NULL,
-	.comment                = NULL,
-	.warning                = NULL,
-	.error                  = NULL,
-	.fatalError             = NULL,
-	.getParameterEntity     = NULL,
-	.cdataBlock             = NULL,
-	.externalSubset         = NULL,
-	.initialized            = XML_SAX2_MAGIC,
-	._private               = NULL,
-	.startElementNs         = bonjour_parser_element_start_libxml,
-	.endElementNs           = bonjour_parser_element_end_libxml,
-	.serror                 = NULL
+	NULL,									/*internalSubset*/
+	NULL,									/*isStandalone*/
+	NULL,									/*hasInternalSubset*/
+	NULL,									/*hasExternalSubset*/
+	NULL,									/*resolveEntity*/
+	NULL,									/*getEntity*/
+	NULL,									/*entityDecl*/
+	NULL,									/*notationDecl*/
+	NULL,									/*attributeDecl*/
+	NULL,									/*elementDecl*/
+	NULL,									/*unparsedEntityDecl*/
+	NULL,									/*setDocumentLocator*/
+	NULL,									/*startDocument*/
+	NULL,									/*endDocument*/
+	NULL,									/*startElement*/
+	NULL,									/*endElement*/
+	NULL,									/*reference*/
+	bonjour_parser_element_text_libxml,		/*characters*/
+	NULL,									/*ignorableWhitespace*/
+	NULL,									/*processingInstruction*/
+	NULL,									/*comment*/
+	NULL,									/*warning*/
+	NULL,									/*error*/
+	NULL,									/*fatalError*/
+	NULL,									/*getParameterEntity*/
+	NULL,									/*cdataBlock*/
+	NULL,									/*externalSubset*/
+	XML_SAX2_MAGIC,							/*initialized*/
+	NULL,									/*_private*/
+	bonjour_parser_element_start_libxml,	/*startElementNs*/
+	bonjour_parser_element_end_libxml,		/*endElementNs*/
+	NULL									/*serror*/
 };
 
 void