{
if (!verbose_initted)
{
- char *p = _dbus_getenv ("DBUS_VERBOSE");
+ const char *p = _dbus_getenv ("DBUS_VERBOSE");
verbose = p != NULL && *p == '1';
verbose_initted = TRUE;
#ifdef DBUS_USE_OUTPUT_DEBUG_STRING
- GetModuleFileName(0,module_name,sizeof(module_name)-1);
- p = strrchr(module_name,'.');
- if (p)
- *p ='\0';
- p = strrchr(module_name,'\\');
- if (p)
- strcpy(module_name,p+1);
- strcat(module_name,": ");
+ {
+ char *last_period, *last_slash;
+ GetModuleFileName(0,module_name,sizeof(module_name)-1);
+ last_period = _mbsrchr(module_name,'.');
+ if (last_period)
+ *last_period ='\0';
+ last_slash = _mbsrchr(module_name,'\\');
+ if (last_slash)
+ strcpy(module_name,last_slash+1);
+ strcat(module_name,": ");
+ }
#endif
}
}
return TRUE;
}
-static int
-accept_with_nonce (int listen_fd, const DBusString *nonce)
-{
-
-}
-
int
_dbus_accept_with_noncefile (int listen_fd, const DBusNonceFile *noncefile)
{
#include "dbus-internals.h"
#include "dbus-sysdeps.h"
+#include "dbus-sysdeps-win.h"
#include "dbus-threads.h"
#include "dbus-list.h"
* @param error return location for errors
* @returns #FALSE on failure
*/
-dbus_bool_t
+static dbus_bool_t
_dbus_write_pid_file (const DBusString *filename,
unsigned long pid,
DBusError *error)
return TRUE;
}
-/**
- * Changes the user and group the bus is running as.
- *
- * @param uid the new user ID
- * @param gid the new group ID
- * @param error return location for errors
- * @returns #FALSE on failure
- */
-dbus_bool_t
-_dbus_change_identity (dbus_uid_t uid,
- dbus_gid_t gid,
- DBusError *error)
-{
- return TRUE;
-}
-
/** Checks if user is at the console
*
* @param username user to check
* The DIR typedef is not compatible with Unix.
**********************************************************************/
-DIR * _dbus_opendir(const char *dir)
+static DIR * _dbus_opendir(const char *dir)
{
DIR *dp;
char *filespec;
return dp;
}
-struct dirent * _dbus_readdir(DIR *dp)
+static struct dirent * _dbus_readdir(DIR *dp)
{
if (!dp || dp->finished)
return NULL;
}
-int _dbus_closedir(DIR *dp)
+static int _dbus_closedir(DIR *dp)
{
if (!dp)
return 0;
/** @} end of sysdeps-win */
-/** Gets our UID
- * @returns process UID
- */
-dbus_uid_t
-_dbus_getuid (void)
-{
- return DBUS_UID_UNSET;
-}
-
/**
* The only reason this is separate from _dbus_getpid() is to allow it
* on Windows for logging but not for other purposes.
* @param points to sid buffer, need to be freed with LocalFree()
* @returns process sid
*/
-dbus_bool_t
+static dbus_bool_t
_dbus_getsid(char **sid)
{
HANDLE process_token = NULL;
return retval;
}
-
-#ifdef DBUS_BUILD_TESTS
-/** Gets our GID
- * @returns process GID
- */
-dbus_gid_t
-_dbus_getgid (void)
-{
- return DBUS_GID_UNSET;
-}
-
-#if 0
-dbus_bool_t
-_dbus_domain_test (const char *test_data_dir)
-{
- if (!_dbus_test_oom_handling ("spawn_nonexistent",
- check_spawn_nonexistent,
- NULL))
- return FALSE;
-}
-
-#endif
-
-#endif //DBUS_BUILD_TESTS
-
/************************************************************************
pipes
_dbus_string_get_length (dir));
}
-/*---------------- DBusCredentials ----------------------------------
+/*---------------- DBusCredentials ----------------------------------*/
/**
* Adds the credentials corresponding to the given username.
_dbus_global_unlock( lock );
}
+#if 0
+
void
_dbus_daemon_release()
{
_dbus_global_unlock( lock );
}
+#endif
+
static dbus_bool_t
_dbus_get_autolaunch_shm(DBusString *adress)
{
* @param len length of buffer
* @returns #FALSE on failure
*/
-dbus_bool_t
+static dbus_bool_t
_dbus_get_install_root(char *prefix, int len)
{
//To find the prefix, we cut the filename and also \bin\ if present
DWORD pathLength;
char *lastSlash;
SetLastError( 0 );
- pathLength = GetModuleFileName(NULL, prefix, len);
+ pathLength = GetModuleFileName(_dbus_win_get_dll_hmodule(), prefix, len);
if ( pathLength == 0 || GetLastError() != 0 ) {
*prefix = '\0';
return FALSE;
configdir=$(sysconfdir)/dbus-1
-INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"
+INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"
extra_bin_programs=
if DBUS_UNIX