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 #if _MSVCP_VER >= 140
240 typedef enum convert_mode
245 } codecvt_convert_mode
;
247 /* class codecvt<char32> */
253 bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*);
254 int __thiscall
codecvt_char_unshift(const codecvt_char
*, _Mbstatet
*, char*, char*, char**);
255 int __thiscall
codecvt_char_out(const codecvt_char
*, _Mbstatet
*, const char*,
256 const char*, const char**, char*, char*, char**);
257 int __thiscall
codecvt_char_in(const codecvt_char
*, _Mbstatet
*, const char*,
258 const char*, const char**, char*, char*, char**);
259 int __thiscall
codecvt_base_max_length(const codecvt_base
*);
266 #if _MSVCP_VER >= 110
273 /* class codecvt<wchar> */
279 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*, _Mbstatet
*, char*, char*, char**);
280 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*, _Mbstatet
*, const wchar_t*,
281 const wchar_t*, const wchar_t**, char*, char*, char**);
282 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*, _Mbstatet
*, const char*,
283 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
285 /* class ctype_base */
290 /* class ctype<char> */
296 bool __thiscall
ctype_char_is_ch(const ctype_char
*, short, char);
297 char __thiscall
ctype_char_narrow_ch(const ctype_char
*, char, char);
298 char __thiscall
ctype_char_widen_ch(const ctype_char
*, char);
300 /* class ctype<wchar> */
307 bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*, short, wchar_t);
308 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*, wchar_t, char);
309 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*, char);
314 #if _MSVCP_VER >= 140
317 struct _locale__Locimp
*ptr
;
320 locale
* __thiscall
locale_ctor(locale
*);
321 locale
* __thiscall
locale_copy_ctor(locale
*, const locale
*);
322 locale
* __thiscall
locale_operator_assign(locale
*, const locale
*);
323 void __thiscall
locale_dtor(locale
*);
324 void free_locale(void);
325 codecvt_char
* codecvt_char_use_facet(const locale
*);
326 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*);
327 codecvt_wchar
* codecvt_short_use_facet(const locale
*);
328 ctype_char
* ctype_char_use_facet(const locale
*);
329 ctype_wchar
* ctype_wchar_use_facet(const locale
*);
330 ctype_wchar
* ctype_short_use_facet(const locale
*);
332 /* class _Init_locks */
337 void __cdecl
_Init_locks__Init_locks_ctor(_Init_locks
*);
338 void __cdecl
_Init_locks__Init_locks_dtor(_Init_locks
*);
349 #define _LOCK_LOCALE 0
350 #define _LOCK_MALLOC 1
351 #define _LOCK_STREAM 2
352 #define _LOCK_DEBUG 3
355 _Lockit
* __thiscall
_Lockit_ctor_locktype(_Lockit
*, int);
356 void __thiscall
_Lockit_dtor(_Lockit
*);
363 mutex
* __thiscall
mutex_ctor(mutex
*);
364 void __thiscall
mutex_dtor(mutex
*);
365 void __thiscall
mutex_lock(mutex
*);
366 void __thiscall
mutex_unlock(mutex
*);
369 FMTFLAG_skipws
= 0x0001,
370 FMTFLAG_unitbuf
= 0x0002,
371 FMTFLAG_uppercase
= 0x0004,
372 FMTFLAG_showbase
= 0x0008,
373 FMTFLAG_showpoint
= 0x0010,
374 FMTFLAG_showpos
= 0x0020,
375 FMTFLAG_left
= 0x0040,
376 FMTFLAG_right
= 0x0080,
377 FMTFLAG_internal
= 0x0100,
378 FMTFLAG_dec
= 0x0200,
379 FMTFLAG_oct
= 0x0400,
380 FMTFLAG_hex
= 0x0800,
381 FMTFLAG_scientific
= 0x1000,
382 FMTFLAG_fixed
= 0x2000,
383 FMTFLAG_hexfloat
= 0x3000,
384 FMTFLAG_boolalpha
= 0x4000,
385 FMTFLAG_stdio
= 0x8000,
386 FMTFLAG_adjustfield
= FMTFLAG_left
|FMTFLAG_right
|FMTFLAG_internal
,
387 FMTFLAG_basefield
= FMTFLAG_dec
|FMTFLAG_oct
|FMTFLAG_hex
,
388 FMTFLAG_floatfield
= FMTFLAG_scientific
|FMTFLAG_fixed
,
389 FMTFLAG_mask
= 0xffff
397 OPENMODE_trunc
= 0x10,
398 OPENMODE__Nocreate
= 0x40,
399 OPENMODE__Noreplace
= 0x80,
400 OPENMODE_binary
= 0x20,
412 IOSTATE_goodbit
= 0x00,
413 IOSTATE_eofbit
= 0x01,
414 IOSTATE_failbit
= 0x02,
415 IOSTATE_badbit
= 0x04,
416 IOSTATE__Hardfail
= 0x10,
420 typedef struct _iosarray
{
421 struct _iosarray
*next
;
434 typedef void (CDECL
*IOS_BASE_event_callback
)(IOS_BASE_event
, struct _ios_base
*, int);
435 typedef struct _fnarray
{
436 struct _fnarray
*next
;
438 IOS_BASE_event_callback event_handler
;
442 typedef struct _ios_base
{
443 const vtable_ptr
*vtable
;
444 #if _MSVCP_VER >= 100
445 size_t DECLSPEC_ALIGN(8) stdstr
;
446 #elif _MSVCP_VER >= 71
454 IOS_BASE_iosarray
*arr
;
455 IOS_BASE_fnarray
*calls
;
466 /* class basic_streambuf<char> */
468 const vtable_ptr
*vtable
;
469 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
489 } basic_streambuf_char
;
492 basic_streambuf_char
*strbuf
;
495 } istreambuf_iterator_char
;
499 void *iter_container
;
502 basic_streambuf_char
*strbuf
;
503 } ostreambuf_iterator_char
;
505 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*);
506 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*);
507 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*, char);
509 /* class basic_streambuf<wchar> */
511 const vtable_ptr
*vtable
;
512 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
532 } basic_streambuf_wchar
;
535 basic_streambuf_wchar
*strbuf
;
538 } istreambuf_iterator_wchar
;
542 void *iter_container
;
545 basic_streambuf_wchar
*strbuf
;
546 } ostreambuf_iterator_wchar
;
548 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*);
549 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*);
550 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*, wchar_t);
553 #define IOS_LOCALE(ios) (&(ios)->loc)
555 #define IOS_LOCALE(ios) ((ios)->loc)
558 /* class num_get<char> */
561 #if _MSVCP_VER <= 100
566 num_get
* num_get_char_use_facet(const locale
*);
567 istreambuf_iterator_char
* __thiscall
num_get_char_get_long(const num_get
*, istreambuf_iterator_char
*,
568 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, LONG
*);
569 istreambuf_iterator_char
* __thiscall
num_get_char_get_ushort(const num_get
*, istreambuf_iterator_char
*,
570 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, unsigned short*);
571 istreambuf_iterator_char
* __thiscall
num_get_char_get_uint(const num_get
*, istreambuf_iterator_char
*,
572 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, unsigned int*);
573 istreambuf_iterator_char
* __thiscall
num_get_char_get_ulong(const num_get
*, istreambuf_iterator_char
*,
574 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, ULONG
*);
575 istreambuf_iterator_char
* __thiscall
num_get_char_get_float(const num_get
*, istreambuf_iterator_char
*,
576 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, float*);
577 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*, istreambuf_iterator_char
*,
578 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, double*);
579 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*, istreambuf_iterator_char
*,
580 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, double*);
581 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*, istreambuf_iterator_char
*,
582 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, void**);
583 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*, istreambuf_iterator_char
*,
584 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, LONGLONG
*);
585 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*, istreambuf_iterator_char
*,
586 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, ULONGLONG
*);
587 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*, istreambuf_iterator_char
*,
588 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, bool*);
590 num_get
* num_get_wchar_use_facet(const locale
*);
591 num_get
* num_get_short_use_facet(const locale
*);
592 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_long(const num_get
*, istreambuf_iterator_wchar
*,
593 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, LONG
*);
594 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_ushort(const num_get
*, istreambuf_iterator_wchar
*,
595 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, unsigned short*);
596 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_uint(const num_get
*, istreambuf_iterator_wchar
*,
597 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, unsigned int*);
598 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_ulong(const num_get
*, istreambuf_iterator_wchar
*,
599 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, ULONG
*);
600 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_float(const num_get
*, istreambuf_iterator_wchar
*,
601 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, float*);
602 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*, istreambuf_iterator_wchar
*,
603 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, double*);
604 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*, istreambuf_iterator_wchar
*,
605 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, double*);
606 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*, istreambuf_iterator_wchar
*,
607 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, void**);
608 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*, istreambuf_iterator_wchar
*,
609 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, LONGLONG
*);
610 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*, istreambuf_iterator_wchar
*,
611 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, ULONGLONG
*);
612 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*, istreambuf_iterator_wchar
*,
613 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, bool*);
615 /* class num_put<char> */
616 /* class num_put<wchar> */
624 num_put
* num_put_char_use_facet(const locale
*);
625 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*, ostreambuf_iterator_char
*,
626 ostreambuf_iterator_char
, ios_base
*, char, LONG
);
627 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*, ostreambuf_iterator_char
*,
628 ostreambuf_iterator_char
, ios_base
*, char, ULONG
);
629 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*, ostreambuf_iterator_char
*,
630 ostreambuf_iterator_char
, ios_base
*, char, double);
631 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*, ostreambuf_iterator_char
*,
632 ostreambuf_iterator_char
, ios_base
*, char, double);
633 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*, ostreambuf_iterator_char
*,
634 ostreambuf_iterator_char
, ios_base
*, char, const void*);
635 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*, ostreambuf_iterator_char
*,
636 ostreambuf_iterator_char
, ios_base
*, char, __int64
);
637 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*, ostreambuf_iterator_char
*,
638 ostreambuf_iterator_char
, ios_base
*, char, unsigned __int64
);
639 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*, ostreambuf_iterator_char
*,
640 ostreambuf_iterator_char
, ios_base
*, char, bool);
642 num_put
* num_put_wchar_use_facet(const locale
*);
643 num_put
* num_put_short_use_facet(const locale
*);
644 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*, ostreambuf_iterator_wchar
*,
645 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, LONG
);
646 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*, ostreambuf_iterator_wchar
*,
647 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, ULONG
);
648 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*, ostreambuf_iterator_wchar
*,
649 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, double);
650 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*, ostreambuf_iterator_wchar
*,
651 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, double);
652 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*, ostreambuf_iterator_wchar
*,
653 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, const void*);
654 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*, ostreambuf_iterator_wchar
*,
655 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, __int64
);
656 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*, ostreambuf_iterator_wchar
*,
657 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, unsigned __int64
);
658 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*, ostreambuf_iterator_wchar
*,
659 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, bool);
661 void init_exception(void*);
662 void init_locale(void*);
666 #if _MSVCP_VER >= 100
667 void init_concurrency_details(void*);
668 void init_misc(void*);
669 void free_misc(void);
672 /* class complex<float> */
678 /* class complex<double> */
679 /* class complex<long double> */
685 #if _MSVCP_VER >= 100
687 const vtable_ptr
*vtable
;
690 const error_category
* __cdecl
std_iostream_category(void);
691 const error_category
* __cdecl
std_generic_category(void);
696 const error_category
*category
;
701 static inline int memcpy_wrapper( void *dst
, size_t size
, const void *src
, size_t count
)
703 memcpy( dst
, src
, count
);
706 static inline int memmove_wrapper( void *dst
, size_t size
, const void *src
, size_t count
)
708 memmove( dst
, src
, count
);
711 static inline int mbstowcs_wrapper( size_t *ret
, wchar_t *wcs
, size_t size
, const char *mbs
, size_t count
)
713 mbstowcs( wcs
, mbs
, count
);
716 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
717 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
718 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
719 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
722 void WINAPI DECLSPEC_NORETURN
_CxxThrowException(void*,const cxx_exception_type
*);
723 void __cdecl DECLSPEC_NORETURN
_Xinvalid_argument(const char*);
724 void __cdecl DECLSPEC_NORETURN
_Xlength_error(const char*);
725 void __cdecl DECLSPEC_NORETURN
_Xmem(void);
726 void __cdecl DECLSPEC_NORETURN
_Xout_of_range(const char*);
727 void __cdecl DECLSPEC_NORETURN
_Xruntime_error(const char*);
728 void DECLSPEC_NORETURN
throw_exception(const char*);
729 void DECLSPEC_NORETURN
throw_failure(const char*);
730 void DECLSPEC_NORETURN
throw_range_error(const char*);