msvc 8 compile++ and removed some stupid casts (cherry picked from commit 8c635b4a3944bcabc479718946e2a033d4c01489)

This commit is contained in:
Christian Ehrlicher 2007-08-01 11:17:46 +00:00 committed by unknown
parent 452ff68a2d
commit 84401ec697
2 changed files with 7 additions and 5 deletions

View file

@ -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 <io.h>
@ -42,6 +43,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <winsock2.h> // WSA error codes
#if defined __MINGW32__ || (defined _MSC_VER && _MSC_VER <= 1310)
/* save string functions version

View file

@ -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 );