Commit 51e88a91 authored by Ralf Habacker's avatar Ralf Habacker

* dbus-win.patch, README.win: added available win32

patches from windbus project (http://sf.net/projects/windbus)
parent a780c4e8
2007-03-04 Ralf Habacker <ralf.habacker@freenet.de>
* dbus-win.patch, README.win: added available win32
patches from windbus project (http://sf.net/projects/windbus)
2007-03-04 Ralf Habacker <ralf.habacker@freenet.de>
* bus/activation.c: (bus_activation_activate_service):
......@@ -24,7 +29,7 @@
* dbus/*-win.*,bus/*-win.*: added win32 platform related
files. These files are only added to the cmake build system.
The missing dbus-win32.patch file will be added later.
The missing dbus-win.patch file will be added later.
2007-03-03 Ralf Habacker <ralf.habacker@freenet.de>
......
----------------------------------------
Windows port of the freedesktop.org D-Bus
----------------------------------------
Requirements
------------
- cmake version >= 2.4.4 see http://www.cmake.org
- installed libxml2 or libexpat
Build
-----
unix
1. install cmake and libxml or libexpat
2. get dbus sources
3. mkdir dbus-build
4. cd dbus-build
5. cmake <dbus-src-root>/cmake or cmake -DDBUS_USE_EXPAT=on <dbus-src-root>/cmake in case libexpat should de used
5. make
6. make install
win32
1. Install your prefered compiler
- Mingw from www.mingw.org
- Visual C++ 2005 Express/Studio
2. Install win32libs packages from
http://www.abi-neuhaus.de/chris/win32libs/
into a subdir win32libs in your program installation eg c:\Programme\win32libs (german)
or "c:\Program Files\win32libs" (english)
3. download and install the most recent CMake version from http://www.cmake.org/files/
4. apply dbus-win.patch: 'patch -p0 -i dbus-win.patch'
5. open command shell and run in the created build folder which resides side by side
to the D-Bus sources:
- for mingw:
cmake -G "MinGW Makefiles" <options> ..\<dbus-source-root>\cmake
- for Visual C++
cmake ..\<dbus-source-root>\cmake
7. build
Tests
-----
(when build with the Visual C++ IDE the *.exe files are
in the bin/Debug and bin/Release folder)
- dbus library check
bin\dbus-test.exe .\test\data
- bus daemon check
bin\bus-test.exe .\test\data
- check available names
bin\test_names.exe
- check if dbus-daemon is accessable
bin\dbus-send.exe --session --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames method return sender=org.freedesktop.DBus -> dest=:1.4 array [ string "org.freedesktop.DBus"string ":1.4"]
- start dbus-daemon
* set DBUS_VERBOSE=0 (=1 for getting debug infos)
* start bin\dbus-daemon --session
* bin\dbus-send.exe --dest=org.freedesktop.DBus --print-reply --type=method_call / org.freedesktop.DBus.StartServiceByName string:org.freedesktop.DBus.TestSuiteEchoService uint32:455 method return sender=org.freedesktop.DBus -> dest=:1.8 uint32 2
Some build options
-------------
key description default value
--- ----------- -------------
DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF) OFF
DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF
DBUS_BUILD_TESTS "enable unit test code" ON
DBUS_ENABLE_ANSI "enable -ansi -pedantic gcc flags" OFF
DBUS_ENABLE_GCOV "compile with coverage profiling
instrumentation (gcc only)" OFF
DBUS_ENABLE_VERBOSE_MODE "support verbose debug mode" ON
DBUS_DISABLE_CHECKS "Disable public API sanity checking" OFF
DBUS_INSTALL_SYSTEM_LIBS "install required system libraries
(mingw: libxml2, libiconv, mingw10)" OFF
CMAKE_BUILD_TYPE "build type (== debug) or (== release) release
Developers
----------
Running the tests in Visual Studio:
To successfully run the tests by the IDE you must add
the FULL patch to test\data in your build directory
(e.g. c:\dbus\build\test\data)
in something like
-> Project Settings
-> Debugging
-> Command line arguments
FAQ
---
- How much work remains till DBUS win32 can be merged with the main project?
There are some patches outstanding and the most effort is required in
discussions with the main dbus team how to implement some parts. One of
the main dbus team estimated the open work to one fulltime week.
http://lists.freedesktop.org/archives/dbus/2006-November/006264.html
I assume they will answer ALL your questions, and they are very
interested in fully supporting win32.
- How far is WinDBus from being usable for production ?
dbus comes with a test suite which is used on unix to guarantate
production quality and this test suite runs mostly. There are some
test not running and we need help to get them running.
In the pratice I and some other people are using dbus for at least more
than a half year in conjunction with kde on windows without any problems.
- On UNIX D-Bus uses UNIX sockets to communicate (correct me if I'm wrong).
What is used on Windows ?
tcp sockets, there are some efforts to get named pipe running, but some
design problems of the win32 api, we are not able to solve without
bigger changes to the dbus code base let us stop this effort.
- Do you have any clue if dbus-win32 can run in a Windows CE environment?
I was told that windows ce does not have posix function
open/close/select/... and dbus code uses such function in some area.
- Do you know if the C++ binding made by OpenWengo will be easily portable to Windows?
We have already ported the OpenWengo dbus-c++ binding, see in WinDBus svn (http://sf.net/projects/windbus)
The related test applicationa are running well.
TODO
----
February 2007:
- all changes of dbus-win.patch should become part of the official D-Bus code
- all code currently disabled by DBUS_WIN_FIXME should work
- clean up:
* bus/bus-service-win.c
* bus/dir-watch.c
* dbus/dbus-spawn-win.c
* dbus/dbus-sysdeps-util-win.c
* dbus/dbus-sysdeps-win.c
see also:
http://lists.freedesktop.org/archives/dbus/2006-July/005076.html
Index: bus/activation.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/activation.c,v
retrieving revision 1.49
diff -u -b -B -r1.49 activation.c
--- bus/activation.c 4 Mar 2007 22:09:50 -0000 1.49
+++ bus/activation.c 4 Mar 2007 22:11:26 -0000
@@ -34,7 +34,6 @@
#include <dbus/dbus-spawn.h>
#include <dbus/dbus-timeout.h>
#include <dbus/dbus-sysdeps.h>
-#include <dirent.h>
#include <errno.h>
#define DBUS_SERVICE_SECTION "D-BUS Service"
Index: bus/bus.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/bus.c,v
retrieving revision 1.74
diff -u -b -B -r1.74 bus.c
--- bus/bus.c 20 Dec 2006 06:18:19 -0000 1.74
+++ bus/bus.c 4 Mar 2007 22:11:26 -0000
@@ -625,7 +625,7 @@
}
bytes = _dbus_string_get_length (&addr);
- if (_dbus_write_socket (print_addr_fd, &addr, 0, bytes) != bytes)
+ if (_dbus_write_pipe (print_addr_fd, &addr, 0, bytes) != bytes)
{
dbus_set_error (error, DBUS_ERROR_FAILED,
"Printing message bus address: %s\n",
@@ -726,7 +726,7 @@
}
bytes = _dbus_string_get_length (&pid);
- if (_dbus_write_socket (print_pid_fd, &pid, 0, bytes) != bytes)
+ if (_dbus_write_pipe (print_pid_fd, &pid, 0, bytes) != bytes)
{
dbus_set_error (error, DBUS_ERROR_FAILED,
"Printing message bus PID: %s\n",
Index: bus/config-loader-libxml.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/config-loader-libxml.c,v
retrieving revision 1.8
diff -u -b -B -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 4 Mar 2007 22:11:26 -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/config-parser.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/config-parser.c,v
retrieving revision 1.47
diff -u -b -B -r1.47 config-parser.c
--- bus/config-parser.c 26 Jan 2007 16:10:09 -0000 1.47
+++ bus/config-parser.c 4 Mar 2007 22:11:26 -0000
@@ -27,6 +27,7 @@
#include "selinux.h"
#include <dbus/dbus-list.h>
#include <dbus/dbus-internals.h>
+#include <dbus/dbus-userdb.h>
#include <string.h>
typedef enum
@@ -3070,10 +3071,15 @@
static const char *test_service_dir_matches[] =
{
+#ifdef DBUS_WIN
+ DBUS_DATADIR"/dbus-1/services",
+ NULL,
+#else
"/testusr/testlocal/testshare/dbus-1/services",
"/testusr/testshare/dbus-1/services",
DBUS_DATADIR"/dbus-1/services",
"/testhome/foo/.testlocal/testshare/dbus-1/services",
+#endif
NULL
};
@@ -3082,11 +3088,32 @@
{
DBusList *dirs;
DBusList *link;
+ DBusString progs;
+ const char *common_progs;
int i;
+ common_progs = _dbus_getenv ("CommonProgramFiles");
+ if (common_progs)
+ {
+ if (!_dbus_string_init (&progs))
+ return FALSE;
+
+ if (!_dbus_string_append (&progs, common_progs))
+ {
+ _dbus_string_free (&progs);
+ return FALSE;
+ }
+
+ if (!_dbus_string_append (&progs, "/dbus-1/services"))
+ {
+ _dbus_string_free (&progs);
+ return FALSE;
+ }
+ test_service_dir_matches[1] = _dbus_string_get_const_data(&progs);
+ }
dirs = NULL;
- printf ("Testing retriving the default session service directories\n");
+ printf ("Testing retrieving the default session service directories\n");
if (!_dbus_get_standard_session_servicedirs (&dirs))
_dbus_assert_not_reached ("couldn't get stardard dirs");
@@ -3097,7 +3124,7 @@
printf (" default service dir: %s\n", (char *)link->data);
_dbus_string_init_const (&path, (char *)link->data);
- if (!_dbus_string_ends_with_c_str (&path, "share/dbus-1/services"))
+ if (!_dbus_string_ends_with_c_str (&path, "dbus-1/services"))
{
printf ("error with default session service directories\n");
return FALSE;
@@ -3150,6 +3177,7 @@
return FALSE;
}
+ _dbus_string_free (&progs);
return TRUE;
}
Index: bus/connection.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/connection.c,v
retrieving revision 1.66
diff -u -b -B -r1.66 connection.c
--- bus/connection.c 12 Dec 2006 21:24:07 -0000 1.66
+++ bus/connection.c 4 Mar 2007 22:11:26 -0000
@@ -1536,7 +1536,7 @@
{
CancelPendingReplyData *d = data;
- _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
+ _dbus_verbose_C_S ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
if (!_dbus_list_remove (&d->connections->pending_replies->items,
d->pending))
@@ -1550,7 +1550,7 @@
{
CancelPendingReplyData *d = data;
- _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
+ _dbus_verbose_C_S ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
/* d->pending should be either freed or still
* in the list of pending replies (owned by someone
@@ -1687,7 +1687,7 @@
{
CheckPendingReplyData *d = data;
- _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
+ _dbus_verbose_C_S ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
_dbus_list_prepend_link (&d->connections->pending_replies->items,
d->link);
@@ -1699,7 +1699,7 @@
{
CheckPendingReplyData *d = data;
- _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
+ _dbus_verbose_C_S ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d);
if (d->link != NULL)
{
Index: bus/dispatch.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/dispatch.c,v
retrieving revision 1.78
diff -u -b -B -r1.78 dispatch.c
--- bus/dispatch.c 23 Oct 2006 17:25:52 -0000 1.78
+++ bus/dispatch.c 4 Mar 2007 22:11:27 -0000
@@ -428,6 +428,11 @@
}
}
+#ifdef DBUS_WIN
+#include <tools/dbus-print-message.h>
+#include <tools/dbus-print-message.c>
+#endif
+
static void
spin_connection_until_authenticated (BusContext *context,
DBusConnection *connection)
@@ -439,6 +444,19 @@
bus_test_run_bus_loop (context, FALSE);
bus_test_run_clients_loop (FALSE);
}
+#ifdef DBUS_WIN
+ if ( dbus_connection_get_dispatch_status(connection) != DBUS_DISPATCH_COMPLETE)
+ {
+ DBusMessage *message;
+ message = dbus_connection_pop_message (connection);
+ printf ("spin_connection_until_authenticated failed,\n");
+ printf ("because of a non dispatched message:\n");
+ print_message(message, FALSE);
+ printf ("\n");
+ _dbus_assert_not_reached ("spin_connection_until_authenticated failed\n ");
+ }
+#endif
+
_dbus_verbose (" ... done spinning to auth connection %p\n", connection);
}
@@ -2624,6 +2642,11 @@
const char *segv_service;
dbus_uint32_t flags;
+ _dbus_warn("TODO: dispatch.c: check_segfault_service_no_auto_start\n");
+#ifndef DBUS_WIN_FIXME
+ return TRUE;
+#endif
+
message = dbus_message_new_method_call (DBUS_SERVICE_DBUS,
DBUS_PATH_DBUS,
DBUS_INTERFACE_DBUS,
@@ -2698,9 +2721,12 @@
}
else
{
+/* no DBUS_ERROR_NO_MEMORY on windows (no have_fork_errnum)*/
+#ifndef DBUS_WIN_FIXME
warn_unexpected (connection, message, "not this error");
goto out;
+#endif
}
}
else
@@ -4062,14 +4088,20 @@
_dbus_assert_not_reached ("initial connection setup failed");
}
+ _dbus_warn("TODO: dispatch.c create_and_hello test\n");
+#ifndef DBUS_WIN_FIXME
check1_try_iterations (context, "create_and_hello",
check_hello_connection);
+#endif
check2_try_iterations (context, foo, "nonexistent_service_no_auto_start",
check_nonexistent_service_no_auto_start);
+ _dbus_warn("TODO: dispatch.c segfault_service_no_auto_start test\n");
+#ifndef DBUS_WIN_FIXME
check2_try_iterations (context, foo, "segfault_service_no_auto_start",
check_segfault_service_no_auto_start);
+#endif
check2_try_iterations (context, foo, "existent_service_no_auto_start",
check_existent_service_no_auto_start);
@@ -4077,8 +4109,12 @@
check2_try_iterations (context, foo, "nonexistent_service_auto_start",
check_nonexistent_service_auto_start);
+
+ _dbus_warn("TODO: dispatch.c segfault_service_auto_start test\n");
+#ifndef DBUS_WIN_FIXME
check2_try_iterations (context, foo, "segfault_service_auto_start",
check_segfault_service_auto_start);
+#endif
check2_try_iterations (context, foo, "shell_fail_service_auto_start",
check_shell_fail_service_auto_start);
@@ -4095,8 +4131,11 @@
if (!check_existent_service_auto_start (context, foo))
_dbus_assert_not_reached ("existent service auto start failed");
+ _dbus_warn("TODO: dispatch.c check_shell_service_success_auto_start test\n");
+#ifndef DBUS_WIN_FIXME
if (!check_shell_service_success_auto_start (context, foo))
_dbus_assert_not_reached ("shell success service auto start failed");
+#endif
_dbus_verbose ("Disconnecting foo, bar, and baz\n");
@@ -4147,8 +4186,11 @@
_dbus_assert_not_reached ("initial connection setup failed");
}
+ _dbus_warn("TODO: dispatch.c: create_and_hello_sha1 test\n");
+#ifndef DBUS_WIN_FIXME
check1_try_iterations (context, "create_and_hello_sha1",
check_hello_connection);
+#endif
kill_client_connection_unchecked (foo);
Index: bus/main.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/main.c,v
retrieving revision 1.36
diff -u -b -B -r1.36 main.c
--- bus/main.c 20 Dec 2006 06:18:19 -0000 1.36
+++ bus/main.c 4 Mar 2007 22:11:28 -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: bus/policy.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/policy.c,v
retrieving revision 1.24
diff -u -b -B -r1.24 policy.c
--- bus/policy.c 12 Dec 2006 21:24:07 -0000 1.24
+++ bus/policy.c 4 Mar 2007 22:11:28 -0000
@@ -324,9 +324,13 @@
if (!dbus_connection_get_unix_user (connection, &uid))
{
+#ifdef DBUS_WIN
+ _dbus_verbose ("policy.c: dbus_connection_get_unix_user check disabled under windows\n");
+#else
dbus_set_error (error, DBUS_ERROR_FAILED,
"No user ID known for connection, cannot determine security policy\n");
goto failed;
+#endif
}
if (_dbus_hash_table_get_n_entries (policy->rules_by_uid) > 0)
Index: dbus/dbus-bus.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-bus.c,v
retrieving revision 1.64
diff -u -b -B -r1.64 dbus-bus.c
--- dbus/dbus-bus.c 28 Oct 2006 01:41:37 -0000 1.64
+++ dbus/dbus-bus.c 4 Mar 2007 22:11:28 -0000
@@ -350,8 +350,10 @@
{
int i;
+#if !defined(DBUS_WIN) && !defined(DBUS_WINCE)
+ // qt example pong says "QMutex::lock: Deadlock detected"
_DBUS_LOCK (bus);
-
+#endif
/* We are expecting to have the connection saved in only one of these
* slots, but someone could in a pathological case set system and session
* bus to the same bus or something. Or set one of them to the starter
@@ -366,7 +368,9 @@
}
}
+#if !defined(DBUS_WIN) && !defined(DBUS_WINCE)
_DBUS_UNLOCK (bus);
+#endif
}
static DBusConnection *
Index: dbus/dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.154
diff -u -b -B -r1.154 dbus-connection.c
--- dbus/dbus-connection.c 15 Nov 2006 03:07:59 -0000 1.154
+++ dbus/dbus-connection.c 4 Mar 2007 22:11:28 -0000
@@ -62,7 +62,7 @@
#define TRACE_LOCKS 1
#define CONNECTION_LOCK(connection) do { \
- if (TRACE_LOCKS) { _dbus_verbose (" LOCK: %s\n", _DBUS_FUNCTION_NAME); } \
+ if (TRACE_LOCKS) { _dbus_verbose (" LOCK : %s\n", _DBUS_FUNCTION_NAME); } \
_dbus_mutex_lock ((connection)->mutex); \
TOOK_LOCK_CHECK (connection); \
} while (0)
@@ -4718,9 +4718,9 @@
_dbus_return_val_if_fail (connection != NULL, FALSE);
_dbus_return_val_if_fail (connection->transport != NULL, FALSE);
-#ifdef DBUS_WIN
+#if defined(DBUS_WIN) || defined(DBUS_WINCE)
/* FIXME do this on a lower level */
- return FALSE;
+ //return FALSE;
#endif
return dbus_connection_get_socket(connection, fd);
@@ -4790,12 +4790,12 @@
_dbus_return_val_if_fail (connection != NULL, FALSE);
_dbus_return_val_if_fail (uid != NULL, FALSE);
-#ifdef DBUS_WIN
+#if defined(DBUS_WIN) || defined(DBUS_WINCE)
/* FIXME this should be done at a lower level, but it's kind of hard,
* just want to be sure we don't ship with this API returning
* some weird internal fake uid for 1.0
*/
- return FALSE;
+ //return FALSE;
#endif
CONNECTION_LOCK (connection);
@@ -4829,12 +4829,12 @@
_dbus_return_val_if_fail (connection != NULL, FALSE);
_dbus_return_val_if_fail (pid != NULL, FALSE);
-#ifdef DBUS_WIN
+#if defined(DBUS_WIN) || defined(DBUS_WINCE)
/* FIXME this should be done at a lower level, but it's kind of hard,
* just want to be sure we don't ship with this API returning
* some weird internal fake uid for 1.0
*/
- return FALSE;
+ //return FALSE;
#endif
CONNECTION_LOCK (connection);
Index: dbus/dbus-connection.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.h,v
retrieving revision 1.49
diff -u -b -B -r1.49 dbus-connection.h
--- dbus/dbus-connection.h 15 Nov 2006 03:07:59 -0000 1.49
+++ dbus/dbus-connection.h 4 Mar 2007 22:11:28 -0000
@@ -330,6 +330,9 @@
*/
int dbus_watch_get_fd (DBusWatch *watch);
+#if defined (DBUS_COMPILATION)
+int dbus_watch_get_handle (DBusWatch *watch);
+#endif
unsigned int dbus_watch_get_flags (DBusWatch *watch);
void* dbus_watch_get_data (DBusWatch *watch);
void dbus_watch_set_data (DBusWatch *watch,
Index: dbus/dbus-internals.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-internals.c,v
retrieving revision 1.55
diff -u -b -B -r1.55 dbus-internals.c
--- dbus/dbus-internals.c 15 Nov 2006 01:52:01 -0000 1.55
+++ dbus/dbus-internals.c 4 Mar 2007 22:11:28 -0000
@@ -295,7 +295,7 @@
#include <pthread.h>
#endif
-static inline void
+static void
_dbus_verbose_init (void)
{
if (!verbose_initted)
Index: dbus/dbus-mainloop.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-mainloop.c,v
retrieving revision 1.19
diff -u -b -B -r1.19 dbus-mainloop.c
--- dbus/dbus-mainloop.c 20 Oct 2006 03:04:59 -0000 1.19
+++ dbus/dbus-mainloop.c 4 Mar 2007 22:11:28 -0000
@@ -90,8 +90,8 @@
Callback callback;
DBusTimeout *timeout;
DBusTimeoutFunction function;
- unsigned long last_tv_sec;
- unsigned long last_tv_usec;
+ long last_tv_sec;
+ long last_tv_usec;
} TimeoutCallback;
#define WATCH_CALLBACK(callback) ((WatchCallback*)callback)
@@ -598,7 +598,7 @@
#if MAINLOOP_SPEW
_dbus_verbose (" skipping watch on fd %d as it was out of memory last time\n",
- dbus_watch_get_fd (wcb->watch));
+ dbus_watch_get_handle (wcb->watch));
#endif
}
else if (dbus_watch_get_enabled (wcb->watch))
@@ -609,7 +609,7 @@
flags = dbus_watch_get_flags (wcb->watch);
- fds[n_fds].fd = dbus_watch_get_fd (wcb->watch);
+ fds[n_fds].fd = dbus_watch_get_handle (wcb->watch);
fds[n_fds].revents = 0;
fds[n_fds].events = 0;
if (flags & DBUS_WATCH_READABLE)
@@ -628,7 +628,7 @@
{
#if MAINLOOP_SPEW
_dbus_verbose (" skipping disabled watch on fd %d %s\n",
- dbus_watch_get_fd (wcb->watch),
+ dbus_watch_get_handle (wcb->watch),
watch_flags_to_string (dbus_watch_get_flags (wcb->watch)));
#endif
}
@@ -640,8 +640,8 @@
timeout = -1;
if (loop->timeout_count > 0)
{
- unsigned long tv_sec;
- unsigned long tv_usec;
+ long tv_sec;
+ long tv_usec;
_dbus_get_current_time (&tv_sec, &tv_usec);
@@ -710,8 +710,8 @@
if (loop->timeout_count > 0)
{
- unsigned long tv_sec;
- unsigned long tv_usec;
+ long tv_sec;
+ long tv_usec;
_dbus_get_current_time (&tv_sec, &tv_usec);
@@ -883,6 +883,8 @@
loop->depth -= 1;
+ _dbus_daemon_release ();
+
_dbus_verbose ("Quit main loop, depth %d -> %d\n",
loop->depth + 1, loop->depth);
}
Index: dbus/dbus-message.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.h,v
retrieving revision 1.65
diff -u -b -B -r1.65 dbus-message.h
--- dbus/dbus-message.h 21 Oct 2006 18:51:30 -0000 1.65
+++ dbus/dbus-message.h 4 Mar 2007 22:11:28 -0000
@@ -34,6 +34,10 @@
#include <dbus/dbus-errors.h>
#include <stdarg.h>
+#ifdef DBUS_WINCE
+#undef interface
+#endif
+
DBUS_BEGIN_DECLS
/**
Index: dbus/dbus-server-protected.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server-protected.h,v
retrieving revision 1.23
diff -u -b -B -r1.23 dbus-server-protected.h
--- dbus/dbus-server-protected.h 1 Oct 2006 03:18:47 -0000 1.23
+++ dbus/dbus-server-protected.h 4 Mar 2007 22:11:28 -0000
@@ -144,7 +144,7 @@
#define TRACE_LOCKS 0
#define SERVER_LOCK(server) do { \
- if (TRACE_LOCKS) { _dbus_verbose (" LOCK: %s\n", _DBUS_FUNCTION_NAME); } \
+ if (TRACE_LOCKS) { _dbus_verbose (" LOCK : %s\n", _DBUS_FUNCTION_NAME); } \
_dbus_mutex_lock ((server)->mutex); \
TOOK_LOCK_CHECK (server); \
} while (0)
Index: dbus/dbus-server-socket.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-server-socket.c,v
retrieving revision 1.3
diff -u -b -B -r1.3 dbus-server-socket.c
--- dbus/dbus-server-socket.c 1 Oct 2006 15:36:18 -0000 1.3
+++ dbus/dbus-server-socket.c 4 Mar 2007 22:11:28 -0000
@@ -161,7 +161,7 @@
int client_fd;
int listen_fd;
- listen_fd = dbus_watch_get_fd (watch);