dbus/dbus
Simon McVittie 1e35c693e4 Make dbus-daemon.exe --print-address work under Windows
The DBusPipe code was broken by commit 6e214b5b3c, which switched
from C runtime API to Win32 API for WinCE's benefit. In a DBusPipe,
fd_or_handle is in fact always a C runtime file descriptor, which can't
be used with the Win32 API (which expects a HANDLE).

This commit goes back to the C runtime API. It might cause WinCE support
to regress, but at least dbus-daemon.exe --print-address works again.

This is enough to make a few tests work under Wine when cross-compiling
from Linux to mingw-w64: in particular, this now works:

    DBUS_TEST_DAEMON=bus/dbus-daemon.exe DBUS_TEST_DATA=test/data \
    wine test/test-dbus-daemon.exe -p /echo/session

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2012-02-28 12:37:41 +00:00
..
.gitignore Update a load of .gitignores 2010-10-05 11:45:48 +01:00
dbus-address.c Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-address.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-arch-deps.h.in Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-auth-script.c Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-auth-script.h Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-auth-util.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-auth.c Fix spelling/grammatical mistakes detected by Debian's lintian(1) 2011-07-28 11:05:43 +01:00
dbus-auth.h Merge branch 'fd-passing' 2009-07-16 16:05:16 +02:00
dbus-bus.c internal_bus_get: centralize error handling 2012-02-21 14:51:08 +00:00
dbus-bus.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-connection-internal.h _dbus_connection_queue_received_message: remove, unused 2012-02-10 14:37:44 +00:00
dbus-connection.c Distinguish between two flavours of mutex 2012-02-21 14:41:25 +00:00
dbus-connection.h DBusSocketSet: new abstraction for struct pollfd[] or whatever 2011-06-13 17:30:31 +01:00
dbus-credentials-util.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-credentials.c [64 bit printf] Update to use DBUS_PID_FORMAT, print (omitted) 2010-03-22 14:35:28 -04:00
dbus-credentials.h Add _dbus_credentials_to_string_append 2010-03-16 15:57:27 -04:00
dbus-dataslot.c Distinguish between two flavours of mutex 2012-02-21 14:41:25 +00:00
dbus-dataslot.h Distinguish between two flavours of mutex 2012-02-21 14:41:25 +00:00
dbus-errors.c Add _DBUS_STATIC_ASSERT (based on GLib's G_STATIC_ASSERT) and use it 2011-08-11 11:51:43 +01:00
dbus-errors.h Minor include file fix. 2010-06-07 15:34:22 +02:00
dbus-file-unix.c Make dbus-uuidgen atomic 2010-09-03 14:29:53 -04:00
dbus-file-win.c Fix typo in creating temp file. 2010-09-09 16:00:34 +02:00
dbus-file.c moved out dbus file related functions from sysdeps into separate files - tested on windows 2009-12-20 11:24:32 +01:00
dbus-file.h Make dbus-uuidgen atomic 2010-09-03 14:29:53 -04:00
dbus-hash.c DBUS_HASH_TWO_STRINGS, DBUS_HASH_POINTER: remove, unused 2012-02-10 14:37:44 +00:00
dbus-hash.h DBUS_HASH_TWO_STRINGS, DBUS_HASH_POINTER: remove, unused 2012-02-10 14:37:44 +00:00
dbus-internals.c _dbus_verbose_real: tidy conditional prototype to not break nesting 2012-02-21 14:50:39 +00:00
dbus-internals.h Distinguish between two flavours of mutex 2012-02-21 14:41:25 +00:00
dbus-keyring.c Don't pretend to free lock if it was never allocated 2010-10-05 14:50:22 +01:00
dbus-keyring.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-list.c _dbus_list_pop_last_link: remove, unused 2012-02-13 17:37:02 +00:00
dbus-list.h _dbus_list_pop_last_link: remove, unused 2012-02-13 17:37:02 +00:00
dbus-macros.h Annotate dbus_malloc*() functions with __attribute__ malloc and __attribute__ alloc_size 2011-01-05 13:13:48 +00:00
dbus-mainloop.c Fixed runtime error caused by using uninitialized variable detected with msvc build. 2012-02-20 12:47:55 +00:00
dbus-mainloop.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-marshal-basic.c Promote DBusBasicValue and DBus8ByteStruct to be API 2012-02-24 10:58:39 +00:00
dbus-marshal-basic.h Promote DBusBasicValue and DBus8ByteStruct to be API 2012-02-24 10:58:39 +00:00
dbus-marshal-byteswap-util.c Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-marshal-byteswap.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-marshal-byteswap.h Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-marshal-header.c find_field_for_modification: document where the readers are left pointing 2012-02-08 19:10:22 +00:00
dbus-marshal-header.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-marshal-recursive-util.c Promote DBusBasicValue and DBus8ByteStruct to be API 2012-02-24 10:58:39 +00:00
dbus-marshal-recursive.c dbus-marshal-recursive: make some internal functions static 2012-02-08 19:10:30 +00:00
dbus-marshal-recursive.h dbus-marshal-recursive: make some internal functions static 2012-02-08 19:10:30 +00:00
dbus-marshal-validate-util.c Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-marshal-validate.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-marshal-validate.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-memory.c dbus-memory: add optional checking for system malloc() (etc.) failing 2012-02-21 15:08:30 +00:00
dbus-memory.h Annotate dbus_malloc*() functions with __attribute__ malloc and __attribute__ alloc_size 2011-01-05 13:13:48 +00:00
dbus-mempool.c DBusMemPool: inform valgrind what we're up to 2012-02-13 17:54:34 +00:00
dbus-mempool.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-message-factory.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-message-factory.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-message-internal.h Move _dbus_check_fdleaks_enter to dbus-message-internal.h 2012-02-21 14:51:21 +00:00
dbus-message-private.h Move _dbus_check_fdleaks_enter to dbus-message-internal.h 2012-02-21 14:51:21 +00:00
dbus-message-util.c dbus tests: don't warn on skipped tests 2011-07-18 19:14:52 +01:00
dbus-message.c Promote DBusBasicValue and DBus8ByteStruct to be API 2012-02-24 10:58:39 +00:00
dbus-message.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-misc.c Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-misc.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-nonce.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-nonce.h Fixes to the nonce code 2009-12-01 08:43:41 +01:00
dbus-object-tree.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-object-tree.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-pending-call-internal.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-pending-call.c add and use _dbus_pending_call_trace_ref 2012-02-13 17:54:52 +00:00
dbus-pending-call.h Add and use DBUS_TIMEOUT_INFINITE and DBUS_TIMEOUT_USE_DEFAULT 2011-06-10 18:33:04 +01:00
dbus-pipe-unix.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-pipe-win.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-pipe.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-pipe.h Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-protocol.h dbus-protocol.h: compile under C++11 2012-02-20 11:23:15 +00:00
dbus-resources.c Zero-initialize DBusCounter at allocation 2012-02-21 14:51:18 +00:00
dbus-resources.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-server-debug-pipe.c add and use _dbus_server_trace_ref 2012-02-13 17:54:54 +00:00
dbus-server-debug-pipe.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-server-launchd.c Look up DISPLAY from launchd if not initialized. 2010-12-06 21:33:10 +01:00
dbus-server-launchd.h Add launchd implementation. 2010-12-06 21:33:06 +01:00
dbus-server-protected.h Distinguish between two flavours of mutex 2012-02-21 14:41:25 +00:00
dbus-server-socket.c add and use _dbus_server_trace_ref 2012-02-13 17:54:54 +00:00
dbus-server-socket.h Extended autolaunch protocol with scope attribute. 2010-09-27 21:53:32 +02:00
dbus-server-unix.c _dbus_server_new_for_domain_socket: don't try to unlink abstract sockets 2011-08-05 14:39:52 +01:00
dbus-server-unix.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-server-win.c Handle case when autolaunched daemon address is already pulished on windows. 2010-12-14 08:12:59 +01:00
dbus-server-win.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-server.c Distinguish between two flavours of mutex 2012-02-21 14:41:25 +00:00
dbus-server.h Decorated public exported functions with DBUS_EXPORT macro, reviewed by Colin Walters. 2010-03-16 09:33:39 +01:00
dbus-sha.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-sha.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-shared.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-shell.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-shell.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-signature.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-signature.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-socket-set-epoll.c Use epoll in a backwards-compatible way on Linux < 2.6.27 2011-06-13 17:30:47 +01:00
dbus-socket-set-poll.c DBusSocketSet: new abstraction for struct pollfd[] or whatever 2011-06-13 17:30:31 +01:00
dbus-socket-set.c Add an implementation of DBusSocketSet using epoll 2011-06-13 17:30:40 +01:00
dbus-socket-set.h Add an implementation of DBusSocketSet using epoll 2011-06-13 17:30:40 +01:00
dbus-sockets-win.h Windows fix: MSVC 2010 has errno.h. 2010-12-31 16:12:18 +01:00
dbus-spawn-win.c Revert "windows fix: use install root as base path for relative pathes in dbus service file" 2012-01-04 20:04:59 +00:00
dbus-spawn.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-spawn.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-string-private.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-string-util.c _dbus_string_append_double, _dbus_string_parse_double: remove 2012-02-13 17:37:39 +00:00
dbus-string.c _dbus_string_append_unichar, _dbus_string_get_unichar: remove 2012-02-13 17:37:32 +00:00
dbus-string.h _dbus_string_append_double, _dbus_string_parse_double: remove 2012-02-13 17:37:39 +00:00
dbus-syntax.c Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
dbus-syntax.h Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
dbus-sysdeps-pthread.c Remove _dbus_condvar_wake_all and both of its implementations 2012-02-21 14:41:44 +00:00
dbus-sysdeps-thread-win.c Remove _dbus_condvar_wake_all and both of its implementations 2012-02-21 14:41:44 +00:00
dbus-sysdeps-unix.c _dbus_getgid: remove, unused 2012-02-10 14:37:05 +00:00
dbus-sysdeps-unix.h _dbus_getgid: remove, unused 2012-02-10 14:37:05 +00:00
dbus-sysdeps-util-unix.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-sysdeps-util-win.c Make dbus-daemon.exe --print-address work under Windows 2012-02-28 12:37:41 +00:00
dbus-sysdeps-util.c _dbus_string_append_double, _dbus_string_parse_double: remove 2012-02-13 17:37:39 +00:00
dbus-sysdeps-win.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-sysdeps-win.h Use absolute session service dir path in bus-test on windows. 2010-12-29 14:43:24 +01:00
dbus-sysdeps-wince-glue.c Wrap OutputDebugString for Windows CE builds, and add cast for MSVC. 2010-07-19 10:32:08 +02:00
dbus-sysdeps-wince-glue.h Wrap OutputDebugString for Windows CE builds, and add cast for MSVC. 2010-07-19 10:32:08 +02:00
dbus-sysdeps.c _dbus_string_append_double, _dbus_string_parse_double: remove 2012-02-13 17:37:39 +00:00
dbus-sysdeps.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-test-main.c Add support for Windows CE to the code base. 2010-04-13 20:38:59 +02:00
dbus-test.c Reinstate the recursive marshalling test but skip the later parts by default 2012-02-08 19:10:14 +00:00
dbus-test.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-threads-internal.h Remove _dbus_condvar_wake_all and both of its implementations 2012-02-21 14:41:44 +00:00
dbus-threads.c Remove _dbus_condvar_wake_all and both of its implementations 2012-02-21 14:41:44 +00:00
dbus-threads.h Allow both recursive and non-recursive mutexes to be supplied 2012-02-21 14:41:28 +00:00
dbus-timeout.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-timeout.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-transport-protected.h Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-transport-socket.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-transport-socket.h The current state of the nonce-tcp implementation 2009-12-01 08:43:36 +01:00
dbus-transport-unix.c Enable launchd. 2010-12-06 21:33:14 +01:00
dbus-transport-unix.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-transport-win.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-transport-win.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-transport.c DBusTransport: don't include dbus-marshal-header.h either 2012-02-21 14:51:23 +00:00
dbus-transport.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-types.h DBusBasicValue: add bool_val and fd members to complete the set 2012-02-24 10:58:57 +00:00
dbus-userdb-util.c at_console: ask systemd whether a user is at the console 2012-02-07 16:06:33 +00:00
dbus-userdb.c Don't truncate pointers on Windows x64 platform 2010-05-03 10:48:38 +02:00
dbus-userdb.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-uuidgen.c Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
dbus-uuidgen.h Bug 21161 - Update the FSF address 2009-07-14 15:39:47 -04:00
dbus-valgrind-internal.h Turn the non-valgrind code path into inline functions to avoid compiler warnings 2012-02-21 14:52:49 +00:00
dbus-watch.c Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus-watch.h Revert all changes since a36d4918a6 2012-01-04 17:44:23 +00:00
dbus.h Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
Makefile.am Add dbus-syntax.[ch] 2012-02-24 12:43:55 +00:00
sd-daemon.c systemd: update sd-daemon.[ch] from upstream systemd 2010-09-06 03:17:54 +02:00
sd-daemon.h systemd: update sd-daemon.[ch] from upstream systemd 2010-09-06 03:17:54 +02:00
versioninfo.rc.in WIN32: add versioninfo, and export symbols 2009-12-01 08:36:26 +01:00