Commit 9aab47ed authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

MSVC compatibility fixes.

parent e765bc1a
......@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
......
......@@ -22,12 +22,16 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#ifdef HAVE_IO_H
# include <io.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
......
......@@ -19,6 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -74,7 +74,7 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_POOL_H
#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#ifdef HAVE_SYS_MODEM_H
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>
......
......@@ -443,7 +443,7 @@ static INT get_registry_locale_info( LPCWSTR value, LPWSTR buffer, INT len )
NTSTATUS status;
UNICODE_STRING nameW;
KEY_VALUE_PARTIAL_INFORMATION *info;
static const int info_size = info->Data - (UCHAR *)info;
static const int info_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
if (RegOpenKeyExA( HKEY_CURRENT_USER, "Control Panel\\International", 0, KEY_READ, &hkey))
return -1;
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#ifdef HAVE_UNISTD_H
......
......@@ -24,6 +24,7 @@
#include <string.h>
#include <sys/types.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
......
......@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include "wine/winbase16.h"
#include "winbase.h"
#include "winerror.h"
......
......@@ -26,6 +26,7 @@
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
......
......@@ -27,7 +27,9 @@
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
......
......@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdio.h>
#include "winerror.h"
......
......@@ -22,6 +22,9 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
......
......@@ -22,6 +22,10 @@
* Many of these functions are in SHLWAPI.DLL also
*
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <ctype.h>
#include "wine/debug.h"
......
......@@ -20,6 +20,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <string.h>
......
......@@ -19,6 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -19,6 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
......@@ -106,7 +109,7 @@ static BOOL WINAPI SHLWAPI_ChrCmpA(WORD ch1, WORD ch2)
}
/*************************************************************************
* ChrCmpIA [SHLWAPI.@]
* ChrCmpIA [SHLWAPI.385]
*
* Compare two characters, ignoring case.
*
......@@ -136,7 +139,7 @@ static BOOL WINAPI SHLWAPI_ChrCmpW(WCHAR ch1, WCHAR ch2)
}
/*************************************************************************
* ChrCmpIW [SHLWAPI.@]
* ChrCmpIW [SHLWAPI.386]
*
* See ChrCmpIA.
*/
......@@ -940,7 +943,7 @@ LPWSTR WINAPI StrDupW(LPCWSTR lpszStr)
* Internal implementation of StrSpnA/StrCSpnA/StrCSpnIA
*/
static int WINAPI SHLWAPI_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch,
LPSTR WINAPI (*pStrChrFn)(LPCSTR,WORD),
LPSTR (WINAPI *pStrChrFn)(LPCSTR,WORD),
BOOL bInvert)
{
LPCSTR lpszRead = lpszStr;
......@@ -966,7 +969,7 @@ static int WINAPI SHLWAPI_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch,
* Internal implementation of StrSpnW/StrCSpnW/StrCSpnIW
*/
static int WINAPI SHLWAPI_StrSpnHelperW(LPCWSTR lpszStr, LPCWSTR lpszMatch,
LPWSTR WINAPI (*pStrChrFn)(LPCWSTR,WCHAR),
LPWSTR (WINAPI *pStrChrFn)(LPCWSTR,WCHAR),
BOOL bInvert)
{
LPCWSTR lpszRead = lpszStr;
......
......@@ -20,6 +20,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <math.h>
......
......@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>
#include <string.h>
......
......@@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -22,7 +22,9 @@
#define __WINE_FILE_H
#include <time.h> /* time_t */
#include <sys/time.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include <sys/types.h>
#include "winbase.h"
#include "wine/windef16.h" /* HFILE16 */
......
......@@ -44,7 +44,7 @@ typedef struct _RPC_MESSAGE
unsigned long RpcFlags;
} RPC_MESSAGE, *PRPC_MESSAGE;
typedef void __RPC_STUB (*RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message);
typedef void (__RPC_STUB *RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message);
typedef struct
{
......
......@@ -27,8 +27,9 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <locale.h>
#include <stdlib.h>
......@@ -98,4 +99,3 @@ void WINAPI ExitKernel16( void )
WriteOutProfiles16();
TerminateProcess( GetCurrentProcess(), 0 );
}
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <fcntl.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdio.h>
......
......@@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdlib.h>
......
......@@ -508,7 +508,7 @@ DWORD WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDWOR
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
static const int info_size = info->Data - (UCHAR *)info;
static const int info_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
TRACE("(0x%x,%s,%p,%p,%p,%p=%ld)\n",
hkey, debugstr_w(name), reserved, type, data, count, count ? *count : 0 );
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
......
......@@ -23,6 +23,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <time.h>
#include <fcntl.h>
......
......@@ -26,6 +26,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdlib.h>
......
......@@ -19,6 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <string.h>
......
......@@ -22,6 +22,9 @@
#include <assert.h>
#include <stdio.h>
#ifdef HAVE_IO_H
# include <io.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
......
......@@ -18,6 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <string.h>
#include "winerror.h"
......
......@@ -35,6 +35,8 @@
* documented!
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include "windef.h"
......
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