2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #define CXX_EXCEPTION 0xe06d7363
26 #define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
29 typedef __int64
DECLSPEC_ALIGN(8) streamoff
;
30 typedef __int64
DECLSPEC_ALIGN(8) streamsize
;
32 typedef SSIZE_T streamoff
;
33 typedef SSIZE_T streamsize
;
36 void __cdecl
_invalid_parameter_noinfo(void);
37 BOOL __cdecl
__uncaught_exception(void);
38 int __cdecl
_callnewh(size_t);
40 void* __cdecl
operator_new(size_t);
41 void __cdecl
operator_delete(void*);
42 extern void* (__cdecl
*MSVCRT_set_new_handler
)(void*);
45 /* keep in sync with msvcrt/lock.c */
46 typedef struct cs_queue
49 struct cs_queue
*next
;
64 critical_section conc
;
68 typedef struct cv_queue
{
69 struct cv_queue
*next
;
74 /* cv_queue structure is not binary compatible */
76 critical_section lock
;
77 } _Condition_variable
;
81 _Condition_variable conc
;
82 CONDITION_VARIABLE win
;
85 extern void cs_init(cs
*);
86 extern void cs_destroy(cs
*);
87 extern void cs_lock(cs
*);
88 extern void cs_unlock(cs
*);
89 extern bool cs_trylock(cs
*);
91 extern void cv_init(cv
*);
92 extern void cv_destroy(cv
*);
93 extern void cv_wait(cv
*, cs
*);
94 extern bool cv_wait_for(cv
*, cs
*, unsigned int);
95 extern void cv_notify_one(cv
*);
96 extern void cv_notify_all(cv
*);
100 extern bool (__cdecl
*Context_IsCurrentTaskCollectionCanceling
)(void);
103 /* basic_string<char, char_traits<char>, allocator<char>> */
111 #define BUF_SIZE_CHAR 16
112 char buf
[BUF_SIZE_CHAR
];
118 #if _MSVCP_VER == 100
123 basic_string_char
* __thiscall
MSVCP_basic_string_char_ctor(basic_string_char
*);
124 basic_string_char
* __thiscall
MSVCP_basic_string_char_ctor_cstr(basic_string_char
*, const char*);
125 basic_string_char
* __thiscall
MSVCP_basic_string_char_ctor_cstr_len(basic_string_char
*, const char*, size_t);
126 basic_string_char
* __thiscall
MSVCP_basic_string_char_copy_ctor(basic_string_char
*, const basic_string_char
*);
127 void* __thiscall
MSVCP_basic_string_char_dtor(basic_string_char
*);
128 const char* __thiscall
MSVCP_basic_string_char_c_str(const basic_string_char
*);
129 void __thiscall
MSVCP_basic_string_char_clear(basic_string_char
*);
130 basic_string_char
* __thiscall
MSVCP_basic_string_char_append_ch(basic_string_char
*, char);
131 size_t __thiscall
MSVCP_basic_string_char_length(const basic_string_char
*);
132 basic_string_char
* __thiscall
MSVCP_basic_string_char_assign(basic_string_char
*, const basic_string_char
*);
141 #define BUF_SIZE_WCHAR 8
142 wchar_t buf
[BUF_SIZE_WCHAR
];
148 #if _MSVCP_VER == 100
151 } basic_string_wchar
;
153 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_ctor(basic_string_wchar
*);
154 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar
*, const wchar_t*);
155 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar
*, const wchar_t*, size_t);
156 void* __thiscall
MSVCP_basic_string_wchar_dtor(basic_string_wchar
*);
157 const wchar_t* __thiscall
MSVCP_basic_string_wchar_c_str(const basic_string_wchar
*);
158 void __thiscall
MSVCP_basic_string_wchar_clear(basic_string_wchar
*);
159 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_append_ch(basic_string_wchar
*, wchar_t);
160 size_t __thiscall
MSVCP_basic_string_wchar_length(const basic_string_wchar
*);
162 char* __thiscall
MSVCP_allocator_char_allocate(void*, size_t);
163 void __thiscall
MSVCP_allocator_char_deallocate(void*, char*, size_t);
164 size_t __thiscall
MSVCP_allocator_char_max_size(const void*);
165 wchar_t* __thiscall
MSVCP_allocator_wchar_allocate(void*, size_t);
166 void __thiscall
MSVCP_allocator_wchar_deallocate(void*, wchar_t*, size_t);
167 size_t __thiscall
MSVCP_allocator_wchar_max_size(const void*);
175 _Yarn_char
* __thiscall
_Yarn_char_ctor(_Yarn_char
*);
176 _Yarn_char
* __thiscall
_Yarn_char_ctor_cstr(_Yarn_char
*, const char*);
177 _Yarn_char
* __thiscall
_Yarn_char_copy_ctor(_Yarn_char
*, const _Yarn_char
*);
178 const char* __thiscall
_Yarn_char_c_str(const _Yarn_char
*);
179 void __thiscall
_Yarn_char_dtor(_Yarn_char
*);
180 _Yarn_char
* __thiscall
_Yarn_char_op_assign(_Yarn_char
*, const _Yarn_char
*);
188 _Yarn_wchar
* __thiscall
_Yarn_wchar_ctor(_Yarn_wchar
*);
189 const wchar_t* __thiscall
_Yarn_wchar__C_str(const _Yarn_wchar
*);
190 void __thiscall
_Yarn_wchar_dtor(_Yarn_wchar
*);
191 _Yarn_wchar
* __thiscall
_Yarn_wchar_op_assign_cstr(_Yarn_wchar
*, const wchar_t*);
193 /* class locale::facet */
195 const vtable_ptr
*vtable
;
204 } codecvt_base_result
;
213 #if _MSVCP_VER >= 110
218 #if _MSVCP_VER >= 140
221 unsigned short byte
, state
;
223 #define MBSTATET_TO_INT(state) ((state)->wchar)
225 typedef int _Mbstatet
;
226 #define MBSTATET_TO_INT(state) (*(state))
229 /* class codecvt_base */
234 /* class codecvt<char> */
239 bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*);
240 int __thiscall
codecvt_char_unshift(const codecvt_char
*, _Mbstatet
*, char*, char*, char**);
241 int __thiscall
codecvt_char_out(const codecvt_char
*, _Mbstatet
*, const char*,
242 const char*, const char**, char*, char*, char**);
243 int __thiscall
codecvt_char_in(const codecvt_char
*, _Mbstatet
*, const char*,
244 const char*, const char**, char*, char*, char**);
245 int __thiscall
codecvt_base_max_length(const codecvt_base
*);
252 #if _MSVCP_VER >= 110
259 /* class codecvt<wchar> */
265 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*, _Mbstatet
*, char*, char*, char**);
266 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*, _Mbstatet
*, const wchar_t*,
267 const wchar_t*, const wchar_t**, char*, char*, char**);
268 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*, _Mbstatet
*, const char*,
269 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
271 /* class ctype_base */
276 /* class ctype<char> */
282 bool __thiscall
ctype_char_is_ch(const ctype_char
*, short, char);
283 char __thiscall
ctype_char_narrow_ch(const ctype_char
*, char, char);
284 char __thiscall
ctype_char_widen_ch(const ctype_char
*, char);
286 /* class ctype<wchar> */
293 bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*, short, wchar_t);
294 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*, wchar_t, char);
295 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*, char);
300 #if _MSVCP_VER >= 140
303 struct _locale__Locimp
*ptr
;
306 locale
* __thiscall
locale_ctor(locale
*);
307 locale
* __thiscall
locale_copy_ctor(locale
*, const locale
*);
308 locale
* __thiscall
locale_operator_assign(locale
*, const locale
*);
309 void __thiscall
locale_dtor(locale
*);
310 void free_locale(void);
311 codecvt_char
* codecvt_char_use_facet(const locale
*);
312 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*);
313 codecvt_wchar
* codecvt_short_use_facet(const locale
*);
314 ctype_char
* ctype_char_use_facet(const locale
*);
315 ctype_wchar
* ctype_wchar_use_facet(const locale
*);
316 ctype_wchar
* ctype_short_use_facet(const locale
*);
318 /* class _Init_locks */
323 void __cdecl
_Init_locks__Init_locks_ctor(_Init_locks
*);
324 void __cdecl
_Init_locks__Init_locks_dtor(_Init_locks
*);
335 #define _LOCK_LOCALE 0
336 #define _LOCK_MALLOC 1
337 #define _LOCK_STREAM 2
338 #define _LOCK_DEBUG 3
341 _Lockit
* __thiscall
_Lockit_ctor_locktype(_Lockit
*, int);
342 void __thiscall
_Lockit_dtor(_Lockit
*);
349 mutex
* __thiscall
mutex_ctor(mutex
*);
350 void __thiscall
mutex_dtor(mutex
*);
351 void __thiscall
mutex_lock(mutex
*);
352 void __thiscall
mutex_unlock(mutex
*);
355 FMTFLAG_skipws
= 0x0001,
356 FMTFLAG_unitbuf
= 0x0002,
357 FMTFLAG_uppercase
= 0x0004,
358 FMTFLAG_showbase
= 0x0008,
359 FMTFLAG_showpoint
= 0x0010,
360 FMTFLAG_showpos
= 0x0020,
361 FMTFLAG_left
= 0x0040,
362 FMTFLAG_right
= 0x0080,
363 FMTFLAG_internal
= 0x0100,
364 FMTFLAG_dec
= 0x0200,
365 FMTFLAG_oct
= 0x0400,
366 FMTFLAG_hex
= 0x0800,
367 FMTFLAG_scientific
= 0x1000,
368 FMTFLAG_fixed
= 0x2000,
369 FMTFLAG_hexfloat
= 0x3000,
370 FMTFLAG_boolalpha
= 0x4000,
371 FMTFLAG_stdio
= 0x8000,
372 FMTFLAG_adjustfield
= FMTFLAG_left
|FMTFLAG_right
|FMTFLAG_internal
,
373 FMTFLAG_basefield
= FMTFLAG_dec
|FMTFLAG_oct
|FMTFLAG_hex
,
374 FMTFLAG_floatfield
= FMTFLAG_scientific
|FMTFLAG_fixed
,
375 FMTFLAG_mask
= 0xffff
383 OPENMODE_trunc
= 0x10,
384 OPENMODE__Nocreate
= 0x40,
385 OPENMODE__Noreplace
= 0x80,
386 OPENMODE_binary
= 0x20,
398 IOSTATE_goodbit
= 0x00,
399 IOSTATE_eofbit
= 0x01,
400 IOSTATE_failbit
= 0x02,
401 IOSTATE_badbit
= 0x04,
402 IOSTATE__Hardfail
= 0x10,
406 typedef struct _iosarray
{
407 struct _iosarray
*next
;
420 typedef void (CDECL
*IOS_BASE_event_callback
)(IOS_BASE_event
, struct _ios_base
*, int);
421 typedef struct _fnarray
{
422 struct _fnarray
*next
;
424 IOS_BASE_event_callback event_handler
;
428 typedef struct _ios_base
{
429 const vtable_ptr
*vtable
;
430 #if _MSVCP_VER >= 100
431 size_t DECLSPEC_ALIGN(8) stdstr
;
432 #elif _MSVCP_VER >= 71
440 IOS_BASE_iosarray
*arr
;
441 IOS_BASE_fnarray
*calls
;
452 /* class basic_streambuf<char> */
454 const vtable_ptr
*vtable
;
455 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
475 } basic_streambuf_char
;
478 basic_streambuf_char
*strbuf
;
481 } istreambuf_iterator_char
;
485 void *iter_container
;
488 basic_streambuf_char
*strbuf
;
489 } ostreambuf_iterator_char
;
491 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*);
492 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*);
493 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*, char);
495 /* class basic_streambuf<wchar> */
497 const vtable_ptr
*vtable
;
498 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
518 } basic_streambuf_wchar
;
521 basic_streambuf_wchar
*strbuf
;
524 } istreambuf_iterator_wchar
;
528 void *iter_container
;
531 basic_streambuf_wchar
*strbuf
;
532 } ostreambuf_iterator_wchar
;
534 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*);
535 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*);
536 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*, wchar_t);
539 #define IOS_LOCALE(ios) (&(ios)->loc)
541 #define IOS_LOCALE(ios) ((ios)->loc)
544 /* class num_get<char> */
547 #if _MSVCP_VER <= 100
552 num_get
* num_get_char_use_facet(const locale
*);
553 istreambuf_iterator_char
* __thiscall
num_get_char_get_long(const num_get
*, istreambuf_iterator_char
*,
554 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, LONG
*);
555 istreambuf_iterator_char
* __thiscall
num_get_char_get_ushort(const num_get
*, istreambuf_iterator_char
*,
556 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, unsigned short*);
557 istreambuf_iterator_char
* __thiscall
num_get_char_get_uint(const num_get
*, istreambuf_iterator_char
*,
558 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, unsigned int*);
559 istreambuf_iterator_char
* __thiscall
num_get_char_get_ulong(const num_get
*, istreambuf_iterator_char
*,
560 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, ULONG
*);
561 istreambuf_iterator_char
* __thiscall
num_get_char_get_float(const num_get
*, istreambuf_iterator_char
*,
562 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, float*);
563 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*, istreambuf_iterator_char
*,
564 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, double*);
565 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*, istreambuf_iterator_char
*,
566 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, double*);
567 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*, istreambuf_iterator_char
*,
568 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, void**);
569 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*, istreambuf_iterator_char
*,
570 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, LONGLONG
*);
571 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*, istreambuf_iterator_char
*,
572 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, ULONGLONG
*);
573 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*, istreambuf_iterator_char
*,
574 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, bool*);
576 num_get
* num_get_wchar_use_facet(const locale
*);
577 num_get
* num_get_short_use_facet(const locale
*);
578 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_long(const num_get
*, istreambuf_iterator_wchar
*,
579 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, LONG
*);
580 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_ushort(const num_get
*, istreambuf_iterator_wchar
*,
581 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, unsigned short*);
582 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_uint(const num_get
*, istreambuf_iterator_wchar
*,
583 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, unsigned int*);
584 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_ulong(const num_get
*, istreambuf_iterator_wchar
*,
585 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, ULONG
*);
586 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_float(const num_get
*, istreambuf_iterator_wchar
*,
587 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, float*);
588 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*, istreambuf_iterator_wchar
*,
589 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, double*);
590 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*, istreambuf_iterator_wchar
*,
591 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, double*);
592 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*, istreambuf_iterator_wchar
*,
593 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, void**);
594 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*, istreambuf_iterator_wchar
*,
595 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, LONGLONG
*);
596 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*, istreambuf_iterator_wchar
*,
597 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, ULONGLONG
*);
598 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*, istreambuf_iterator_wchar
*,
599 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, bool*);
601 /* class num_put<char> */
602 /* class num_put<wchar> */
610 num_put
* num_put_char_use_facet(const locale
*);
611 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*, ostreambuf_iterator_char
*,
612 ostreambuf_iterator_char
, ios_base
*, char, LONG
);
613 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*, ostreambuf_iterator_char
*,
614 ostreambuf_iterator_char
, ios_base
*, char, ULONG
);
615 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*, ostreambuf_iterator_char
*,
616 ostreambuf_iterator_char
, ios_base
*, char, double);
617 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*, ostreambuf_iterator_char
*,
618 ostreambuf_iterator_char
, ios_base
*, char, double);
619 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*, ostreambuf_iterator_char
*,
620 ostreambuf_iterator_char
, ios_base
*, char, const void*);
621 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*, ostreambuf_iterator_char
*,
622 ostreambuf_iterator_char
, ios_base
*, char, __int64
);
623 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*, ostreambuf_iterator_char
*,
624 ostreambuf_iterator_char
, ios_base
*, char, unsigned __int64
);
625 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*, ostreambuf_iterator_char
*,
626 ostreambuf_iterator_char
, ios_base
*, char, bool);
628 num_put
* num_put_wchar_use_facet(const locale
*);
629 num_put
* num_put_short_use_facet(const locale
*);
630 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*, ostreambuf_iterator_wchar
*,
631 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, LONG
);
632 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*, ostreambuf_iterator_wchar
*,
633 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, ULONG
);
634 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*, ostreambuf_iterator_wchar
*,
635 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, double);
636 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*, ostreambuf_iterator_wchar
*,
637 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, double);
638 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*, ostreambuf_iterator_wchar
*,
639 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, const void*);
640 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*, ostreambuf_iterator_wchar
*,
641 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, __int64
);
642 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*, ostreambuf_iterator_wchar
*,
643 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, unsigned __int64
);
644 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*, ostreambuf_iterator_wchar
*,
645 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, bool);
647 void init_exception(void*);
648 void init_locale(void*);
652 #if _MSVCP_VER >= 100
653 void init_concurrency_details(void*);
654 void init_misc(void*);
655 void free_misc(void);
658 /* class complex<float> */
664 /* class complex<double> */
665 /* class complex<long double> */
671 #if _MSVCP_VER >= 100
673 const vtable_ptr
*vtable
;
676 const error_category
* __cdecl
std_iostream_category(void);
677 const error_category
* __cdecl
std_generic_category(void);
682 const error_category
*category
;
687 static inline int memcpy_wrapper( void *dst
, size_t size
, const void *src
, size_t count
)
689 memcpy( dst
, src
, count
);
692 static inline int memmove_wrapper( void *dst
, size_t size
, const void *src
, size_t count
)
694 memmove( dst
, src
, count
);
697 static inline int mbstowcs_wrapper( size_t *ret
, wchar_t *wcs
, size_t size
, const char *mbs
, size_t count
)
699 mbstowcs( wcs
, mbs
, count
);
702 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
703 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
704 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
705 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
708 void WINAPI DECLSPEC_NORETURN
_CxxThrowException(void*,const cxx_exception_type
*);
709 void __cdecl DECLSPEC_NORETURN
_Xinvalid_argument(const char*);
710 void __cdecl DECLSPEC_NORETURN
_Xlength_error(const char*);
711 void __cdecl DECLSPEC_NORETURN
_Xmem(void);
712 void __cdecl DECLSPEC_NORETURN
_Xout_of_range(const char*);
713 void __cdecl DECLSPEC_NORETURN
_Xruntime_error(const char*);
714 void DECLSPEC_NORETURN
throw_exception(const char*);
715 void DECLSPEC_NORETURN
throw_failure(const char*);
716 void DECLSPEC_NORETURN
throw_range_error(const char*);