MSVC compatibility fixes.

This commit is contained in:
Patrik Stridvall 2002-08-28 23:42:34 +00:00 committed by Alexandre Julliard
parent e765bc1a41
commit 9aab47ed24
40 changed files with 85 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#ifdef HAVE_UNISTD_H

View File

@ -24,6 +24,7 @@
#include <string.h>
#include <sys/types.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif

View File

@ -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"

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>

View File

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

View File

@ -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"

View File

@ -22,6 +22,9 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

View File

@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>

View File

@ -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"

View File

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

View File

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

View File

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

View File

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

View File

@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <math.h>

View File

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

View File

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

View File

@ -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 */

View File

@ -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
{

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <string.h>

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <fcntl.h>

View File

@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdio.h>

View File

@ -20,6 +20,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdlib.h>

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -23,6 +23,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <time.h>
#include <fcntl.h>

View File

@ -26,6 +26,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#include <stdlib.h>

View File

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

View File

@ -19,6 +19,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <string.h>

View File

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

View File

@ -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"

View File

@ -35,6 +35,8 @@
* documented!
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include "windef.h"