Commit 395e8baf authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

MSVC compile fixes.

parent 94d5cd42
......@@ -325,7 +325,7 @@ HSHARED WINAPI SHLWAPI_7 (DWORD dwProcId, LPCVOID lpvData, DWORD dwSize)
/* Write size of data, followed by the data, to the view */
*((DWORD*)pMapped) = dwSize;
if (dwSize)
memcpy(pMapped + sizeof(dwSize), lpvData, dwSize);
memcpy((char *) pMapped + sizeof(dwSize), lpvData, dwSize);
/* Release view. All further views mapped will be opaque */
UnmapViewOfFile(pMapped);
......@@ -369,7 +369,7 @@ PVOID WINAPI SHLWAPI_8 (HSHARED hShared, DWORD dwProcId)
CloseHandle(hDup);
if (pMapped)
return pMapped + sizeof(DWORD); /* Hide size */
return (char *) pMapped + sizeof(DWORD); /* Hide size */
return NULL;
}
......@@ -391,7 +391,7 @@ PVOID WINAPI SHLWAPI_8 (HSHARED hShared, DWORD dwProcId)
BOOL WINAPI SHLWAPI_9 (LPVOID lpView)
{
TRACE("(%p)\n", lpView);
return UnmapViewOfFile(lpView - sizeof(DWORD)); /* Include size */
return UnmapViewOfFile((char *) lpView - sizeof(DWORD)); /* Include size */
}
/*************************************************************************
......
......@@ -24,17 +24,22 @@ extern "C" {
/* Type model indepent typedefs */
typedef char __int8;
typedef unsigned char __uint8;
typedef short __int16;
typedef unsigned short __uint16;
typedef int __int32;
typedef unsigned int __uint32;
typedef long long __int64;
#ifndef _MSC_VER
typedef char __int8;
typedef short __int16;
typedef int __int32;
typedef long long __int64;
#endif /* !defined(_MSC_VER) */
typedef unsigned char __uint8;
typedef unsigned short __uint16;
typedef unsigned int __uint32;
#ifndef _MSC_VER
typedef unsigned long long __uint64;
#else
typedef unsigned __int64 __uint64;
#endif /* !defined(_MSC_VER) */
#if defined(_WIN64)
......@@ -44,7 +49,9 @@ typedef void *__ptr64;
#else /* FIXME: defined(_WIN32) */
typedef void *__ptr32;
#ifndef _MSC_VER
typedef __uint64 __ptr64;
#endif /* !defined(_MSC_VER) */
#endif
......
......@@ -29,7 +29,7 @@ typedef struct _IO_STATUS_BLOCK
ULONG_PTR Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
typedef VOID NTAPI (*PIO_APC_ROUTINE) ( PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved );
typedef VOID (NTAPI *PIO_APC_ROUTINE) ( PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved );
/*
registry
......
......@@ -51,8 +51,8 @@ SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
HRESULT WINAPI
SafeArrayAllocData(struct tagSAFEARRAY *psa);
struct tagSAFEARRAY WINAPI
*SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
struct tagSAFEARRAY * WINAPI
SafeArrayCreate(VARTYPE vt, UINT cDims, struct tagSAFEARRAYBOUND *rgsabound);
HRESULT WINAPI
SafeArrayDestroyDescriptor(struct tagSAFEARRAY *psa);
......@@ -102,8 +102,8 @@ SafeArrayDestroy(struct tagSAFEARRAY *psa);
HRESULT WINAPI
SafeArrayCopy(struct tagSAFEARRAY *psa, struct tagSAFEARRAY **ppsaOut);
struct tagSAFEARRAY WINAPI
*SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
struct tagSAFEARRAY * WINAPI
SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
HRESULT WINAPI
SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
......
......@@ -4,7 +4,7 @@
# endif
/* Depth == 3 */
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(_MSC_VER)
# if __WINE_PSHPACK_H2 == 1
# pragma pack(1)
# elif __WINE_PSHPACK_H2 == 2
......@@ -24,7 +24,7 @@
# endif
/* Depth == 2 */
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(_MSC_VER)
# if __WINE_PSHPACK_H == 1
# pragma pack(1)
# elif __WINE_PSHPACK_H == 2
......@@ -44,7 +44,7 @@
# endif
/* Depth == 1 */
# if defined(__GNUC__) || defined(__SUNPRO_C)
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(_MSC_VER)
# pragma pack()
# elif defined(__SUNPRO_CC)
# warning "Assuming a default alignment of 4"
......
......@@ -20,7 +20,11 @@
# include "poppack.h"
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if _MSC_VER >= 800
# pragma warning(disable:4103)
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(_MSC_VER)
# pragma pack(1)
# elif !defined(RC_INVOKED)
# error "Adjusting the alignment is not supported with this compiler"
......
......@@ -20,7 +20,11 @@
# include "poppack.h"
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if _MSC_VER >= 800
# pragma warning(disable:4103)
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(_MSC_VER)
# pragma pack(2)
# elif !defined(RC_INVOKED)
# error "Adjusting the alignment is not supported with this compiler"
......
......@@ -20,7 +20,11 @@
# include "poppack.h"
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if _MSC_VER >= 800
# pragma warning(disable:4103)
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(_MSC_VER)
# pragma pack(4)
# elif !defined(RC_INVOKED)
# error "Adjusting the alignment is not supported with this compiler"
......
......@@ -20,7 +20,11 @@
# include "poppack.h"
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if _MSC_VER >= 800
# pragma warning(disable:4103)
# endif
# if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(_MSC_VER)
# pragma pack(8)
# warning "8 as alignment is not supported"
# elif !defined(RC_INVOKED)
......
......@@ -63,8 +63,7 @@ typedef struct _RPC_IF_ID
typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid, LPVOID Context );
typedef void __RPC_USER (* RPC_AUTH_KEY_RETRIEVAL_FN)( LPVOID Arg, LPWSTR ServerPrincName,
ULONG KeyVer, LPVOID* Key, RPC_STATUS* status );
typedef void (__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)();
typedef struct _RPC_POLICY
{
......
......@@ -22,9 +22,9 @@ typedef struct
#define NDRSContextValue(hContext) (&(hContext)->userContext)
#define cbNDRContext 20
typedef void __RPC_USER (*NDR_RUNDOWN)(void *context);
typedef void __RPC_USER (*NDR_NOTIFY_ROUTINE)(void);
typedef void __RPC_USER (*NDR_NOTIFY2_ROUTINE)(_wine_boolean flag);
typedef void (__RPC_USER *NDR_RUNDOWN)(void *context);
typedef void (__RPC_USER *NDR_NOTIFY_ROUTINE)(void);
typedef void (__RPC_USER *NDR_NOTIFY2_ROUTINE)(_wine_boolean flag);
#define DECLSPEC_UUID(x)
#define MIDL_INTERFACE(x) struct
......@@ -33,7 +33,7 @@ struct _MIDL_STUB_MESSAGE;
struct _MIDL_STUB_DESC;
struct _FULL_PTR_XLAT_TABLES;
typedef void __RPC_USER (*EXPR_EVAL)(struct _MIDL_STUB_MESSAGE *);
typedef void (__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE *);
typedef const unsigned char *PFORMAT_STRING;
typedef struct
......@@ -73,8 +73,8 @@ typedef struct _MIDL_STUB_MESSAGE
ULONG_PTR MaxCount;
unsigned long Offset;
unsigned long ActualCount;
void * __RPC_API (*pfnAllocate)(size_t);
void __RPC_API (*pfnFree)(void *);
void * (__RPC_API *pfnAllocate)(size_t);
void (__RPC_API *pfnFree)(void *);
unsigned char *StackTop;
unsigned char *pPresentedType;
unsigned char *pTransmitType;
......@@ -125,8 +125,8 @@ typedef struct _COMM_FAULT_OFFSETS COMM_FAULT_OFFSETS;
typedef struct _MIDL_STUB_DESC
{
void *RpcInterfaceInformation;
void * __RPC_API (*pfnAllocate)(size_t);
void __RPC_API (*pfnFree)(void *);
void * (__RPC_API *pfnAllocate)(size_t);
void (__RPC_API *pfnFree)(void *);
union {
handle_t *pAutoHandle;
handle_t *pPrimitiveHandle;
......@@ -161,9 +161,9 @@ typedef struct _MIDL_FORMAT_STRING
#endif
} MIDL_FORMAT_STRING;
typedef void __RPC_API (*STUB_THUNK)( PMIDL_STUB_MESSAGE );
typedef void (__RPC_API *STUB_THUNK)( PMIDL_STUB_MESSAGE );
typedef long __RPC_API (*SERVER_ROUTINE)();
typedef long (__RPC_API *SERVER_ROUTINE)();
typedef struct _MIDL_SERVER_INFO_
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment