summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps-win.h
Commit message (Collapse)AuthorAgeFilesLines
* Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later licenseRalf Habacker2023-01-041-0/+2
| | | | | | | | | The full license texts are not added because they were already added in a previous commit. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> see #394
* sysdeps-win: Let tests access autostarted dbus-daemon's handleRalf Habacker2022-06-271-0/+4
| | | | | | | | This will allow automated tests to kill the autostarted dbus-daemon before continuing to the next test-case, which wasn't previously possible. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
* On Windows in autolaunch related function use rmutex related functions to ↵Ralf Habacker2022-05-171-0/+3
| | | | | | | | | | | | support thread locking The previously used additional and incomplete functions have been merged into the current rmutex functions to fix the reported bug and reduce the maintenance effort. Fixes #368, #370 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
* sysdeps: Make some functions Windows-specificSimon McVittie2021-12-151-0/+4
| | | | | | | | | | _dbus_daemon_publish_session_bus_address had an empty implementation but was never actually called on Unix, and _dbus_daemon_is_session_bus_address_published wasn't even implemented. Move them to the Windows-specific header to indicate that interface changes here would only affect other Windows-specific code. Signed-off-by: Simon McVittie <smcv@collabora.com>
* _dbus_spawn_program(): Add additional parameter to return errorRalf Habacker2021-11-291-1/+2
| | | | | | | | By specifying an error instance via the additional parameter, errors that occur in it are transported to the caller in a coordinated manner. This eliminates the need to query GetLastError() outside the function, which can return an incorrect value if the implementation changes.
* Add _DBUS_GNUC_PRINTF annotation to _dbus_win_set_error_from_last_error()Ralf Habacker2021-11-291-1/+1
| | | | This makes printf like format string related issues visible.
* tools/dbus-run-session.c: use _dbus_win_set_error_from_last_error() on ↵Ralf Habacker2021-11-231-3/+0
| | | | | | | remaining locations The previously used function _dbus_win_stderr_win_error() has been removed because it is no longer used.
* tools/dbus-run-session: fix race between manual and automatically started ↵Ralf Habacker2021-11-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | dbus-daemon on Windows dbus-run-session starts a dbus-daemon before the client application. We must avoid letting the application try to connect before the dbus-daemon's DBusServer is listening for connections. In the Unix implementation, we already achieved this via the --print-address option. If the client tried to connect too soon, the server would not yet be listening and the client would fail. In the Windows implementation, we communicate the bus address to the client application as an autolaunch: address, so if the client tried to connect too soon, it would autolaunch a new dbus-daemon instead of using the one that it was intended to use. We can avoid this by using a new option to pass in a Windows event object, which will be set when the server has started and is ready to process connections. Fixes #297
* dbus-sysdeps-win.c: Add helper functions to handle events on WindowsRalf Habacker2021-11-231-0/+14
| | | | These functions are in the dbus library to be used everywhere
* trivial: Remove trailing whitespace from copyright noticesSimon McVittie2018-12-171-3/+3
| | | | | | | | | | | | | | We don't usually mass-remove trailing whitespace from the actual source code because it would complicate cherry-picking bug fixes to older branches, but that reasoning doesn't really apply to the comments containing copyright and licensing notices. Removing trailing whitespace makes it much easier to move code around: we have a commit hook that rejects commits containing trailing whitespace, but that commit hook counts moving a file as a delete + add pair, so it objects to moving code that contains trailing whitespace. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add Windows implementation of dbus-run-session toolRalf Habacker2018-10-251-1/+6
| | | | | | Bug: https://gitlab.freedesktop.org/dbus/dbus/issues/135 Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Simon McVittie <smcv@collabora.com>
* Partially fix warnings from compiler option '-Wredundant-decls'Thomas Zimmermann2016-10-101-2/+0
| | | | | | | Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net> [smcv: omit the part involving environ, which was more involved] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97357
* Use DBusString for all relocation and install-root codeSimon McVittie2015-10-051-1/+1
| | | | | | | | | | | | | | | | This means we handle OOM correctly, and makes it obvious that we are not overflowing buffers. This change does not affect the actual content of the strings. Instead of redefining DBUS_DATADIR to be a function call (which hides the fact that DBUS_DATADIR is used), this patch makes each use explicit: DBUS_DATADIR is always the #define from configure or cmake, before replacing the prefix. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83539 Tested-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Make Windows dbus-daemon look for the config file we installRalf Habacker2015-09-201-4/+0
| | | | | | | | | | | | | The canonical location for bus setup changed from ${sysconfdir}/dbus-1 to ${datadir}/dbus-1 (or their CMake equivalents) in version 1.9.18. Also stop trying to use bus/session.conf from the build tree, which will not work if our ${prefix} contains an older ${sysconfdir}/dbus-1/session.conf. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92028 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or testsSimon McVittie2015-02-201-0/+7
| | | | | | | | | | | | | | | | | | The rules are: * symbols in libdbus-1 with neither decoration are private to libdbus-1 * symbols in libdbus-1 with DBUS_EXPORT are public API * symbols in libdbus-1 with DBUS_PRIVATE_EXPORT are private to the dbus source package, but may be used by other programs in the dbus source tree, including tests * symbols in libdbus-internal must not have DBUS_EXPORT or DBUS_PRIVATE_EXPORT, and should be used by as few things as possible Thanks to Ralf Habacker for his contributions to this rather large commit. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Add test for windows sid.Ralf Habacker2015-02-111-0/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Define WIN32_LEAN_AND_MEAN in Windows portMatt Fischer2014-01-061-1/+1
| | | | | | | | | | | | | | | | | <windows.h> somewhat cloyingly attempts to include <winsock.h> by default, which causes problems if the rest of the program is trying to use the incompatible <winsock2.h>. The Windows sysdep header attempts to prevent this by forcibly defining the winsock header guard macro, so that it will not be included. However, this does not work on MinGW because it uses a different guard macro name. This patch changes the code to instead define WIN32_LEAN_AND_MEAN, which is a more portable way to ensure that <winsock.h> will not be included. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71405 Reviewed-By: Ralf Habacker <ralf.habacker@freenet.de>
* Fix declaration of _dbus_win_startup_winsockSimon McVittie2013-09-031-1/+1
| | | | | | | This regressed in commit b7a91bfd. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68610 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Fixed gcc 4.8.1 -Wformat warnings on windows.Ralf Habacker2013-08-281-1/+1
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67072 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* dbus_threads_init_default, dbus_threads_init: be safe to call at any timeSimon McVittie2013-05-101-0/+3
| | | | | | | | | | | | | | On Unix, we use a pthreads mutex, which can be allocated and initialized in global memory. On Windows, we use a CRITICAL_SECTION, together with a call to InitializeCriticalSection() from the constructor of a global static C++ object (thanks to Ralf Habacker for suggesting this approach). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Use absolute session service dir path in bus-test on windows.Ralf Habacker2010-12-291-0/+2
|
* Add support for Windows CE to the code base.Marcus Brinkmann2010-04-131-6/+0
|
* Prepare for WinCE port: Convert windows code to native API, avoid errno.Marcus Brinkmann2010-04-131-9/+3
|
* moved out dbus file related functions from sysdeps into separate files - ↵Ralf Habacker2009-12-201-0/+4
| | | | tested on windows
* Fixes to the nonce codeFrank Osterfeld2009-12-011-6/+0
| | | | | Cherry-picked from commit f9bc0f4bd036f6ede5d9850fb0f8587178c85f44 in the dbus4win repository, slightly massaged to apply by tml@iki.fi.
* The current state of the nonce-tcp implementationFrank Osterfeld2009-12-011-3/+5
| | | | | | | | Merged and cleaned up patch from my [Frank Osterfeld's] local work branch. Cherry-picked from commit e2801eca57b2d9e09afd662ed5ef6fc83be73afc and edited by tml@iki.fi to make it apply, and fixing whitespace issues.
* dbus/dbus-sysdeps-win.h: move declarations into .c (used nowhere else) ↵Tor Lillqvist2009-11-301-4/+0
| | | | (cherry picked from commit 0ea30b511e5b099c43bfdf2cbff0f3935917e057)
* dbus/dbus-sysdeps-*win.c: remove DBusFile abstraction (cherry picked from ↵Tor Lillqvist2009-11-301-28/+0
| | | | commit 2895660b0e683d71dd51911819c0f31aff8517c3)
* dbus/dbus-sysdeps-win.h: add _dbus_win_get_dll-module (cherry picked from ↵Tor Lillqvist2009-11-301-0/+1
| | | | commit da5e8e14029cb64a65fe482e232be1d786a8ee19)
* Bug 21161 - Update the FSF addressTobias Mueller2009-07-101-1/+1
| | | | | | No comment. Signed-off-by: Colin Walters <walters@verbum.org>
* 2007-07-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-141-1/+1
| | | | * Add indent-tabs-mode: nil to all file headers.
* * ↵Ralf Habacker2007-07-091-37/+1
| | | | dbus/dbus-sysdeps-win.c,dbus-sysdeps-win.h,dbus-sysdeps-win-util.c,dbus-sysdeps-spawn-win.c: synced with windbus sources
* * dbus/dbus-sysdeps-win.c,dbus/dbus-sysdeps-win.h: removed obsolate ↵Ralf Habacker2007-06-301-17/+0
| | | | DBusUserInfo code
* * dbus/dbus-sysdeps-win.c, dbus/dbus-sysdeps-spawn-win.c, ↵Ralf Habacker2007-06-211-0/+3
| | | | dbus/dbus-sysdeps-win.h: disabled DBusSocket implementation by Peter Kuemmel
* * dbus/dbus-sysdeps-win.c, dbus/dbus-sysdeps-spawn-win.c, ↵Ralf Habacker2007-06-191-1/+10
| | | | dbus/dbus-sysdeps-win.h: disabled DBusSocket implementation Patch by Peter Kuemmel
* * cmake/ConfigureChecks.cmake,cmake/config.h.cmake: added check for HAVE_ERRNO_HRalf Habacker2007-06-151-11/+0
| | | | | | | | | * 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/dbus-sysdeps-win.c: disabled DBusUserInfo related codeRalf Habacker2007-06-141-8/+10
| | | | | | | | (_dbus_append_desired_identity,_dbus_windows_user_is_process_owner): new win32 functions as counterpart of unix related (_dbus_send_credentials_socket,_dbus_read_credentials_socket): renamed from ..._unix_socket (_dbus_send_credentials_unix_socket): removed obsolate function * dbus/dbus-sysdeps-win-util.c: disabled DBusGroupInfo related code (_dbus_verify_daemon_user,_dbus_change_to_daemon_user): new win32 functions as counterpart of unix related
* * bus/main.c (main): uses _dbus_get_config_file_name() to detect ↵Ralf Habacker2007-06-011-0/+7
| | | | | | | session.conf location on win32. * dbus-sysdeps-win.h (_dbus_get_config_file_name,_dbus_file_exists): new prototyp, undefined interface after including windows.h because t makes trouble when a paramater is named interface. * dbus-sysdeps-win.c (_dbus_get_install_root,_dbus_get_config_file_name,_dbus_file_exists): new functions.
* * dbus/dbus-sysdeps-win.h, dbus/dbus-sysdeps-win.c, ↵Ralf Habacker2007-03-121-4/+4
| | | | dbus/dbus-sysdeps-util-win.c: renamed functions _dbus_xxx_file() to _dbus_file_xxx() to reflect struct name DBusFile.
* * dbus/*-win.*,bus/*-win.*: added win32 platform relatedRalf Habacker2007-03-031-0/+174
files. These files are only added to the cmake build system. The missing dbus-win32.patch file will be added later.