Index: tools/getopt_win.cpp
===================================================================
--- tools/getopt_win.cpp	(revision 0)
+++ tools/getopt_win.cpp	(revision 0)
@@ -0,0 +1,69 @@
+
+
+char *optarg = NULL;	// global argument pointer
+int   optind = 0; 	// global argv index
+int   opterr = 0; 	
+
+int getopt(int argc, char **argv, const char *optstring)
+{
+	static char *next = NULL;
+	char c = '?';
+	if (optind == 0)
+		next = NULL;
+
+	optarg = NULL;
+
+	if (next == NULL || *next == '\0')
+	{
+		if (optind == 0)
+			optind++;
+
+		if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0')
+		{
+			optarg = NULL;
+			if (optind < argc)
+				optarg = argv[optind];
+			return -1;
+		}
+
+		if (strcmp(argv[optind], "--") == 0)
+		{
+			optind++;
+			optarg = NULL;
+			if (optind < argc)
+				optarg = argv[optind];
+			return -1;
+		}
+
+		next = argv[optind];
+		next++;		// skip past -
+		optind++;
+	}
+
+	c = *next++;
+	const char *cp = strchr(optstring, c);
+
+	if (cp == NULL || c == ':')
+		return '?';
+
+	cp++;
+	if (*cp == ':')
+	{
+		if (*next != '\0')
+		{
+			optarg = next;
+			next = NULL;
+		}
+		else if (optind < argc)
+		{
+			optarg = argv[optind];
+			optind++;
+		}
+		else
+		{
+			return '?';
+		}
+	}
+
+	return c;
+}

Property changes on: tools/getopt_win.cpp
___________________________________________________________________
Name: svn:eol-style
   + native

Index: tools/dbuscpp2xml.cpp
===================================================================
--- tools/dbuscpp2xml.cpp	(revision 560876)
+++ tools/dbuscpp2xml.cpp	(working copy)
@@ -34,9 +34,15 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <unistd.h>
 #include <stdlib.h>
 
+#ifdef Q_OS_WIN
+#include <process.h>
+#include "getopt_win.cpp"
+#else
+#include <unistd.h>
+#endif
+
 #include "qdbusconnection.h"    // for the Export* flags
 
 // copied from dbus-protocol.h:
Index: tools/dbusxml2cpp.cpp
===================================================================
--- tools/dbusxml2cpp.cpp	(revision 560876)
+++ tools/dbusxml2cpp.cpp	(working copy)
@@ -24,7 +24,6 @@
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 
 #include <QtCore/qbytearray.h>
 #include <QtCore/qdatetime.h>
@@ -34,6 +33,13 @@
 #include <QtCore/qtextstream.h>
 #include <QtCore/qset.h>
 
+#ifdef Q_OS_WIN
+#include <process.h>
+#include "getopt_win.cpp"
+#else
+#include <unistd.h>
+#endif
+
 #include <QtDBus>
 #include "private/qdbusmetaobject_p.h"
 #include "private/qdbusintrospection_p.h"
Index: tools/dbus.pro
===================================================================
--- tools/dbus.pro	(revision 560876)
+++ tools/dbus.pro	(working copy)
@@ -1,6 +1,6 @@
 SOURCES = dbus.cpp
 TARGET = ../../../bin/dbus
-QT = core
+QT = core xml
 CONFIG += qdbus
 target.path=$$[QT_INSTALL_BINS]
 INSTALLS += target
Index: src/src.pro
===================================================================
--- src/src.pro	(revision 560876)
+++ src/src.pro	(working copy)
@@ -48,6 +48,11 @@
    else:QMAKE_PKGCONFIG_NAME = QtDBus
 }
 
+win32 {
+    LIBS += $$(DBUSDIR)/lib/dbus-1.lib ws2_32.lib advapi32.lib netapi32.lib 
+    INCLUDEPATH += . $$(DBUSDIR)/include  
+}
+
 #load up the headers info
 CONFIG += qt_install_headers
 HEADERS_PRI = $$QT_BUILD_TREE/include/QtDBus/headers.pri
Index: src/qdbusmacros.h
===================================================================
--- src/qdbusmacros.h	(revision 560876)
+++ src/qdbusmacros.h	(working copy)
@@ -45,6 +45,9 @@
 #include <QtCore/qset.h>
 #include <QtCore/qhash.h>
 #include <QtCore/qvector.h>
+class QDBusType;
+inline uint qHash(const QVariant&)  { Q_ASSERT(0); return 0; }
+inline uint qHash(const QDBusType&) { Q_ASSERT(0); return 0; }
 #endif
 
 QT_END_HEADER
