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
24 #define CXX_EXCEPTION 0xe06d7363
25 #define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
27 #define MSVCP_SIZE_T_MAX (~(size_t)0)
29 typedef __int64
DECLSPEC_ALIGN(8) streamoff
;
30 typedef __int64
DECLSPEC_ALIGN(8) streamsize
;
31 #define STREAMOFF_BITS 64
32 #define STREAMSIZE_BITS 64
34 typedef SSIZE_T streamoff
;
35 typedef SSIZE_T streamsize
;
36 #define STREAMOFF_BITS 32
37 #define STREAMSIZE_BITS 32
40 void __cdecl
_invalid_parameter_noinfo(void);
41 BOOL __cdecl
__uncaught_exception(void);
42 int __cdecl
_callnewh(size_t);
44 extern void* (__cdecl
*MSVCRT_operator_new
)(size_t);
45 extern void (__cdecl
*MSVCRT_operator_delete
)(void*);
46 extern void* (__cdecl
*MSVCRT_set_new_handler
)(void*);
49 /* keep in sync with msvcrt/lock.c */
50 typedef struct cs_queue
52 struct cs_queue
*next
;
59 ULONG_PTR unk_thread_id
;
66 extern critical_section
* (__thiscall
*critical_section_ctor
)(critical_section
*);
67 extern void (__thiscall
*critical_section_dtor
)(critical_section
*);
68 extern void (__thiscall
*critical_section_lock
)(critical_section
*);
69 extern void (__thiscall
*critical_section_unlock
)(critical_section
*);
70 extern bool (__thiscall
*critical_section_trylock
)(critical_section
*);
74 extern bool (__cdecl
*Context_IsCurrentTaskCollectionCanceling
)(void);
77 /* basic_string<char, char_traits<char>, allocator<char>> */
85 #define BUF_SIZE_CHAR 16
86 char buf
[BUF_SIZE_CHAR
];
97 basic_string_char
* __thiscall
MSVCP_basic_string_char_ctor(basic_string_char
*);
98 basic_string_char
* __thiscall
MSVCP_basic_string_char_ctor_cstr(basic_string_char
*, const char*);
99 basic_string_char
* __thiscall
MSVCP_basic_string_char_ctor_cstr_len(basic_string_char
*, const char*, size_t);
100 basic_string_char
* __thiscall
MSVCP_basic_string_char_copy_ctor(basic_string_char
*, const basic_string_char
*);
101 void* __thiscall
MSVCP_basic_string_char_dtor(basic_string_char
*);
102 const char* __thiscall
MSVCP_basic_string_char_c_str(const basic_string_char
*);
103 void __thiscall
MSVCP_basic_string_char_clear(basic_string_char
*);
104 basic_string_char
* __thiscall
MSVCP_basic_string_char_append_ch(basic_string_char
*, char);
105 size_t __thiscall
MSVCP_basic_string_char_length(const basic_string_char
*);
106 basic_string_char
* __thiscall
MSVCP_basic_string_char_assign(basic_string_char
*, const basic_string_char
*);
115 #define BUF_SIZE_WCHAR 8
116 wchar_t buf
[BUF_SIZE_WCHAR
];
122 #if _MSVCP_VER == 100
125 } basic_string_wchar
;
127 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_ctor(basic_string_wchar
*);
128 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar
*, const wchar_t*);
129 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar
*, const wchar_t*, size_t);
130 void* __thiscall
MSVCP_basic_string_wchar_dtor(basic_string_wchar
*);
131 const wchar_t* __thiscall
MSVCP_basic_string_wchar_c_str(const basic_string_wchar
*);
132 void __thiscall
MSVCP_basic_string_wchar_clear(basic_string_wchar
*);
133 basic_string_wchar
* __thiscall
MSVCP_basic_string_wchar_append_ch(basic_string_wchar
*, wchar_t);
134 size_t __thiscall
MSVCP_basic_string_wchar_length(const basic_string_wchar
*);
136 char* __thiscall
MSVCP_allocator_char_allocate(void*, size_t);
137 void __thiscall
MSVCP_allocator_char_deallocate(void*, char*, size_t);
138 size_t __thiscall
MSVCP_allocator_char_max_size(const void*);
139 wchar_t* __thiscall
MSVCP_allocator_wchar_allocate(void*, size_t);
140 void __thiscall
MSVCP_allocator_wchar_deallocate(void*, wchar_t*, size_t);
141 size_t __thiscall
MSVCP_allocator_wchar_max_size(const void*);
149 _Yarn_char
* __thiscall
_Yarn_char_ctor(_Yarn_char
*);
150 _Yarn_char
* __thiscall
_Yarn_char_ctor_cstr(_Yarn_char
*, const char*);
151 _Yarn_char
* __thiscall
_Yarn_char_copy_ctor(_Yarn_char
*, const _Yarn_char
*);
152 const char* __thiscall
_Yarn_char_c_str(const _Yarn_char
*);
153 void __thiscall
_Yarn_char_dtor(_Yarn_char
*);
154 _Yarn_char
* __thiscall
_Yarn_char_op_assign(_Yarn_char
*, const _Yarn_char
*);
162 _Yarn_wchar
* __thiscall
_Yarn_wchar_ctor(_Yarn_wchar
*);
163 const wchar_t* __thiscall
_Yarn_wchar__C_str(const _Yarn_wchar
*);
164 void __thiscall
_Yarn_wchar_dtor(_Yarn_wchar
*);
165 _Yarn_wchar
* __thiscall
_Yarn_wchar_op_assign_cstr(_Yarn_wchar
*, const wchar_t*);
167 /* class locale::facet */
169 const vtable_ptr
*vtable
;
178 } codecvt_base_result
;
187 #if _MSVCP_VER >= 110
192 #if _MSVCP_VER >= 140
195 unsigned short byte
, state
;
197 #define MBSTATET_TO_INT(state) ((state)->wchar)
199 typedef int _Mbstatet
;
200 #define MBSTATET_TO_INT(state) (*(state))
203 /* class codecvt_base */
208 /* class codecvt<char> */
213 bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*);
214 int __thiscall
codecvt_char_unshift(const codecvt_char
*, _Mbstatet
*, char*, char*, char**);
215 int __thiscall
codecvt_char_out(const codecvt_char
*, _Mbstatet
*, const char*,
216 const char*, const char**, char*, char*, char**);
217 int __thiscall
codecvt_char_in(const codecvt_char
*, _Mbstatet
*, const char*,
218 const char*, const char**, char*, char*, char**);
219 int __thiscall
codecvt_base_max_length(const codecvt_base
*);
226 #if _MSVCP_VER >= 110
233 /* class codecvt<wchar> */
239 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*, _Mbstatet
*, char*, char*, char**);
240 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*, _Mbstatet
*, const wchar_t*,
241 const wchar_t*, const wchar_t**, char*, char*, char**);
242 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*, _Mbstatet
*, const char*,
243 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
245 /* class ctype_base */
250 /* class ctype<char> */
256 bool __thiscall
ctype_char_is_ch(const ctype_char
*, short, char);
257 char __thiscall
ctype_char_narrow_ch(const ctype_char
*, char, char);
258 char __thiscall
ctype_char_widen_ch(const ctype_char
*, char);
260 /* class ctype<wchar> */
267 bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*, short, wchar_t);
268 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*, wchar_t, char);
269 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*, char);
274 #if _MSVCP_VER >= 140
277 struct _locale__Locimp
*ptr
;
280 locale
* __thiscall
locale_ctor(locale
*);
281 locale
* __thiscall
locale_copy_ctor(locale
*, const locale
*);
282 locale
* __thiscall
locale_operator_assign(locale
*, const locale
*);
283 void __thiscall
locale_dtor(locale
*);
284 void free_locale(void);
285 codecvt_char
* codecvt_char_use_facet(const locale
*);
286 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*);
287 codecvt_wchar
* codecvt_short_use_facet(const locale
*);
288 ctype_char
* ctype_char_use_facet(const locale
*);
289 ctype_wchar
* ctype_wchar_use_facet(const locale
*);
290 ctype_wchar
* ctype_short_use_facet(const locale
*);
292 /* class _Init_locks */
297 void __cdecl
_Init_locks__Init_locks_ctor(_Init_locks
*);
298 void __cdecl
_Init_locks__Init_locks_dtor(_Init_locks
*);
309 #define _LOCK_LOCALE 0
310 #define _LOCK_MALLOC 1
311 #define _LOCK_STREAM 2
312 #define _LOCK_DEBUG 3
315 _Lockit
* __thiscall
_Lockit_ctor_locktype(_Lockit
*, int);
316 void __thiscall
_Lockit_dtor(_Lockit
*);
323 mutex
* __thiscall
mutex_ctor(mutex
*);
324 void __thiscall
mutex_dtor(mutex
*);
325 void __thiscall
mutex_lock(mutex
*);
326 void __thiscall
mutex_unlock(mutex
*);
329 FMTFLAG_skipws
= 0x0001,
330 FMTFLAG_unitbuf
= 0x0002,
331 FMTFLAG_uppercase
= 0x0004,
332 FMTFLAG_showbase
= 0x0008,
333 FMTFLAG_showpoint
= 0x0010,
334 FMTFLAG_showpos
= 0x0020,
335 FMTFLAG_left
= 0x0040,
336 FMTFLAG_right
= 0x0080,
337 FMTFLAG_internal
= 0x0100,
338 FMTFLAG_dec
= 0x0200,
339 FMTFLAG_oct
= 0x0400,
340 FMTFLAG_hex
= 0x0800,
341 FMTFLAG_scientific
= 0x1000,
342 FMTFLAG_fixed
= 0x2000,
343 FMTFLAG_hexfloat
= 0x3000,
344 FMTFLAG_boolalpha
= 0x4000,
345 FMTFLAG_stdio
= 0x8000,
346 FMTFLAG_adjustfield
= FMTFLAG_left
|FMTFLAG_right
|FMTFLAG_internal
,
347 FMTFLAG_basefield
= FMTFLAG_dec
|FMTFLAG_oct
|FMTFLAG_hex
,
348 FMTFLAG_floatfield
= FMTFLAG_scientific
|FMTFLAG_fixed
,
349 FMTFLAG_mask
= 0xffff
357 OPENMODE_trunc
= 0x10,
358 OPENMODE__Nocreate
= 0x40,
359 OPENMODE__Noreplace
= 0x80,
360 OPENMODE_binary
= 0x20,
372 IOSTATE_goodbit
= 0x00,
373 IOSTATE_eofbit
= 0x01,
374 IOSTATE_failbit
= 0x02,
375 IOSTATE_badbit
= 0x04,
376 IOSTATE__Hardfail
= 0x10,
380 typedef struct _iosarray
{
381 struct _iosarray
*next
;
394 typedef void (CDECL
*IOS_BASE_event_callback
)(IOS_BASE_event
, struct _ios_base
*, int);
395 typedef struct _fnarray
{
396 struct _fnarray
*next
;
398 IOS_BASE_event_callback event_handler
;
402 typedef struct _ios_base
{
403 const vtable_ptr
*vtable
;
404 #if _MSVCP_VER >= 100
405 size_t DECLSPEC_ALIGN(8) stdstr
;
406 #elif _MSVCP_VER >= 71
414 IOS_BASE_iosarray
*arr
;
415 IOS_BASE_fnarray
*calls
;
426 /* class basic_streambuf<char> */
428 const vtable_ptr
*vtable
;
429 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
449 } basic_streambuf_char
;
452 basic_streambuf_char
*strbuf
;
455 } istreambuf_iterator_char
;
459 void *iter_container
;
462 basic_streambuf_char
*strbuf
;
463 } ostreambuf_iterator_char
;
465 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*);
466 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*);
467 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*, char);
469 /* class basic_streambuf<wchar> */
471 const vtable_ptr
*vtable
;
472 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
492 } basic_streambuf_wchar
;
495 basic_streambuf_wchar
*strbuf
;
498 } istreambuf_iterator_wchar
;
502 void *iter_container
;
505 basic_streambuf_wchar
*strbuf
;
506 } ostreambuf_iterator_wchar
;
508 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*);
509 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*);
510 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*, wchar_t);
513 #define IOS_LOCALE(ios) (&(ios)->loc)
515 #define IOS_LOCALE(ios) ((ios)->loc)
518 /* class num_get<char> */
521 #if _MSVCP_VER <= 100
526 num_get
* num_get_char_use_facet(const locale
*);
527 istreambuf_iterator_char
* __thiscall
num_get_char_get_long(const num_get
*, istreambuf_iterator_char
*,
528 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, LONG
*);
529 istreambuf_iterator_char
* __thiscall
num_get_char_get_ushort(const num_get
*, istreambuf_iterator_char
*,
530 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, unsigned short*);
531 istreambuf_iterator_char
* __thiscall
num_get_char_get_uint(const num_get
*, istreambuf_iterator_char
*,
532 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, unsigned int*);
533 istreambuf_iterator_char
* __thiscall
num_get_char_get_ulong(const num_get
*, istreambuf_iterator_char
*,
534 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, ULONG
*);
535 istreambuf_iterator_char
* __thiscall
num_get_char_get_float(const num_get
*, istreambuf_iterator_char
*,
536 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, float*);
537 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*, istreambuf_iterator_char
*,
538 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, double*);
539 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*, istreambuf_iterator_char
*,
540 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, double*);
541 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*, istreambuf_iterator_char
*,
542 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, void**);
543 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*, istreambuf_iterator_char
*,
544 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, LONGLONG
*);
545 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*, istreambuf_iterator_char
*,
546 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, ULONGLONG
*);
547 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*, istreambuf_iterator_char
*,
548 istreambuf_iterator_char
, istreambuf_iterator_char
, ios_base
*, int*, bool*);
550 num_get
* num_get_wchar_use_facet(const locale
*);
551 num_get
* num_get_short_use_facet(const locale
*);
552 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_long(const num_get
*, istreambuf_iterator_wchar
*,
553 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, LONG
*);
554 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_ushort(const num_get
*, istreambuf_iterator_wchar
*,
555 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, unsigned short*);
556 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_uint(const num_get
*, istreambuf_iterator_wchar
*,
557 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, unsigned int*);
558 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_ulong(const num_get
*, istreambuf_iterator_wchar
*,
559 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, ULONG
*);
560 istreambuf_iterator_wchar
* __thiscall
num_get_wchar_get_float(const num_get
*, istreambuf_iterator_wchar
*,
561 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, float*);
562 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*, istreambuf_iterator_wchar
*,
563 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, double*);
564 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*, istreambuf_iterator_wchar
*,
565 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, double*);
566 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*, istreambuf_iterator_wchar
*,
567 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, void**);
568 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*, istreambuf_iterator_wchar
*,
569 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, LONGLONG
*);
570 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*, istreambuf_iterator_wchar
*,
571 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, ULONGLONG
*);
572 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*, istreambuf_iterator_wchar
*,
573 istreambuf_iterator_wchar
, istreambuf_iterator_wchar
, ios_base
*, int*, bool*);
575 /* class num_put<char> */
576 /* class num_put<wchar> */
584 num_put
* num_put_char_use_facet(const locale
*);
585 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*, ostreambuf_iterator_char
*,
586 ostreambuf_iterator_char
, ios_base
*, char, LONG
);
587 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*, ostreambuf_iterator_char
*,
588 ostreambuf_iterator_char
, ios_base
*, char, ULONG
);
589 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*, ostreambuf_iterator_char
*,
590 ostreambuf_iterator_char
, ios_base
*, char, double);
591 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*, ostreambuf_iterator_char
*,
592 ostreambuf_iterator_char
, ios_base
*, char, double);
593 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*, ostreambuf_iterator_char
*,
594 ostreambuf_iterator_char
, ios_base
*, char, const void*);
595 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*, ostreambuf_iterator_char
*,
596 ostreambuf_iterator_char
, ios_base
*, char, __int64
);
597 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*, ostreambuf_iterator_char
*,
598 ostreambuf_iterator_char
, ios_base
*, char, unsigned __int64
);
599 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*, ostreambuf_iterator_char
*,
600 ostreambuf_iterator_char
, ios_base
*, char, bool);
602 num_put
* num_put_wchar_use_facet(const locale
*);
603 num_put
* num_put_short_use_facet(const locale
*);
604 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*, ostreambuf_iterator_wchar
*,
605 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, LONG
);
606 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*, ostreambuf_iterator_wchar
*,
607 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, ULONG
);
608 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*, ostreambuf_iterator_wchar
*,
609 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, double);
610 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*, ostreambuf_iterator_wchar
*,
611 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, double);
612 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*, ostreambuf_iterator_wchar
*,
613 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, const void*);
614 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*, ostreambuf_iterator_wchar
*,
615 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, __int64
);
616 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*, ostreambuf_iterator_wchar
*,
617 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, unsigned __int64
);
618 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*, ostreambuf_iterator_wchar
*,
619 ostreambuf_iterator_wchar
, ios_base
*, wchar_t, bool);
621 void init_exception(void*);
622 void init_locale(void*);
625 void init_misc(void*);
627 /* class complex<float> */
633 /* class complex<double> */
634 /* class complex<long double> */
641 static inline int memcpy_wrapper( void *dst
, size_t size
, const void *src
, size_t count
)
643 memcpy( dst
, src
, count
);
646 static inline int memmove_wrapper( void *dst
, size_t size
, const void *src
, size_t count
)
648 memmove( dst
, src
, count
);
651 static inline int mbstowcs_wrapper( size_t *ret
, wchar_t *wcs
, size_t size
, const char *mbs
, size_t count
)
653 mbstowcs( wcs
, mbs
, count
);
656 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
657 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
658 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
659 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
662 void free_misc(void);