From 84401ec697281090dc2d02c45504c6fdd174f5dd Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 1 Aug 2007 11:17:46 +0000 Subject: [PATCH] msvc 8 compile++ and removed some stupid casts (cherry picked from commit 8c635b4a3944bcabc479718946e2a033d4c01489) --- dbus/dbus-sysdeps-util-win.c | 2 ++ dbus/dbus-sysdeps-win.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dbus/dbus-sysdeps-util-win.c b/dbus/dbus-sysdeps-util-win.c index b0e4eab..2e522c5 100644 --- a/dbus/dbus-sysdeps-util-win.c +++ b/dbus/dbus-sysdeps-util-win.c @@ -32,6 +32,7 @@ #include "dbus-string.h" #include "dbus-sysdeps.h" #include "dbus-sysdeps-win.h" +#include "dbus-sockets-win.h" #include "dbus-memory.h" #include @@ -42,6 +43,7 @@ #include #include #include +#include // WSA error codes #if defined __MINGW32__ || (defined _MSC_VER && _MSC_VER <= 1310) /* save string functions version diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 98bf4c9..4afa165 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -2849,7 +2849,7 @@ void _dbus_daemon_init(const char *host, dbus_uint32_t port) { HANDLE lock; - const char *adr = NULL; + char *adr = NULL; char szUserName[64]; DWORD dwUserNameSize = sizeof(szUserName); char szDBusDaemonMutex[128]; @@ -2884,10 +2884,10 @@ _dbus_daemon_init(const char *host, dbus_uint32_t port) _dbus_assert( adr ); - strcpy( (char*) adr, szAddress); + strcpy( adr, szAddress); // cleanup - UnmapViewOfFile( (char*) adr ); + UnmapViewOfFile( adr ); _dbus_global_unlock( lock ); } @@ -2917,7 +2917,7 @@ static dbus_bool_t _dbus_get_autolaunch_shm(DBusString *adress) { HANDLE sharedMem; - const char *adr; + char *adr; char szUserName[64]; DWORD dwUserNameSize = sizeof(szUserName); char szDBusDaemonAddressInfo[128]; @@ -2948,7 +2948,7 @@ _dbus_get_autolaunch_shm(DBusString *adress) _dbus_string_append( adress, adr ); // cleanup - UnmapViewOfFile( (char*) adr ); + UnmapViewOfFile( adr ); CloseHandle( sharedMem ); -- 2.7.4