From d9b9b45554b43d8c41eb1b8bd7c0421620cddcd4 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 15 Jun 2007 21:04:43 +0000 Subject: * cmake/ConfigureChecks.cmake,cmake/config.h.cmake: added check for HAVE_ERRNO_H * cmake/dbus/CMakeLists.txt: added missing files * dbus/dbus-transport-win.c/.h: new files * dbus/dbus-sysdeps-win.c,.h: added required _unix functions to make dbus compilable on win32 * dbus/dbus-sysdeps-win-utils.c,.h: moved some functions to dbus-sysdeps-win.c * dbus-win.patch: removed applied or obsolate patches Note: dbus-win32 is now compilable, no guarantee that it runs without any problems --- dbus-win.patch | 160 --------------------------------------------------------- 1 file changed, 160 deletions(-) (limited to 'dbus-win.patch') diff --git a/dbus-win.patch b/dbus-win.patch index 36db4f21..6ac028ae 100644 --- a/dbus-win.patch +++ b/dbus-win.patch @@ -1,92 +1,3 @@ -Index: bus/config-loader-expat.c -=================================================================== -RCS file: /cvs/dbus/dbus/bus/config-loader-expat.c,v -retrieving revision 1.10 -diff -u -r1.10 config-loader-expat.c ---- bus/config-loader-expat.c 10 Aug 2004 03:06:59 -0000 1.10 -+++ bus/config-loader-expat.c 8 Mar 2007 20:25:42 -0000 -@@ -161,6 +161,9 @@ - } - } - -+#ifdef DBUS_WIN -+DBusString *_dbus_get_working_dir(void); -+#endif - - BusConfigParser* - bus_config_load (const DBusString *file, -@@ -171,6 +174,9 @@ - XML_Parser expat; - const char *filename; - BusConfigParser *parser; -+#ifdef DBUS_WIN -+ DBusString *dbusdir; -+#endif - ExpatParseContext context; - DBusString dirname; - -@@ -209,6 +215,12 @@ - goto failed; - } - -+#ifdef DBUS_WIN -+ dbusdir = _dbus_get_working_dir(); -+ if (dbusdir) -+ parser = bus_config_parser_new (dbusdir, is_toplevel, parent); -+ else -+#endif - parser = bus_config_parser_new (&dirname, is_toplevel, parent); - if (parser == NULL) - { -Index: bus/config-loader-libxml.c -=================================================================== -RCS file: /cvs/dbus/dbus/bus/config-loader-libxml.c,v -retrieving revision 1.8 -diff -u -r1.8 config-loader-libxml.c ---- bus/config-loader-libxml.c 10 Aug 2004 03:06:59 -0000 1.8 -+++ bus/config-loader-libxml.c 8 Mar 2007 20:25:40 -0000 -@@ -134,6 +134,9 @@ - } - } - -+#ifdef DBUS_WIN -+ DBusString *_dbus_get_working_dir(void); -+#endif - - BusConfigParser* - bus_config_load (const DBusString *file, -@@ -147,7 +150,9 @@ - DBusString dirname, data; - DBusError tmp_error; - int ret; -- -+#ifdef DBUS_WIN -+ DBusString *dbusdir; -+#endif - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - parser = NULL; -@@ -177,13 +182,19 @@ - xmlSetGenericErrorFunc (NULL, xml_shut_up); - } - -+#ifdef DBUS_WIN -+ dbusdir = _dbus_get_working_dir(); -+ if (dbusdir) -+ parser = bus_config_parser_new (dbusdir, is_toplevel, parent); -+ else -+#endif - if (!_dbus_string_get_dirname (file, &dirname)) - { - _DBUS_SET_OOM (error); - goto failed; - } -- - parser = bus_config_parser_new (&dirname, is_toplevel, parent); -+ - if (parser == NULL) - { - _DBUS_SET_OOM (error); Index: bus/dispatch.c =================================================================== RCS file: /cvs/dbus/dbus/bus/dispatch.c,v @@ -94,15 +5,6 @@ retrieving revision 1.79 diff -u -r1.79 dispatch.c --- bus/dispatch.c 8 Mar 2007 08:30:17 -0000 1.79 +++ bus/dispatch.c 8 Mar 2007 20:25:42 -0000 -@@ -34,7 +34,7 @@ - #include "test.h" - #include - #include -- -+ - static dbus_bool_t - send_one_message (DBusConnection *connection, - BusContext *context, @@ -428,6 +428,11 @@ } } @@ -148,15 +50,6 @@ diff -u -r1.79 dispatch.c } } else -@@ -2812,7 +2833,7 @@ - return retval; - } - #endif -- -+ - #define TEST_ECHO_MESSAGE "Test echo message" - #define TEST_RUN_HELLO_FROM_SELF_MESSAGE "Test sending message to self" - @@ -4064,29 +4085,36 @@ _dbus_assert_not_reached ("initial connection setup failed"); } @@ -223,26 +116,6 @@ diff -u -r1.79 dispatch.c kill_client_connection_unchecked (foo); -Index: bus/main.c -=================================================================== -RCS file: /cvs/dbus/dbus/bus/main.c,v -retrieving revision 1.36 -diff -u -r1.36 main.c ---- bus/main.c 20 Dec 2006 06:18:19 -0000 1.36 -+++ bus/main.c 8 Mar 2007 20:25:40 -0000 -@@ -254,6 +254,12 @@ - dbus_bool_t print_pid; - int force_fork; - -+#ifdef _WIN32 -+ extern int _dbus_init_working_dir(char *s); -+ if (!_dbus_init_working_dir(argv[0])) -+ return 1; -+#endif -+ - if (!_dbus_string_init (&config_file)) - return 1; - Index: dbus/dbus-bus.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-bus.c,v @@ -468,24 +341,6 @@ diff -u -r1.36 dbus-threads.c } #endif /* DBUS_BUILD_TESTS */ -Index: dbus/dbus-transport-socket.h -=================================================================== -RCS file: /cvs/dbus/dbus/dbus/dbus-transport-socket.h,v -retrieving revision 1.2 -diff -u -r1.2 dbus-transport-socket.h ---- dbus/dbus-transport-socket.h 16 Sep 2006 19:24:08 -0000 1.2 -+++ dbus/dbus-transport-socket.h 8 Mar 2007 20:25:42 -0000 -@@ -25,6 +25,10 @@ - - #include - -+#if defined(DBUS_WIN) -+#include -+#endif -+ - DBUS_BEGIN_DECLS - - DBusTransport* _dbus_transport_new_for_socket (int fd, Index: dbus/dbus-transport.c =================================================================== RCS file: /cvs/dbus/dbus/dbus/dbus-transport.c,v @@ -493,21 +348,6 @@ retrieving revision 1.54 diff -u -r1.54 dbus-transport.c --- dbus/dbus-transport.c 17 Oct 2006 20:52:13 -0000 1.54 +++ dbus/dbus-transport.c 8 Mar 2007 20:25:42 -0000 -@@ -310,9 +310,11 @@ - DBusTransport **transport_p, - DBusError *error); - } open_funcs[] = { -- { _dbus_transport_open_socket }, -- { _dbus_transport_open_platform_specific }, -- { _dbus_transport_open_autolaunch } -+ { _dbus_transport_open_socket } -+#ifndef DBUS_WIN -+ , { _dbus_transport_open_platform_specific } -+#endif -+ , { _dbus_transport_open_autolaunch } - #ifdef DBUS_BUILD_TESTS - , { _dbus_transport_open_debug_pipe } - #endif @@ -674,7 +676,7 @@ if (transport->disconnected) return TRUE; -- cgit