Commit 580e07e7 authored by Alexandre Julliard's avatar Alexandre Julliard

include/msvcrt: Add explicit msvcrt_long types to replace long for 64-bit compatibility.

parent 7e082f66
...@@ -26,10 +26,10 @@ int __cdecl _ungetch(int); ...@@ -26,10 +26,10 @@ int __cdecl _ungetch(int);
#ifdef _M_IX86 #ifdef _M_IX86
int __cdecl _inp(unsigned short); int __cdecl _inp(unsigned short);
unsigned long __cdecl _inpd(unsigned short); __msvcrt_ulong __cdecl _inpd(unsigned short);
unsigned short __cdecl _inpw(unsigned short); unsigned short __cdecl _inpw(unsigned short);
int __cdecl _outp(unsigned short, int); int __cdecl _outp(unsigned short, int);
unsigned long __cdecl _outpd(unsigned short, unsigned long); __msvcrt_ulong __cdecl _outpd(unsigned short, __msvcrt_ulong);
unsigned short __cdecl _outpw(unsigned short, unsigned short); unsigned short __cdecl _outpw(unsigned short, unsigned short);
#endif #endif
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
typedef struct _CrtMemState typedef struct _CrtMemState
{ {
struct _CrtMemBlockHeader* pBlockHeader; struct _CrtMemBlockHeader* pBlockHeader;
unsigned long lCounts[_MAX_BLOCKS]; __msvcrt_ulong lCounts[_MAX_BLOCKS];
unsigned long lSizes[_MAX_BLOCKS]; __msvcrt_ulong lSizes[_MAX_BLOCKS];
unsigned long lHighWaterCount; __msvcrt_ulong lHighWaterCount;
unsigned long lTotalCount; __msvcrt_ulong lTotalCount;
} _CrtMemState; } _CrtMemState;
...@@ -60,7 +60,7 @@ typedef struct _CrtMemState ...@@ -60,7 +60,7 @@ typedef struct _CrtMemState
#define _CrtCheckMemory() ((int)1) #define _CrtCheckMemory() ((int)1)
#define _CrtDbgReport(...) ((int)0) #define _CrtDbgReport(...) ((int)0)
#define _CrtDumpMemoryLeaks() ((int)0) #define _CrtDumpMemoryLeaks() ((int)0)
#define _CrtSetBreakAlloc(a) ((long)0) #define _CrtSetBreakAlloc(a) ((__msvcrt_long)0)
#define _CrtSetDbgFlag(f) ((int)0) #define _CrtSetDbgFlag(f) ((int)0)
#define _CrtSetDumpClient(f) ((void)0) #define _CrtSetDumpClient(f) ((void)0)
#define _CrtSetReportMode(t,m) ((int)0) #define _CrtSetReportMode(t,m) ((int)0)
......
...@@ -80,6 +80,13 @@ ...@@ -80,6 +80,13 @@
# endif # endif
#endif #endif
#ifndef _MSVCRT_LONG_DEFINED
#define _MSVCRT_LONG_DEFINED
/* we need 32-bit longs even on 64-bit */
typedef int __msvcrt_long;
typedef unsigned int __msvcrt_ulong;
#endif
#ifndef _INTPTR_T_DEFINED #ifndef _INTPTR_T_DEFINED
#ifdef _WIN64 #ifdef _WIN64
typedef __int64 intptr_t; typedef __int64 intptr_t;
...@@ -117,7 +124,7 @@ typedef unsigned int size_t; ...@@ -117,7 +124,7 @@ typedef unsigned int size_t;
#endif #endif
#ifndef _TIME32_T_DEFINED #ifndef _TIME32_T_DEFINED
typedef long __time32_t; typedef __msvcrt_long __time32_t;
#define _TIME32_T_DEFINED #define _TIME32_T_DEFINED
#endif #endif
......
...@@ -31,7 +31,7 @@ int __cdecl _chdrive(int); ...@@ -31,7 +31,7 @@ int __cdecl _chdrive(int);
char* __cdecl _getcwd(char*,int); char* __cdecl _getcwd(char*,int);
char* __cdecl _getdcwd(int,char*,int); char* __cdecl _getdcwd(int,char*,int);
int __cdecl _getdrive(void); int __cdecl _getdrive(void);
unsigned long __cdecl _getdrives(void); __msvcrt_ulong __cdecl _getdrives(void);
int __cdecl _mkdir(const char*); int __cdecl _mkdir(const char*);
int __cdecl _rmdir(const char*); int __cdecl _rmdir(const char*);
......
...@@ -128,7 +128,7 @@ extern "C" { ...@@ -128,7 +128,7 @@ extern "C" {
double __cdecl _copysign (double, double); double __cdecl _copysign (double, double);
double __cdecl _chgsign (double); double __cdecl _chgsign (double);
double __cdecl _scalb(double, long); double __cdecl _scalb(double, __msvcrt_long);
double __cdecl _logb(double); double __cdecl _logb(double);
double __cdecl _nextafter(double, double); double __cdecl _nextafter(double, double);
int __cdecl _finite(double); int __cdecl _finite(double);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#define _A_ARCH 0x00000020 #define _A_ARCH 0x00000020
#ifndef _FSIZE_T_DEFINED #ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t; typedef __msvcrt_ulong _fsize_t;
#define _FSIZE_T_DEFINED #define _FSIZE_T_DEFINED
#endif #endif
...@@ -76,7 +76,7 @@ extern "C" { ...@@ -76,7 +76,7 @@ extern "C" {
int __cdecl _access(const char*,int); int __cdecl _access(const char*,int);
int __cdecl _chmod(const char*,int); int __cdecl _chmod(const char*,int);
int __cdecl _chsize(int,long); int __cdecl _chsize(int,__msvcrt_ulong);
int __cdecl _close(int); int __cdecl _close(int);
int __cdecl _commit(int); int __cdecl _commit(int);
int __cdecl _creat(const char*,int); int __cdecl _creat(const char*,int);
...@@ -84,7 +84,7 @@ int __cdecl _dup(int); ...@@ -84,7 +84,7 @@ int __cdecl _dup(int);
int __cdecl _dup2(int,int); int __cdecl _dup2(int,int);
int __cdecl _eof(int); int __cdecl _eof(int);
__int64 __cdecl _filelengthi64(int); __int64 __cdecl _filelengthi64(int);
long __cdecl _filelength(int); __msvcrt_long __cdecl _filelength(int);
int __cdecl _findclose(intptr_t); int __cdecl _findclose(intptr_t);
intptr_t __cdecl _findfirst(const char*,struct _finddata_t*); intptr_t __cdecl _findfirst(const char*,struct _finddata_t*);
intptr_t __cdecl _findfirsti64(const char*, struct _finddatai64_t*); intptr_t __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
...@@ -92,8 +92,8 @@ int __cdecl _findnext(intptr_t,struct _finddata_t*); ...@@ -92,8 +92,8 @@ int __cdecl _findnext(intptr_t,struct _finddata_t*);
int __cdecl _findnexti64(intptr_t, struct _finddatai64_t*); int __cdecl _findnexti64(intptr_t, struct _finddatai64_t*);
intptr_t __cdecl _get_osfhandle(int); intptr_t __cdecl _get_osfhandle(int);
int __cdecl _isatty(int); int __cdecl _isatty(int);
int __cdecl _locking(int,int,long); int __cdecl _locking(int,int,__msvcrt_long);
long __cdecl _lseek(int,long,int); __msvcrt_long __cdecl _lseek(int,__msvcrt_long,int);
__int64 __cdecl _lseeki64(int,__int64,int); __int64 __cdecl _lseeki64(int,__int64,int);
char* __cdecl _mktemp(char*); char* __cdecl _mktemp(char*);
int __cdecl _open(const char*,int,...); int __cdecl _open(const char*,int,...);
...@@ -102,7 +102,7 @@ int __cdecl _pipe(int*,unsigned int,int); ...@@ -102,7 +102,7 @@ int __cdecl _pipe(int*,unsigned int,int);
int __cdecl _read(int,void*,unsigned int); int __cdecl _read(int,void*,unsigned int);
int __cdecl _setmode(int,int); int __cdecl _setmode(int,int);
int __cdecl _sopen(const char*,int,int,...); int __cdecl _sopen(const char*,int,int,...);
long __cdecl _tell(int); __msvcrt_long __cdecl _tell(int);
__int64 __cdecl _telli64(int); __int64 __cdecl _telli64(int);
int __cdecl _umask(int); int __cdecl _umask(int);
int __cdecl _unlink(const char*); int __cdecl _unlink(const char*);
...@@ -134,20 +134,20 @@ int __cdecl _wunlink(const wchar_t*); ...@@ -134,20 +134,20 @@ int __cdecl _wunlink(const wchar_t*);
static inline int access(const char* path, int mode) { return _access(path, mode); } static inline int access(const char* path, int mode) { return _access(path, mode); }
static inline int chmod(const char* path, int mode) { return _chmod(path, mode); } static inline int chmod(const char* path, int mode) { return _chmod(path, mode); }
static inline int chsize(int fd, long size) { return _chsize(fd, size); } static inline int chsize(int fd, __msvcrt_long size) { return _chsize(fd, size); }
static inline int close(int fd) { return _close(fd); } static inline int close(int fd) { return _close(fd); }
static inline int creat(const char* path, int mode) { return _creat(path, mode); } static inline int creat(const char* path, int mode) { return _creat(path, mode); }
static inline int dup(int od) { return _dup(od); } static inline int dup(int od) { return _dup(od); }
static inline int dup2(int od, int nd) { return _dup2(od, nd); } static inline int dup2(int od, int nd) { return _dup2(od, nd); }
static inline int eof(int fd) { return _eof(fd); } static inline int eof(int fd) { return _eof(fd); }
static inline long filelength(int fd) { return _filelength(fd); } static inline __msvcrt_long filelength(int fd) { return _filelength(fd); }
static inline int isatty(int fd) { return _isatty(fd); } static inline int isatty(int fd) { return _isatty(fd); }
static inline int locking(int fd, int mode, long size) { return _locking(fd, mode, size); } static inline int locking(int fd, int mode, __msvcrt_long size) { return _locking(fd, mode, size); }
static inline long lseek(int fd, long off, int where) { return _lseek(fd, off, where); } static inline __msvcrt_long lseek(int fd, __msvcrt_long off, int where) { return _lseek(fd, off, where); }
static inline char* mktemp(char* pat) { return _mktemp(pat); } static inline char* mktemp(char* pat) { return _mktemp(pat); }
static inline int read(int fd, void* buf, unsigned int size) { return _read(fd, buf, size); } static inline int read(int fd, void* buf, unsigned int size) { return _read(fd, buf, size); }
static inline int setmode(int fd, int mode) { return _setmode(fd, mode); } static inline int setmode(int fd, int mode) { return _setmode(fd, mode); }
static inline long tell(int fd) { return _tell(fd); } static inline __msvcrt_long tell(int fd) { return _tell(fd); }
#ifndef _UMASK_DEFINED #ifndef _UMASK_DEFINED
static inline int umask(int fd) { return _umask(fd); } static inline int umask(int fd) { return _umask(fd); }
#define _UMASK_DEFINED #define _UMASK_DEFINED
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
extern "C" { extern "C" {
#endif #endif
unsigned long __cdecl __threadid(void); __msvcrt_ulong __cdecl __threadid(void);
unsigned long __cdecl __threadhandle(void); __msvcrt_ulong __cdecl __threadhandle(void);
#define _threadid (__threadid()) #define _threadid (__threadid())
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -133,9 +133,9 @@ int __cdecl fputs(const char*,FILE*); ...@@ -133,9 +133,9 @@ int __cdecl fputs(const char*,FILE*);
size_t __cdecl fread(void*,size_t,size_t,FILE*); size_t __cdecl fread(void*,size_t,size_t,FILE*);
FILE* __cdecl freopen(const char*,const char*,FILE*); FILE* __cdecl freopen(const char*,const char*,FILE*);
int __cdecl fscanf(FILE*,const char*,...); int __cdecl fscanf(FILE*,const char*,...);
int __cdecl fseek(FILE*,long,int); int __cdecl fseek(FILE*,__msvcrt_long,int);
int __cdecl fsetpos(FILE*,fpos_t*); int __cdecl fsetpos(FILE*,fpos_t*);
long __cdecl ftell(FILE*); __msvcrt_long __cdecl ftell(FILE*);
size_t __cdecl fwrite(const void*,size_t,size_t,FILE*); size_t __cdecl fwrite(const void*,size_t,size_t,FILE*);
int __cdecl getc(FILE*); int __cdecl getc(FILE*);
int __cdecl getchar(void); int __cdecl getchar(void);
......
...@@ -54,8 +54,8 @@ typedef struct _div_t { ...@@ -54,8 +54,8 @@ typedef struct _div_t {
} div_t; } div_t;
typedef struct _ldiv_t { typedef struct _ldiv_t {
long quot; __msvcrt_long quot;
long rem; __msvcrt_long rem;
} ldiv_t; } ldiv_t;
#define __max(a,b) (((a) > (b)) ? (a) : (b)) #define __max(a,b) (((a) > (b)) ? (a) : (b))
...@@ -116,7 +116,7 @@ extern unsigned int _fmode; ...@@ -116,7 +116,7 @@ extern unsigned int _fmode;
extern int* __cdecl ___mb_cur_max_func(void); extern int* __cdecl ___mb_cur_max_func(void);
#define __mb_cur_max (*___mb_cur_max_func()) #define __mb_cur_max (*___mb_cur_max_func())
extern unsigned long* __cdecl __doserrno(void); extern __msvcrt_ulong* __cdecl __doserrno(void);
#define _doserrno (*__doserrno()) #define _doserrno (*__doserrno())
extern int* __cdecl _errno(void); extern int* __cdecl _errno(void);
#define errno (*_errno()) #define errno (*_errno())
...@@ -142,9 +142,9 @@ char* __cdecl _fullpath(char*,const char*,size_t); ...@@ -142,9 +142,9 @@ char* __cdecl _fullpath(char*,const char*,size_t);
char* __cdecl _gcvt(double,int,char*); char* __cdecl _gcvt(double,int,char*);
char* __cdecl _i64toa(__int64,char*,int); char* __cdecl _i64toa(__int64,char*,int);
char* __cdecl _itoa(int,char*,int); char* __cdecl _itoa(int,char*,int);
char* __cdecl _ltoa(long,char*,int); char* __cdecl _ltoa(__msvcrt_long,char*,int);
unsigned long __cdecl _lrotl(unsigned long,int); __msvcrt_ulong __cdecl _lrotl(__msvcrt_ulong,int);
unsigned long __cdecl _lrotr(unsigned long,int); __msvcrt_ulong __cdecl _lrotr(__msvcrt_ulong,int);
void __cdecl _makepath(char*,const char*,const char*,const char*,const char*); void __cdecl _makepath(char*,const char*,const char*,const char*,const char*);
size_t __cdecl _mbstrlen(const char*); size_t __cdecl _mbstrlen(const char*);
_onexit_t __cdecl _onexit(_onexit_t); _onexit_t __cdecl _onexit(_onexit_t);
...@@ -154,12 +154,12 @@ unsigned int __cdecl _rotr(unsigned int,int); ...@@ -154,12 +154,12 @@ unsigned int __cdecl _rotr(unsigned int,int);
void __cdecl _searchenv(const char*,const char*,char*); void __cdecl _searchenv(const char*,const char*,char*);
int __cdecl _set_error_mode(int); int __cdecl _set_error_mode(int);
void __cdecl _seterrormode(int); void __cdecl _seterrormode(int);
void __cdecl _sleep(unsigned long); void __cdecl _sleep(__msvcrt_ulong);
void __cdecl _splitpath(const char*,char*,char*,char*,char*); void __cdecl _splitpath(const char*,char*,char*,char*,char*);
long double __cdecl _strtold(const char*,char**); long double __cdecl _strtold(const char*,char**);
void __cdecl _swab(char*,char*,int); void __cdecl _swab(char*,char*,int);
char* __cdecl _ui64toa(unsigned __int64,char*,int); char* __cdecl _ui64toa(unsigned __int64,char*,int);
char* __cdecl _ultoa(unsigned long,char*,int); char* __cdecl _ultoa(__msvcrt_ulong,char*,int);
void __cdecl _exit(int); void __cdecl _exit(int);
void __cdecl abort(void); void __cdecl abort(void);
...@@ -167,16 +167,16 @@ int __cdecl abs(int); ...@@ -167,16 +167,16 @@ int __cdecl abs(int);
int __cdecl atexit(void (*)(void)); int __cdecl atexit(void (*)(void));
double __cdecl atof(const char*); double __cdecl atof(const char*);
int __cdecl atoi(const char*); int __cdecl atoi(const char*);
long __cdecl atol(const char*); __msvcrt_long __cdecl atol(const char*);
void* __cdecl calloc(size_t,size_t); void* __cdecl calloc(size_t,size_t);
#ifndef __i386__ #ifndef __i386__
div_t __cdecl div(int,int); div_t __cdecl div(int,int);
ldiv_t __cdecl ldiv(long,long); ldiv_t __cdecl ldiv(__msvcrt_long,__msvcrt_long);
#endif #endif
void __cdecl exit(int); void __cdecl exit(int);
void __cdecl free(void*); void __cdecl free(void*);
char* __cdecl getenv(const char*); char* __cdecl getenv(const char*);
long __cdecl labs(long); __msvcrt_long __cdecl labs(__msvcrt_long);
void* __cdecl malloc(size_t); void* __cdecl malloc(size_t);
int __cdecl mblen(const char*,size_t); int __cdecl mblen(const char*,size_t);
void __cdecl perror(const char*); void __cdecl perror(const char*);
...@@ -184,8 +184,8 @@ int __cdecl rand(void); ...@@ -184,8 +184,8 @@ int __cdecl rand(void);
void* __cdecl realloc(void*,size_t); void* __cdecl realloc(void*,size_t);
void __cdecl srand(unsigned int); void __cdecl srand(unsigned int);
double __cdecl strtod(const char*,char**); double __cdecl strtod(const char*,char**);
long __cdecl strtol(const char*,char**,int); __msvcrt_long __cdecl strtol(const char*,char**,int);
unsigned long __cdecl strtoul(const char*,char**,int); __msvcrt_ulong __cdecl strtoul(const char*,char**,int);
int __cdecl system(const char*); int __cdecl system(const char*);
void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (*)(const void*,const void*)); void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (*)(const void*,const void*));
void __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*)); void __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*));
...@@ -194,9 +194,9 @@ void __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*) ...@@ -194,9 +194,9 @@ void __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*)
#define _WSTDLIB_DEFINED #define _WSTDLIB_DEFINED
wchar_t* __cdecl _itow(int,wchar_t*,int); wchar_t* __cdecl _itow(int,wchar_t*,int);
wchar_t* __cdecl _i64tow(__int64,wchar_t*,int); wchar_t* __cdecl _i64tow(__int64,wchar_t*,int);
wchar_t* __cdecl _ltow(long,wchar_t*,int); wchar_t* __cdecl _ltow(__msvcrt_long,wchar_t*,int);
wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int); wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
wchar_t* __cdecl _ultow(unsigned long,wchar_t*,int); wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
wchar_t* __cdecl _wgetenv(const wchar_t*); wchar_t* __cdecl _wgetenv(const wchar_t*);
void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
...@@ -207,14 +207,14 @@ void __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wcha ...@@ -207,14 +207,14 @@ void __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wcha
int __cdecl _wsystem(const wchar_t*); int __cdecl _wsystem(const wchar_t*);
int __cdecl _wtoi(const wchar_t*); int __cdecl _wtoi(const wchar_t*);
__int64 __cdecl _wtoi64(const wchar_t*); __int64 __cdecl _wtoi64(const wchar_t*);
long __cdecl _wtol(const wchar_t*); __msvcrt_long __cdecl _wtol(const wchar_t*);
size_t __cdecl mbstowcs(wchar_t*,const char*,size_t); size_t __cdecl mbstowcs(wchar_t*,const char*,size_t);
int __cdecl mbtowc(wchar_t*,const char*,size_t); int __cdecl mbtowc(wchar_t*,const char*,size_t);
double __cdecl wcstod(const wchar_t*,wchar_t**); double __cdecl wcstod(const wchar_t*,wchar_t**);
long __cdecl wcstol(const wchar_t*,wchar_t**,int); __msvcrt_long __cdecl wcstol(const wchar_t*,wchar_t**,int);
size_t __cdecl wcstombs(char*,const wchar_t*,size_t); size_t __cdecl wcstombs(char*,const wchar_t*,size_t);
unsigned long __cdecl wcstoul(const wchar_t*,wchar_t**,int); __msvcrt_ulong __cdecl wcstoul(const wchar_t*,wchar_t**,int);
int __cdecl wctomb(char*,wchar_t); int __cdecl wctomb(char*,wchar_t);
#endif /* _WSTDLIB_DEFINED */ #endif /* _WSTDLIB_DEFINED */
...@@ -230,11 +230,11 @@ static inline char* ecvt(double value, int ndigit, int* decpt, int* sign) { retu ...@@ -230,11 +230,11 @@ static inline char* ecvt(double value, int ndigit, int* decpt, int* sign) { retu
static inline char* fcvt(double value, int ndigit, int* decpt, int* sign) { return _fcvt(value, ndigit, decpt, sign); } static inline char* fcvt(double value, int ndigit, int* decpt, int* sign) { return _fcvt(value, ndigit, decpt, sign); }
static inline char* gcvt(double value, int ndigit, char* buf) { return _gcvt(value, ndigit, buf); } static inline char* gcvt(double value, int ndigit, char* buf) { return _gcvt(value, ndigit, buf); }
static inline char* itoa(int value, char* str, int radix) { return _itoa(value, str, radix); } static inline char* itoa(int value, char* str, int radix) { return _itoa(value, str, radix); }
static inline char* ltoa(long value, char* str, int radix) { return _ltoa(value, str, radix); } static inline char* ltoa(__msvcrt_long value, char* str, int radix) { return _ltoa(value, str, radix); }
static inline _onexit_t onexit(_onexit_t func) { return _onexit(func); } static inline _onexit_t onexit(_onexit_t func) { return _onexit(func); }
static inline int putenv(const char* str) { return _putenv(str); } static inline int putenv(const char* str) { return _putenv(str); }
static inline void swab(char* src, char* dst, int len) { _swab(src, dst, len); } static inline void swab(char* src, char* dst, int len) { _swab(src, dst, len); }
static inline char* ultoa(unsigned long value, char* str, int radix) { return _ultoa(value, str, radix); } static inline char* ultoa(__msvcrt_ulong value, char* str, int radix) { return _ultoa(value, str, radix); }
#ifdef __i386__ #ifdef __i386__
static inline div_t __wine_msvcrt_div(int num, int denom) static inline div_t __wine_msvcrt_div(int num, int denom)
...@@ -246,13 +246,13 @@ static inline div_t __wine_msvcrt_div(int num, int denom) ...@@ -246,13 +246,13 @@ static inline div_t __wine_msvcrt_div(int num, int denom)
ret.rem = (int)(res >> 32); ret.rem = (int)(res >> 32);
return ret; return ret;
} }
static inline ldiv_t __wine_msvcrt_ldiv(long num, long denom) static inline ldiv_t __wine_msvcrt_ldiv(__msvcrt_long num, __msvcrt_long denom)
{ {
extern unsigned __int64 ldiv(long,long); extern unsigned __int64 ldiv(__msvcrt_long,__msvcrt_long);
ldiv_t ret; ldiv_t ret;
unsigned __int64 res = ldiv(num,denom); unsigned __int64 res = ldiv(num,denom);
ret.quot = (long)res; ret.quot = (__msvcrt_long)res;
ret.rem = (long)(res >> 32); ret.rem = (__msvcrt_long)(res >> 32);
return ret; return ret;
} }
#define div(num,denom) __wine_msvcrt_div(num,denom) #define div(num,denom) __wine_msvcrt_div(num,denom)
......
...@@ -46,7 +46,7 @@ typedef int _off_t; ...@@ -46,7 +46,7 @@ typedef int _off_t;
typedef unsigned char u_char; typedef unsigned char u_char;
typedef unsigned short u_short; typedef unsigned short u_short;
typedef unsigned int u_int; typedef unsigned int u_int;
typedef unsigned long u_long; typedef __msvcrt_ulong u_long;
#define _BSDTYPES_DEFINED #define _BSDTYPES_DEFINED
#endif #endif
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <pshpack8.h> #include <pshpack8.h>
#ifndef _CLOCK_T_DEFINED #ifndef _CLOCK_T_DEFINED
typedef long clock_t; typedef __msvcrt_long clock_t;
#define _CLOCK_T_DEFINED #define _CLOCK_T_DEFINED
#endif #endif
...@@ -67,13 +67,13 @@ extern "C" { ...@@ -67,13 +67,13 @@ extern "C" {
#define _tzname (__p__tzname()) #define _tzname (__p__tzname())
int * __cdecl __p__daylight(void); int * __cdecl __p__daylight(void);
long * __cdecl __p__dstbias(void); __msvcrt_long * __cdecl __p__dstbias(void);
long * __cdecl __p__timezone(void); __msvcrt_long * __cdecl __p__timezone(void);
char ** __cdecl __p__tzname(void); char ** __cdecl __p__tzname(void);
#else #else
extern int _daylight; extern int _daylight;
extern long _dstbias; extern __msvcrt_long _dstbias;
extern long _timezone; extern __msvcrt_long _timezone;
extern char *_tzname; extern char *_tzname;
#endif #endif
......
...@@ -45,7 +45,7 @@ typedef int mbstate_t; ...@@ -45,7 +45,7 @@ typedef int mbstate_t;
#endif #endif
#ifndef _FSIZE_T_DEFINED #ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t; typedef __msvcrt_ulong _fsize_t;
#define _FSIZE_T_DEFINED #define _FSIZE_T_DEFINED
#endif #endif
...@@ -224,10 +224,10 @@ int __cdecl _wrmdir(const wchar_t*); ...@@ -224,10 +224,10 @@ int __cdecl _wrmdir(const wchar_t*);
int __cdecl _waccess(const wchar_t*,int); int __cdecl _waccess(const wchar_t*,int);
int __cdecl _wchmod(const wchar_t*,int); int __cdecl _wchmod(const wchar_t*,int);
int __cdecl _wcreat(const wchar_t*,int); int __cdecl _wcreat(const wchar_t*,int);
long __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*); __msvcrt_long __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*);
long __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); __msvcrt_long __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
int __cdecl _wfindnext(long,struct _wfinddata_t*); int __cdecl _wfindnext(__msvcrt_long,struct _wfinddata_t*);
int __cdecl _wfindnexti64(long, struct _wfinddatai64_t*); int __cdecl _wfindnexti64(__msvcrt_long, struct _wfinddatai64_t*);
wchar_t* __cdecl _wmktemp(wchar_t*); wchar_t* __cdecl _wmktemp(wchar_t*);
int __cdecl _wopen(const wchar_t*,int,...); int __cdecl _wopen(const wchar_t*,int,...);
int __cdecl _wrename(const wchar_t*,const wchar_t*); int __cdecl _wrename(const wchar_t*,const wchar_t*);
...@@ -314,9 +314,9 @@ int __cdecl wscanf(const wchar_t*,...); ...@@ -314,9 +314,9 @@ int __cdecl wscanf(const wchar_t*,...);
#define _WSTDLIB_DEFINED #define _WSTDLIB_DEFINED
wchar_t* __cdecl _itow(int,wchar_t*,int); wchar_t* __cdecl _itow(int,wchar_t*,int);
wchar_t* __cdecl _i64tow(__int64,wchar_t*,int); wchar_t* __cdecl _i64tow(__int64,wchar_t*,int);
wchar_t* __cdecl _ltow(long,wchar_t*,int); wchar_t* __cdecl _ltow(__msvcrt_long,wchar_t*,int);
wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int); wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
wchar_t* __cdecl _ultow(unsigned long,wchar_t*,int); wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t); wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
wchar_t* __cdecl _wgetenv(const wchar_t*); wchar_t* __cdecl _wgetenv(const wchar_t*);
void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*); void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
...@@ -327,14 +327,14 @@ void __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*) ...@@ -327,14 +327,14 @@ void __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*)
int __cdecl _wsystem(const wchar_t*); int __cdecl _wsystem(const wchar_t*);
int __cdecl _wtoi(const wchar_t*); int __cdecl _wtoi(const wchar_t*);
__int64 __cdecl _wtoi64(const wchar_t*); __int64 __cdecl _wtoi64(const wchar_t*);
long __cdecl _wtol(const wchar_t*); __msvcrt_long __cdecl _wtol(const wchar_t*);
size_t __cdecl mbstowcs(wchar_t*,const char*,size_t); size_t __cdecl mbstowcs(wchar_t*,const char*,size_t);
int __cdecl mbtowc(wchar_t*,const char*,size_t); int __cdecl mbtowc(wchar_t*,const char*,size_t);
double __cdecl wcstod(const wchar_t*,wchar_t**); double __cdecl wcstod(const wchar_t*,wchar_t**);
long __cdecl wcstol(const wchar_t*,wchar_t**,int); __msvcrt_long __cdecl wcstol(const wchar_t*,wchar_t**,int);
size_t __cdecl wcstombs(char*,const wchar_t*,size_t); size_t __cdecl wcstombs(char*,const wchar_t*,size_t);
unsigned long __cdecl wcstoul(const wchar_t*,wchar_t**,int); __msvcrt_ulong __cdecl wcstoul(const wchar_t*,wchar_t**,int);
int __cdecl wctomb(char*,wchar_t); int __cdecl wctomb(char*,wchar_t);
#endif /* _WSTDLIB_DEFINED */ #endif /* _WSTDLIB_DEFINED */
......
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