Commit fa272ada authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use simple type definitions from public header.

parent 758460fa
......@@ -20,6 +20,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "windef.h"
#include "winternl.h"
......@@ -1931,7 +1932,7 @@ void __cdecl __ExceptionPtrCurrentException(exception_ptr *ep)
* ?__ExceptionPtrToBool@@YA_NPBX@Z
* ?__ExceptionPtrToBool@@YA_NPEBX@Z
*/
MSVCRT_bool __cdecl __ExceptionPtrToBool(exception_ptr *ep)
bool __cdecl __ExceptionPtrToBool(exception_ptr *ep)
{
return !!ep->rec;
}
......@@ -2020,7 +2021,7 @@ void __cdecl __ExceptionPtrCopyException(exception_ptr *ep,
}
#endif
MSVCRT_bool __cdecl __ExceptionPtrCompare(const exception_ptr *ep1, const exception_ptr *ep2)
bool __cdecl __ExceptionPtrCompare(const exception_ptr *ep1, const exception_ptr *ep2)
{
return ep1->rec == ep2->rec;
}
......@@ -2048,7 +2049,7 @@ typedef struct
char name[1];
} type_info_entry;
static void* CDECL type_info_entry_malloc(MSVCRT_size_t size)
static void* CDECL type_info_entry_malloc(size_t size)
{
type_info_entry *ret = MSVCRT_malloc(FIELD_OFFSET(type_info_entry, name) + size);
return ret->name;
......@@ -2123,9 +2124,9 @@ void CDECL MSVCRT_type_info_destroy_list(SLIST_HEADER *header)
/******************************************************************
* __std_type_info_hash (UCRTBASE.@)
*/
MSVCRT_size_t CDECL MSVCRT_type_info_hash(const type_info140 *ti)
size_t CDECL MSVCRT_type_info_hash(const type_info140 *ti)
{
MSVCRT_size_t hash, fnv_prime;
size_t hash, fnv_prime;
const char *p;
#ifdef _WIN64
......
......@@ -211,10 +211,10 @@ int CDECL _wputenv_s(const wchar_t *name, const wchar_t *value)
/******************************************************************
* _dupenv_s (MSVCR80.@)
*/
int CDECL _dupenv_s(char **buffer, MSVCRT_size_t *numberOfElements, const char *varname)
int CDECL _dupenv_s(char **buffer, size_t *numberOfElements, const char *varname)
{
char* e;
MSVCRT_size_t sz;
char *e;
size_t sz;
if (!MSVCRT_CHECK_PMT(buffer != NULL)) return MSVCRT_EINVAL;
if (!MSVCRT_CHECK_PMT(varname != NULL)) return MSVCRT_EINVAL;
......@@ -235,11 +235,11 @@ int CDECL _dupenv_s(char **buffer, MSVCRT_size_t *numberOfElements, const char *
/******************************************************************
* _wdupenv_s (MSVCR80.@)
*/
int CDECL _wdupenv_s(wchar_t **buffer, MSVCRT_size_t *numberOfElements,
int CDECL _wdupenv_s(wchar_t **buffer, size_t *numberOfElements,
const wchar_t *varname)
{
wchar_t* e;
MSVCRT_size_t sz;
wchar_t *e;
size_t sz;
if (!MSVCRT_CHECK_PMT(buffer != NULL)) return MSVCRT_EINVAL;
if (!MSVCRT_CHECK_PMT(varname != NULL)) return MSVCRT_EINVAL;
......@@ -262,9 +262,9 @@ int CDECL _wdupenv_s(wchar_t **buffer, MSVCRT_size_t *numberOfElements,
/******************************************************************
* getenv_s (MSVCRT.@)
*/
int CDECL getenv_s(MSVCRT_size_t *pReturnValue, char* buffer, MSVCRT_size_t numberOfElements, const char *varname)
int CDECL getenv_s(size_t *pReturnValue, char* buffer, size_t numberOfElements, const char *varname)
{
char* e;
char *e;
if (!MSVCRT_CHECK_PMT(pReturnValue != NULL)) return MSVCRT_EINVAL;
if (!MSVCRT_CHECK_PMT(!(buffer == NULL && numberOfElements > 0))) return MSVCRT_EINVAL;
......@@ -287,10 +287,10 @@ int CDECL getenv_s(MSVCRT_size_t *pReturnValue, char* buffer, MSVCRT_size_t numb
/******************************************************************
* _wgetenv_s (MSVCRT.@)
*/
int CDECL _wgetenv_s(MSVCRT_size_t *pReturnValue, wchar_t *buffer, MSVCRT_size_t numberOfElements,
int CDECL _wgetenv_s(size_t *pReturnValue, wchar_t *buffer, size_t numberOfElements,
const wchar_t *varname)
{
wchar_t* e;
wchar_t *e;
if (!MSVCRT_CHECK_PMT(pReturnValue != NULL)) return MSVCRT_EINVAL;
if (!MSVCRT_CHECK_PMT(!(buffer == NULL && numberOfElements > 0))) return MSVCRT_EINVAL;
......
......@@ -131,7 +131,7 @@ static MSVCRT_invalid_parameter_handler invalid_parameter_handler = NULL;
void msvcrt_set_errno(int err)
{
int *errno_ptr = MSVCRT__errno();
MSVCRT_ulong *doserrno = MSVCRT___doserrno();
__msvcrt_ulong *doserrno = MSVCRT___doserrno();
*doserrno = err;
......@@ -219,7 +219,7 @@ int* CDECL MSVCRT__errno(void)
/*********************************************************************
* __doserrno (MSVCRT.@)
*/
MSVCRT_ulong* CDECL MSVCRT___doserrno(void)
__msvcrt_ulong* CDECL MSVCRT___doserrno(void)
{
return &msvcrt_get_thread_data()->thread_doserrno;
}
......@@ -284,7 +284,7 @@ char* CDECL MSVCRT_strerror(int err)
/**********************************************************************
* strerror_s (MSVCRT.@)
*/
int CDECL MSVCRT_strerror_s(char *buffer, MSVCRT_size_t numberOfElements, int errnum)
int CDECL MSVCRT_strerror_s(char *buffer, size_t numberOfElements, int errnum)
{
char *ptr;
......@@ -352,7 +352,7 @@ void CDECL MSVCRT_perror(const char* str)
*/
void CDECL MSVCRT__wperror(const wchar_t* str)
{
MSVCRT_size_t size;
size_t size;
char *buffer = NULL;
if (str && *str)
......@@ -375,7 +375,7 @@ void CDECL MSVCRT__wperror(const wchar_t* str)
/*********************************************************************
* _wcserror_s (MSVCRT.@)
*/
int CDECL MSVCRT__wcserror_s(wchar_t* buffer, MSVCRT_size_t nc, int err)
int CDECL MSVCRT__wcserror_s(wchar_t* buffer, size_t nc, int err)
{
if (!MSVCRT_CHECK_PMT(buffer != NULL)) return MSVCRT_EINVAL;
if (!MSVCRT_CHECK_PMT(nc > 0)) return MSVCRT_EINVAL;
......@@ -401,7 +401,7 @@ wchar_t* CDECL MSVCRT__wcserror(int err)
/**********************************************************************
* __wcserror_s (MSVCRT.@)
*/
int CDECL MSVCRT___wcserror_s(wchar_t* buffer, MSVCRT_size_t nc, const wchar_t* str)
int CDECL MSVCRT___wcserror_s(wchar_t* buffer, size_t nc, const wchar_t* str)
{
int err;
size_t len;
......
......@@ -22,6 +22,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
......@@ -470,8 +471,8 @@ void CDECL __CxxUnregisterExceptionObject(cxx_frame_info *frame_info, BOOL in_us
}
struct __std_exception_data {
char *what;
MSVCRT_bool dofree;
char *what;
bool dofree;
};
#if _MSVCR_VER>=140
......
......@@ -1932,7 +1932,7 @@ _locale_t CDECL _create_locale(int category, const char *locale)
_locale_t CDECL MSVCRT__wcreate_locale(int category, const wchar_t *locale)
{
_locale_t loc;
MSVCRT_size_t len;
size_t len;
char *str;
if(category<MSVCRT_LC_MIN || category>MSVCRT_LC_MAX || !locale)
......@@ -2018,7 +2018,7 @@ wchar_t* CDECL MSVCRT__wsetlocale(int category, const wchar_t* wlocale)
char *locale = NULL;
const char *ret;
MSVCRT_size_t len;
size_t len;
if(wlocale) {
len = MSVCRT_wcstombs(NULL, wlocale, 0);
......
......@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "wine/debug.h"
#include "windef.h"
......@@ -243,7 +244,7 @@ void __thiscall SpinWait__Reset(SpinWait *this)
/* ?_ShouldSpinAgain@?$_SpinWait@$0A@@details@Concurrency@@IAE_NXZ */
/* ?_ShouldSpinAgain@?$_SpinWait@$0A@@details@Concurrency@@IEAA_NXZ */
DEFINE_THISCALL_WRAPPER(SpinWait__ShouldSpinAgain, 4)
MSVCRT_bool __thiscall SpinWait__ShouldSpinAgain(SpinWait *this)
bool __thiscall SpinWait__ShouldSpinAgain(SpinWait *this)
{
TRACE("(%p)\n", this);
......@@ -256,7 +257,7 @@ MSVCRT_bool __thiscall SpinWait__ShouldSpinAgain(SpinWait *this)
/* ?_SpinOnce@?$_SpinWait@$0A@@details@Concurrency@@QAE_NXZ */
/* ?_SpinOnce@?$_SpinWait@$0A@@details@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER(SpinWait__SpinOnce, 4)
MSVCRT_bool __thiscall SpinWait__SpinOnce(SpinWait *this)
bool __thiscall SpinWait__SpinOnce(SpinWait *this)
{
switch(this->state) {
case SPINWAIT_INIT:
......@@ -390,7 +391,7 @@ void __thiscall critical_section_lock(critical_section *this)
/* ?try_lock@critical_section@Concurrency@@QAE_NXZ */
/* ?try_lock@critical_section@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER(critical_section_try_lock, 4)
MSVCRT_bool __thiscall critical_section_try_lock(critical_section *this)
bool __thiscall critical_section_try_lock(critical_section *this)
{
cs_queue q;
......@@ -459,7 +460,7 @@ critical_section* __thiscall critical_section_native_handle(critical_section *th
/* ?try_lock_for@critical_section@Concurrency@@QAE_NI@Z */
/* ?try_lock_for@critical_section@Concurrency@@QEAA_NI@Z */
DEFINE_THISCALL_WRAPPER(critical_section_try_lock_for, 8)
MSVCRT_bool __thiscall critical_section_try_lock_for(
bool __thiscall critical_section_try_lock_for(
critical_section *this, unsigned int timeout)
{
cs_queue *q, *last;
......@@ -758,9 +759,9 @@ static void evt_remove_queue(thread_wait_entry **head, thread_wait_entry *entry)
if(entry->next) entry->next->prev = entry->prev;
}
static MSVCRT_size_t evt_end_wait(thread_wait *wait, event **events, int count)
static size_t evt_end_wait(thread_wait *wait, event **events, int count)
{
MSVCRT_size_t i, ret = COOPERATIVE_WAIT_TIMEOUT;
size_t i, ret = COOPERATIVE_WAIT_TIMEOUT;
for(i = 0; i < count; i++) {
critical_section_lock(&events[i]->cs);
......@@ -777,7 +778,7 @@ static inline int evt_transition(void **state, void *from, void *to)
return InterlockedCompareExchangePointer(state, to, from) == from;
}
static MSVCRT_size_t evt_wait(thread_wait *wait, event **events, int count, MSVCRT_bool wait_all, unsigned int timeout)
static size_t evt_wait(thread_wait *wait, event **events, int count, bool wait_all, unsigned int timeout)
{
int i;
NTSTATUS status;
......@@ -893,10 +894,10 @@ void __thiscall event_set(event *this)
/* ?wait@event@Concurrency@@QAEII@Z */
/* ?wait@event@Concurrency@@QEAA_KI@Z */
DEFINE_THISCALL_WRAPPER(event_wait, 8)
MSVCRT_size_t __thiscall event_wait(event *this, unsigned int timeout)
size_t __thiscall event_wait(event *this, unsigned int timeout)
{
thread_wait wait;
MSVCRT_size_t signaled;
size_t signaled;
TRACE("(%p %u)\n", this, timeout);
......@@ -910,10 +911,10 @@ MSVCRT_size_t __thiscall event_wait(event *this, unsigned int timeout)
/* ?wait_for_multiple@event@Concurrency@@SAIPAPAV12@I_NI@Z */
/* ?wait_for_multiple@event@Concurrency@@SA_KPEAPEAV12@_K_NI@Z */
int __cdecl event_wait_for_multiple(event **events, MSVCRT_size_t count, MSVCRT_bool wait_all, unsigned int timeout)
int __cdecl event_wait_for_multiple(event **events, size_t count, bool wait_all, unsigned int timeout)
{
thread_wait *wait;
MSVCRT_size_t ret;
size_t ret;
TRACE("(%p %Iu %d %u)\n", events, count, wait_all, timeout);
......@@ -994,7 +995,7 @@ void __thiscall _Condition_variable_wait(_Condition_variable *this, critical_sec
/* ?wait_for@_Condition_variable@details@Concurrency@@QAE_NAAVcritical_section@3@I@Z */
/* ?wait_for@_Condition_variable@details@Concurrency@@QEAA_NAEAVcritical_section@3@I@Z */
DEFINE_THISCALL_WRAPPER(_Condition_variable_wait_for, 12)
MSVCRT_bool __thiscall _Condition_variable_wait_for(_Condition_variable *this,
bool __thiscall _Condition_variable_wait_for(_Condition_variable *this,
critical_section *cs, unsigned int timeout)
{
LARGE_INTEGER to;
......@@ -1247,7 +1248,7 @@ void __thiscall reader_writer_lock_lock_read(reader_writer_lock *this)
/* ?try_lock@reader_writer_lock@Concurrency@@QAE_NXZ */
/* ?try_lock@reader_writer_lock@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER(reader_writer_lock_try_lock, 4)
MSVCRT_bool __thiscall reader_writer_lock_try_lock(reader_writer_lock *this)
bool __thiscall reader_writer_lock_try_lock(reader_writer_lock *this)
{
rwl_queue q = { NULL };
......@@ -1286,7 +1287,7 @@ MSVCRT_bool __thiscall reader_writer_lock_try_lock(reader_writer_lock *this)
/* ?try_lock_read@reader_writer_lock@Concurrency@@QAE_NXZ */
/* ?try_lock_read@reader_writer_lock@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER(reader_writer_lock_try_lock_read, 4)
MSVCRT_bool __thiscall reader_writer_lock_try_lock_read(reader_writer_lock *this)
bool __thiscall reader_writer_lock_try_lock_read(reader_writer_lock *this)
{
LONG count;
......@@ -1431,7 +1432,7 @@ void __thiscall _ReentrantBlockingLock__Release(_ReentrantBlockingLock *this)
/* ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QAE_NXZ */
/* ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QEAA_NXZ */
DEFINE_THISCALL_WRAPPER(_ReentrantBlockingLock__TryAcquire, 4)
MSVCRT_bool __thiscall _ReentrantBlockingLock__TryAcquire(_ReentrantBlockingLock *this)
bool __thiscall _ReentrantBlockingLock__TryAcquire(_ReentrantBlockingLock *this)
{
TRACE("(%p)\n", this);
return TryEnterCriticalSection(&this->cs);
......
......@@ -1441,7 +1441,7 @@ unsigned int CDECL _rotl(unsigned int num, int shift)
/*********************************************************************
* _lrotl (MSVCRT.@)
*/
MSVCRT_ulong CDECL MSVCRT__lrotl(MSVCRT_ulong num, int shift)
__msvcrt_ulong CDECL MSVCRT__lrotl(__msvcrt_ulong num, int shift)
{
shift &= 0x1f;
return (num << shift) | (num >> (32-shift));
......@@ -1450,7 +1450,7 @@ MSVCRT_ulong CDECL MSVCRT__lrotl(MSVCRT_ulong num, int shift)
/*********************************************************************
* _lrotr (MSVCRT.@)
*/
MSVCRT_ulong CDECL MSVCRT__lrotr(MSVCRT_ulong num, int shift)
__msvcrt_ulong CDECL MSVCRT__lrotr(__msvcrt_ulong num, int shift)
{
shift &= 0x1f;
return (num >> shift) | (num << (32-shift));
......@@ -1494,7 +1494,7 @@ int CDECL MSVCRT_abs( int n )
/*********************************************************************
* labs (MSVCRT.@)
*/
MSVCRT_long CDECL MSVCRT_labs( MSVCRT_long n )
__msvcrt_long CDECL MSVCRT_labs( __msvcrt_long n )
{
return n >= 0 ? n : -n;
}
......@@ -1503,7 +1503,7 @@ MSVCRT_long CDECL MSVCRT_labs( MSVCRT_long n )
/*********************************************************************
* llabs (MSVCR100.@)
*/
MSVCRT_longlong CDECL MSVCRT_llabs( MSVCRT_longlong n )
__int64 CDECL MSVCRT_llabs( __int64 n )
{
return n >= 0 ? n : -n;
}
......@@ -1756,7 +1756,7 @@ int * CDECL __fpecode(void)
/*********************************************************************
* ldexp (MSVCRT.@)
*/
double CDECL MSVCRT_ldexp(double num, MSVCRT_long exp)
double CDECL MSVCRT_ldexp(double num, __msvcrt_long exp)
{
double z = unix_funcs->ldexp(num,exp);
......@@ -2433,7 +2433,7 @@ char * CDECL MSVCRT__ecvt( double number, int ndigits, int *decpt, int *sign )
/*********************************************************************
* _ecvt_s (MSVCRT.@)
*/
int CDECL MSVCRT__ecvt_s( char *buffer, MSVCRT_size_t length, double number, int ndigits, int *decpt, int *sign )
int CDECL MSVCRT__ecvt_s( char *buffer, size_t length, double number, int ndigits, int *decpt, int *sign )
{
int prec, len;
char *result;
......@@ -2576,7 +2576,7 @@ char * CDECL MSVCRT__fcvt( double number, int ndigits, int *decpt, int *sign )
/***********************************************************************
* _fcvt_s (MSVCRT.@)
*/
int CDECL MSVCRT__fcvt_s(char* outbuffer, MSVCRT_size_t size, double number, int ndigits, int *decpt, int *sign)
int CDECL MSVCRT__fcvt_s(char* outbuffer, size_t size, double number, int ndigits, int *decpt, int *sign)
{
int stop, dec1, dec2;
char *ptr1, *ptr2, *first;
......@@ -2683,7 +2683,7 @@ char * CDECL MSVCRT__gcvt( double number, int ndigit, char *buff )
/***********************************************************************
* _gcvt_s (MSVCRT.@)
*/
int CDECL MSVCRT__gcvt_s(char *buff, MSVCRT_size_t size, double number, int digits)
int CDECL MSVCRT__gcvt_s(char *buff, size_t size, double number, int digits)
{
int len;
......@@ -2753,7 +2753,7 @@ div_t CDECL MSVCRT_div(int num, int denom)
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/
#ifdef __i386__
unsigned __int64 CDECL MSVCRT_ldiv(MSVCRT_long num, MSVCRT_long denom)
unsigned __int64 CDECL MSVCRT_ldiv(__msvcrt_long num, __msvcrt_long denom)
{
union {
ldiv_t ldiv;
......@@ -2770,7 +2770,7 @@ unsigned __int64 CDECL MSVCRT_ldiv(MSVCRT_long num, MSVCRT_long denom)
* VERSION
* [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
*/
ldiv_t CDECL MSVCRT_ldiv(MSVCRT_long num, MSVCRT_long denom)
ldiv_t CDECL MSVCRT_ldiv(__msvcrt_long num, __msvcrt_long denom)
{
ldiv_t ret;
......@@ -2784,7 +2784,7 @@ ldiv_t CDECL MSVCRT_ldiv(MSVCRT_long num, MSVCRT_long denom)
/*********************************************************************
* lldiv (MSVCR100.@)
*/
lldiv_t CDECL MSVCRT_lldiv(MSVCRT_longlong num, MSVCRT_longlong denom)
lldiv_t CDECL MSVCRT_lldiv(__int64 num, __int64 denom)
{
lldiv_t ret;
......@@ -3433,7 +3433,7 @@ LDOUBLE CDECL MSVCR120_rintl(LDOUBLE x)
/*********************************************************************
* lrint (MSVCR120.@)
*/
MSVCRT_long CDECL MSVCR120_lrint(double x)
__msvcrt_long CDECL MSVCR120_lrint(double x)
{
return unix_funcs->lrint( x );
}
......@@ -3441,7 +3441,7 @@ MSVCRT_long CDECL MSVCR120_lrint(double x)
/*********************************************************************
* lrintf (MSVCR120.@)
*/
MSVCRT_long CDECL MSVCR120_lrintf(float x)
__msvcrt_long CDECL MSVCR120_lrintf(float x)
{
return unix_funcs->lrintf( x );
}
......@@ -3449,7 +3449,7 @@ MSVCRT_long CDECL MSVCR120_lrintf(float x)
/*********************************************************************
* lrintl (MSVCR120.@)
*/
MSVCRT_long CDECL MSVCR120_lrintl(LDOUBLE x)
__msvcrt_long CDECL MSVCR120_lrintl(LDOUBLE x)
{
return MSVCR120_lrint(x);
}
......@@ -3457,7 +3457,7 @@ MSVCRT_long CDECL MSVCR120_lrintl(LDOUBLE x)
/*********************************************************************
* llrint (MSVCR120.@)
*/
MSVCRT_longlong CDECL MSVCR120_llrint(double x)
__int64 CDECL MSVCR120_llrint(double x)
{
return unix_funcs->llrint( x );
}
......@@ -3465,7 +3465,7 @@ MSVCRT_longlong CDECL MSVCR120_llrint(double x)
/*********************************************************************
* llrintf (MSVCR120.@)
*/
MSVCRT_longlong CDECL MSVCR120_llrintf(float x)
__int64 CDECL MSVCR120_llrintf(float x)
{
return unix_funcs->llrintf( x );
}
......@@ -3473,7 +3473,7 @@ MSVCRT_longlong CDECL MSVCR120_llrintf(float x)
/*********************************************************************
* rintl (MSVCR120.@)
*/
MSVCRT_longlong CDECL MSVCR120_llrintl(LDOUBLE x)
__int64 CDECL MSVCR120_llrintl(LDOUBLE x)
{
return MSVCR120_llrint(x);
}
......@@ -3507,7 +3507,7 @@ LDOUBLE CDECL MSVCR120_roundl(LDOUBLE x)
/*********************************************************************
* lround (MSVCR120.@)
*/
MSVCRT_long CDECL MSVCR120_lround(double x)
__msvcrt_long CDECL MSVCR120_lround(double x)
{
return unix_funcs->lround( x );
}
......@@ -3515,7 +3515,7 @@ MSVCRT_long CDECL MSVCR120_lround(double x)
/*********************************************************************
* lroundf (MSVCR120.@)
*/
MSVCRT_long CDECL MSVCR120_lroundf(float x)
__msvcrt_long CDECL MSVCR120_lroundf(float x)
{
return unix_funcs->lroundf( x );
}
......@@ -3523,7 +3523,7 @@ MSVCRT_long CDECL MSVCR120_lroundf(float x)
/*********************************************************************
* lroundl (MSVCR120.@)
*/
MSVCRT_long CDECL MSVCR120_lroundl(LDOUBLE x)
__msvcrt_long CDECL MSVCR120_lroundl(LDOUBLE x)
{
return MSVCR120_lround(x);
}
......@@ -3531,7 +3531,7 @@ MSVCRT_long CDECL MSVCR120_lroundl(LDOUBLE x)
/*********************************************************************
* llround (MSVCR120.@)
*/
MSVCRT_longlong CDECL MSVCR120_llround(double x)
__int64 CDECL MSVCR120_llround(double x)
{
return unix_funcs->llround( x );
}
......@@ -3539,7 +3539,7 @@ MSVCRT_longlong CDECL MSVCR120_llround(double x)
/*********************************************************************
* llroundf (MSVCR120.@)
*/
MSVCRT_longlong CDECL MSVCR120_llroundf(float x)
__int64 CDECL MSVCR120_llroundf(float x)
{
return unix_funcs->llroundf( x );
}
......@@ -3547,7 +3547,7 @@ MSVCRT_longlong CDECL MSVCR120_llroundf(float x)
/*********************************************************************
* roundl (MSVCR120.@)
*/
MSVCRT_longlong CDECL MSVCR120_llroundl(LDOUBLE x)
__int64 CDECL MSVCR120_llroundl(LDOUBLE x)
{
return MSVCR120_llround(x);
}
......@@ -3936,7 +3936,7 @@ LDOUBLE CDECL MSVCR120_atanhl(LDOUBLE x)
* scalbn (MSVCR120.@)
* scalbln (MSVCR120.@)
*/
double CDECL MSVCRT__scalb(double num, MSVCRT_long power)
double CDECL MSVCRT__scalb(double num, __msvcrt_long power)
{
return MSVCRT_ldexp(num, power);
}
......@@ -3946,7 +3946,7 @@ double CDECL MSVCRT__scalb(double num, MSVCRT_long power)
* scalbnf (MSVCR120.@)
* scalblnf (MSVCR120.@)
*/
float CDECL MSVCRT__scalbf(float num, MSVCRT_long power)
float CDECL MSVCRT__scalbf(float num, __msvcrt_long power)
{
return MSVCRT_ldexp(num, power);
}
......@@ -3957,7 +3957,7 @@ float CDECL MSVCRT__scalbf(float num, MSVCRT_long power)
* scalbnl (MSVCR120.@)
* scalblnl (MSVCR120.@)
*/
LDOUBLE CDECL MSVCR120_scalbnl(LDOUBLE num, MSVCRT_long power)
LDOUBLE CDECL MSVCR120_scalbnl(LDOUBLE num, __msvcrt_long power)
{
return MSVCRT__scalb(num, power);
}
......
......@@ -78,7 +78,7 @@ int CDECL MSVCRT_rand_s(unsigned int *pval)
/*********************************************************************
* _sleep (MSVCRT.@)
*/
void CDECL MSVCRT__sleep(MSVCRT_ulong timeout)
void CDECL MSVCRT__sleep(__msvcrt_ulong timeout)
{
TRACE("_sleep for %ld milliseconds\n",timeout);
Sleep((timeout)?timeout:1);
......@@ -153,8 +153,7 @@ void* CDECL _lsearch(const void* match, void* start,
/*********************************************************************
* bsearch_s (msvcrt.@)
*/
void* CDECL MSVCRT_bsearch_s(const void *key, const void *base,
MSVCRT_size_t nmemb, MSVCRT_size_t size,
void* CDECL MSVCRT_bsearch_s(const void *key, const void *base, size_t nmemb, size_t size,
int (__cdecl *compare)(void *, const void *, const void *), void *ctx)
{
ssize_t min = 0;
......@@ -186,8 +185,8 @@ static int CDECL compare_wrapper(void *ctx, const void *e1, const void *e2)
/*********************************************************************
* bsearch (msvcrt.@)
*/
void* CDECL MSVCRT_bsearch(const void *key, const void *base, MSVCRT_size_t nmemb,
MSVCRT_size_t size, int (__cdecl *compar)(const void *, const void *))
void* CDECL MSVCRT_bsearch(const void *key, const void *base, size_t nmemb,
size_t size, int (__cdecl *compar)(const void *, const void *))
{
return MSVCRT_bsearch_s(key, base, nmemb, size, compare_wrapper, compar);
}
......@@ -255,7 +254,7 @@ void CDECL _chkesp(void)
#endif /* __i386__ */
static inline void swap(char *l, char *r, MSVCRT_size_t size)
static inline void swap(char *l, char *r, size_t size)
{
char tmp;
......@@ -266,10 +265,10 @@ static inline void swap(char *l, char *r, MSVCRT_size_t size)
}
}
static void small_sort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
static void small_sort(void *base, size_t nmemb, size_t size,
int (CDECL *compar)(void *, const void *, const void *), void *context)
{
MSVCRT_size_t e, i;
size_t e, i;
char *max, *p;
for(e=nmemb; e>1; e--) {
......@@ -285,11 +284,11 @@ static void small_sort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
}
}
static void quick_sort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
static void quick_sort(void *base, size_t nmemb, size_t size,
int (CDECL *compar)(void *, const void *, const void *), void *context)
{
MSVCRT_size_t stack_lo[8*sizeof(MSVCRT_size_t)], stack_hi[8*sizeof(MSVCRT_size_t)];
MSVCRT_size_t beg, end, lo, hi, med;
size_t stack_lo[8*sizeof(size_t)], stack_hi[8*sizeof(size_t)];
size_t beg, end, lo, hi, med;
int stack_pos;
stack_pos = 0;
......@@ -368,10 +367,10 @@ static void quick_sort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
* This function is trying to sort data doing identical comparisons
* as native does. There are still cases where it behaves differently.
*/
void CDECL MSVCRT_qsort_s(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
void CDECL MSVCRT_qsort_s(void *base, size_t nmemb, size_t size,
int (CDECL *compar)(void *, const void *, const void *), void *context)
{
const MSVCRT_size_t total_size = nmemb*size;
const size_t total_size = nmemb*size;
if (!MSVCRT_CHECK_PMT(base != NULL || (base == NULL && nmemb == 0))) return;
if (!MSVCRT_CHECK_PMT(size > 0)) return;
......@@ -386,7 +385,7 @@ void CDECL MSVCRT_qsort_s(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
/*********************************************************************
* qsort (MSVCRT.@)
*/
void CDECL MSVCRT_qsort(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
void CDECL MSVCRT_qsort(void *base, size_t nmemb, size_t size,
int (CDECL *compar)(const void*, const void*))
{
MSVCRT_qsort_s(base, nmemb, size, compare_wrapper, compar);
......
......@@ -29,7 +29,7 @@
#endif
struct FUNC_NAME(_str_ctx) {
MSVCRT_size_t len;
size_t len;
APICHAR *buf;
};
......
......@@ -604,7 +604,7 @@ int WINAPIV _cwscanf_s_l(const wchar_t *format, _locale_t locale, ...)
/*********************************************************************
* _snscanf (MSVCRT.@)
*/
int WINAPIV MSVCRT__snscanf(char *input, MSVCRT_size_t length, const char *format, ...)
int WINAPIV MSVCRT__snscanf(char *input, size_t length, const char *format, ...)
{
__ms_va_list valist;
int res;
......@@ -618,7 +618,7 @@ int WINAPIV MSVCRT__snscanf(char *input, MSVCRT_size_t length, const char *forma
/*********************************************************************
* _snscanf_l (MSVCRT.@)
*/
int WINAPIV MSVCRT__snscanf_l(char *input, MSVCRT_size_t length,
int WINAPIV MSVCRT__snscanf_l(char *input, size_t length,
const char *format, _locale_t locale, ...)
{
__ms_va_list valist;
......@@ -633,7 +633,7 @@ int WINAPIV MSVCRT__snscanf_l(char *input, MSVCRT_size_t length,
/*********************************************************************
* _snscanf_s (MSVCRT.@)
*/
int WINAPIV MSVCRT__snscanf_s(char *input, MSVCRT_size_t length, const char *format, ...)
int WINAPIV MSVCRT__snscanf_s(char *input, size_t length, const char *format, ...)
{
__ms_va_list valist;
int res;
......@@ -647,7 +647,7 @@ int WINAPIV MSVCRT__snscanf_s(char *input, MSVCRT_size_t length, const char *for
/*********************************************************************
* _snscanf_s_l (MSVCRT.@)
*/
int WINAPIV MSVCRT__snscanf_s_l(char *input, MSVCRT_size_t length,
int WINAPIV MSVCRT__snscanf_s_l(char *input, size_t length,
const char *format, _locale_t locale, ...)
{
__ms_va_list valist;
......@@ -664,7 +664,7 @@ int WINAPIV MSVCRT__snscanf_s_l(char *input, MSVCRT_size_t length,
* __stdio_common_vsscanf (UCRTBASE.@)
*/
int CDECL MSVCRT__stdio_common_vsscanf(unsigned __int64 options,
const char *input, MSVCRT_size_t length,
const char *input, size_t length,
const char *format,
_locale_t locale,
__ms_va_list valist)
......@@ -684,7 +684,7 @@ int CDECL MSVCRT__stdio_common_vsscanf(unsigned __int64 options,
* __stdio_common_vswscanf (UCRTBASE.@)
*/
int CDECL MSVCRT__stdio_common_vswscanf(unsigned __int64 options,
const wchar_t *input, MSVCRT_size_t length,
const wchar_t *input, size_t length,
const wchar_t *format,
_locale_t locale,
__ms_va_list valist)
......@@ -737,7 +737,7 @@ int CDECL MSVCRT__stdio_common_vfwscanf(unsigned __int64 options,
/*********************************************************************
* _snwscanf (MSVCRT.@)
*/
int WINAPIV MSVCRT__snwscanf(wchar_t *input, MSVCRT_size_t length,
int WINAPIV MSVCRT__snwscanf(wchar_t *input, size_t length,
const wchar_t *format, ...)
{
__ms_va_list valist;
......@@ -752,7 +752,7 @@ int WINAPIV MSVCRT__snwscanf(wchar_t *input, MSVCRT_size_t length,
/*********************************************************************
* _snwscanf_l (MSVCRT.@)
*/
int WINAPIV MSVCRT__snwscanf_l(wchar_t *input, MSVCRT_size_t length,
int WINAPIV MSVCRT__snwscanf_l(wchar_t *input, size_t length,
const wchar_t *format, _locale_t locale, ...)
{
__ms_va_list valist;
......@@ -767,7 +767,7 @@ int WINAPIV MSVCRT__snwscanf_l(wchar_t *input, MSVCRT_size_t length,
/*********************************************************************
* _snwscanf_s (MSVCRT.@)
*/
int WINAPIV MSVCRT__snwscanf_s(wchar_t *input, MSVCRT_size_t length,
int WINAPIV MSVCRT__snwscanf_s(wchar_t *input, size_t length,
const wchar_t *format, ...)
{
__ms_va_list valist;
......@@ -782,7 +782,7 @@ int WINAPIV MSVCRT__snwscanf_s(wchar_t *input, MSVCRT_size_t length,
/*********************************************************************
* _snscanf_s_l (MSVCRT.@)
*/
int WINAPIV MSVCRT__snwscanf_s_l(wchar_t *input, MSVCRT_size_t length,
int WINAPIV MSVCRT__snwscanf_s_l(wchar_t *input, size_t length,
const wchar_t *format, _locale_t locale, ...)
{
__ms_va_list valist;
......
......@@ -84,15 +84,15 @@
#define _UNLOCK_FILE_(file) do {} while(0)
#ifdef WIDE_SCANF
#ifdef SECURE
#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const wchar_t *file, MSVCRT_size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const wchar_t *file, size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#else /* SECURE */
#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const wchar_t *file, MSVCRT_size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const wchar_t *file, size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#endif /* SECURE */
#else /* WIDE_SCANF */
#ifdef SECURE
#define _FUNCTION_ static int MSVCRT_vsnscanf_s_l(const char *file, MSVCRT_size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnscanf_s_l(const char *file, size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#else /* SECURE */
#define _FUNCTION_ static int MSVCRT_vsnscanf_l(const char *file, MSVCRT_size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int MSVCRT_vsnscanf_l(const char *file, size_t length, const char *format, _locale_t locale, __ms_va_list ap)
#endif /* SECURE */
#endif /* WIDE_SCANF */
#else /* STRING_LEN */
......
......@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <stdbool.h>
#include "windef.h"
#include "winternl.h"
......@@ -115,7 +116,7 @@ typedef struct Scheduler {
#define call_Scheduler_ScheduleTask(this,proc,data) CALL_VTBL_FUNC(this, 44, \
void, (Scheduler*,void (__cdecl*)(void*),void*), (this,proc,data))
#define call_Scheduler_IsAvailableLocation(this,placement) CALL_VTBL_FUNC(this, 48, \
MSVCRT_bool, (Scheduler*,const /*location*/void*), (this,placement))
bool, (Scheduler*,const /*location*/void*), (this,placement))
#else
#define call_Scheduler_CreateScheduleGroup(this) CALL_VTBL_FUNC(this, 32, /*ScheduleGroup*/void*, (Scheduler*), (this))
#define call_Scheduler_ScheduleTask(this,proc,data) CALL_VTBL_FUNC(this, 36, \
......@@ -252,14 +253,14 @@ void __cdecl Context__SpinYield(void)
}
/* ?IsCurrentTaskCollectionCanceling@Context@Concurrency@@SA_NXZ */
MSVCRT_bool __cdecl Context_IsCurrentTaskCollectionCanceling(void)
bool __cdecl Context_IsCurrentTaskCollectionCanceling(void)
{
FIXME("()\n");
return FALSE;
}
/* ?Oversubscribe@Context@Concurrency@@SAX_N@Z */
void __cdecl Context_Oversubscribe(MSVCRT_bool begin)
void __cdecl Context_Oversubscribe(bool begin)
{
FIXME("(%x)\n", begin);
}
......@@ -318,7 +319,7 @@ void __thiscall ExternalContextBase_Unblock(ExternalContextBase *this)
}
DEFINE_THISCALL_WRAPPER(ExternalContextBase_IsSynchronouslyBlocked, 4)
MSVCRT_bool __thiscall ExternalContextBase_IsSynchronouslyBlocked(const ExternalContextBase *this)
bool __thiscall ExternalContextBase_IsSynchronouslyBlocked(const ExternalContextBase *this)
{
FIXME("(%p)->() stub\n", this);
return FALSE;
......@@ -384,7 +385,7 @@ static void ExternalContextBase_ctor(ExternalContextBase *this)
/* ?Alloc@Concurrency@@YAPAXI@Z */
/* ?Alloc@Concurrency@@YAPEAX_K@Z */
void * CDECL Concurrency_Alloc(MSVCRT_size_t size)
void * CDECL Concurrency_Alloc(size_t size)
{
ExternalContextBase *context = (ExternalContextBase*)get_current_context();
union allocator_cache_entry *p;
......@@ -548,11 +549,11 @@ SchedulerPolicy* __thiscall SchedulerPolicy_ctor(SchedulerPolicy *this)
/* ??0SchedulerPolicy@Concurrency@@QEAA@_KZZ */
/* TODO: don't leak policy_container on exception */
SchedulerPolicy* WINAPIV SchedulerPolicy_ctor_policies(
SchedulerPolicy *this, MSVCRT_size_t n, ...)
SchedulerPolicy *this, size_t n, ...)
{
unsigned int min_concurrency, max_concurrency;
__ms_va_list valist;
MSVCRT_size_t i;
size_t i;
TRACE("(%p %Iu)\n", this, n);
......@@ -744,7 +745,7 @@ void __thiscall ThreadScheduler_ScheduleTask(ThreadScheduler *this,
}
DEFINE_THISCALL_WRAPPER(ThreadScheduler_IsAvailableLocation, 8)
MSVCRT_bool __thiscall ThreadScheduler_IsAvailableLocation(
bool __thiscall ThreadScheduler_IsAvailableLocation(
const ThreadScheduler *this, const /*location*/void *placement)
{
FIXME("(%p %p) stub\n", this, placement);
......@@ -954,7 +955,7 @@ unsigned int __cdecl CurrentScheduler_Id(void)
#if _MSVCR_VER > 100
/* ?IsAvailableLocation@CurrentScheduler@Concurrency@@SA_NABVlocation@2@@Z */
/* ?IsAvailableLocation@CurrentScheduler@Concurrency@@SA_NAEBVlocation@2@@Z */
MSVCRT_bool __cdecl CurrentScheduler_IsAvailableLocation(const /*location*/void *placement)
bool __cdecl CurrentScheduler_IsAvailableLocation(const /*location*/void *placement)
{
Scheduler *scheduler = try_get_current_scheduler();
......
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