Tor Lillqvist [Wed, 21 Oct 2009 18:52:59 +0000 (21:52 +0300)]
Don't use DBUS_DIR_SEPARATOR
I didn't cherry-pick the commit from dbus4win that introduced
DBUS_DIR_SEPARATOR, as I think it just uglifies the code with little
gain. (Forward) slashes work fine on Windows.
Tor Lillqvist [Wed, 21 Oct 2009 12:31:34 +0000 (15:31 +0300)]
Use multi-byte string functions on Windows
Don't walk through char arrays that contain strings in the system
codepage char by char looking for '\\'. There are double-byte
characters in East Asian codepages where the second byte is a '\\'.
(cherry picked from commit 61316262da466993abbcba010c6bac90bb0b1d43)
Frank Osterfeld [Wed, 21 Oct 2009 17:08:12 +0000 (20:08 +0300)]
Improve error handling in nonce code
Replace errno (from assuan code) by DBusError. Errors are not passed
through dbus_accept_with_nonce atm, as the original _dbus_accept() has
no error arg either.
bus/Makefile.am: make dbus-daemon and friends bin_PROGRAMS on Windows
On Linux, dbus-daemon and dbus-daemon-launch-helper are treated specially
because they need permission adjustment.
On Windows, all executables are stubs, created by libtool. The real
executables are in .libs. We need to use libtool to install them
properly. So let's make them bin_PROGRAMS on Windows.
(cherry picked from commit 7fb35992d67433ac3ba82e9e2e786e123323456d)
Move some functions from dbus-sysdeps-util-win.c to dbus-sysdeps-win.c
These are used by dbus-sysdeps-win.c and it is not linked together
with dbus-sysdeps-util-win.c
(cherry picked from commit 24b612adbf8045b8b00af15f8d44eb38f964641f)
Marc Mutz [Fri, 17 Apr 2009 12:07:25 +0000 (14:07 +0200)]
WIN32: add versioninfo, and export symbols
* dbus/versioninfo.rc.in: (new file) copied and modified from libgpg-error
* configure.in: enable libtool's W32 support, extract version information
for use in versioninfo.rc.in, define DBUS_WIN, define DBUS_UNIX only on
unix (adapted from libgpg-error)
* dbus/Makefile.am: switch sources depending on platform,
compile versioninfo.rc, add dbus-1.def (not used since buildsystem creates
its own .def file apparently)
(cherry picked from commit cfa717ddb7b9258a862d87cd5b3bdbe582ce106c)
Frank Osterfeld [Wed, 29 Apr 2009 16:03:32 +0000 (18:03 +0200)]
_dbus_get_install_root assumes that dbus-daemon is in a bin/ subdirectory. That's not a common directory structure on windows, so weaken the assumption: $somepath/bin/dbus-daemon.exe -> $somepath $somepath/dbus-daemon.exe, where somepath doesn't end in /bin/: -> $somepath i.e., use dbus-daemon.exe's directory as root if that directory is not a "bin" directory (cherry picked from commit 2d2055b2fa7f92c144e9a182a9a091ebe5215d7d)
Tor Lillqvist [Wed, 22 Apr 2009 14:35:43 +0000 (16:35 +0200)]
dbus/dbus-sysdeps-util-win.c: use GetFileAttributes instead of CreateFile in _dbus_file_exists (cherry picked from commit 3ba582b91361785c3eb0121e8b9e85d046eea75f)
Tor Lillqvist [Wed, 22 Apr 2009 11:35:11 +0000 (13:35 +0200)]
dbus/dbus-sysdeps-win.c: add _dbus_win_error_string, and use after MoveFileEx instead of _dbus_error_from_errno (cherry picked from commit 1d0b2dacf52faffbeba09af2b309683ccc71547a)
Tor Lillqvist [Wed, 22 Apr 2009 07:20:04 +0000 (09:20 +0200)]
dbus/dbus-connection.c: use dbus_message_type_to_string instead of printing the naked message type (cherry picked from commit 33d858e83e3cb1f55ed257ffef930b8f49c3ffc7)
Fix broken Windows implementation of _dbus_printf_string_upper_bound().
Pass the correct buffer size when trying again, and keep trying with
larger buffer sizes, doubling the size each time.
(cherry picked from commit 95832a94607eea609de994467b7d64e36af72e6b)
Fix DBusMessage compiler warnings by adding some missing casts.
Basically the case where the address of a const pointer is passed as a non-const void pointer.
(cherry picked from commit dab3ec2abe7fbeea4dab873c8575a45b3b18882d)
Frank Osterfeld [Tue, 28 Apr 2009 14:14:13 +0000 (16:14 +0200)]
bus-test-launch-helper is a unit test, test-service and test-shell-service are not. Rename test-shell to shell-test to match autotools (cherry picked from commit b106387b73d6a300a013a15f6507244e82f007ed)
Frank Osterfeld [Tue, 28 Apr 2009 09:26:05 +0000 (11:26 +0200)]
rename test-spawn to spawn-test, to match autotools. test-sleep-forever is not a stand-alone test but called from other tests (cherry picked from commit 41bf95167cfc17b564594eab0a1901e46eaab5fe)
Frank Osterfeld [Mon, 27 Apr 2009 19:21:02 +0000 (21:21 +0200)]
build dbus-daemon-launch-helper-test and friends set all TEST vars needed for the .in files (cherry picked from commit fcd9ba392927b0433e5e037d393230774edae303)
Frank Osterfeld [Mon, 27 Apr 2009 15:58:45 +0000 (17:58 +0200)]
generate all config files from the .in files. Set some of the required variables replaced in the .in files by configure_file (cherry picked from commit 4980ffa1093877af182e032a13f6162df57be09f)
Frank Osterfeld [Tue, 28 Apr 2009 15:10:46 +0000 (17:10 +0200)]
fix configure check and VA_COPY usage
* fix configure check: set DBUS_VA_COPY_FUNC correctly, and DBUS_VA_COPY_AS_ARRAY if no usable one was found
* add DBUS_VA_COPY_AS_ARRAY
* define DBUS_VA_COPY indirectly, cmakedefine plus variable does not work for me on windows, and is the wrong thing to do according to Allen. The undef seems unnecessary now, the address parsing test passes on windows, using mingw
(cherry picked from commit e6680d78d943be4ee2d85e9d82cd8aa1350db882)