source: trunk/libs/newlib/src/newlib/libc/include/ssp/stdlib.h @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 721 bytes
Line 
1#ifndef _SSP_STDLIB_H_
2#define _SSP_STDLIB_H_
3
4#include <ssp/ssp.h>
5
6#if __SSP_FORTIFY_LEVEL > 0
7__BEGIN_DECLS
8
9__ssp_decl(size_t, mbstowcs, (wchar_t *__buf, const char *__src, size_t __n))
10{
11  if (__buf != NULL)
12    __ssp_check(__buf, __n * sizeof(wchar_t), __ssp_bos);
13  return __ssp_real_mbstowcs (__buf, __src, __n);
14}
15
16__ssp_redirect_raw(size_t, wcstombs, \
17    (char *__buf, const wchar_t *__src, size_t __len), \
18    (__buf, __src, __len), __buf != NULL, __ssp_bos);
19
20__ssp_decl(int, wctomb, (char *__buf, wchar_t __wc))
21{
22  if (__buf != NULL)
23    __ssp_check(__buf, MB_CUR_MAX, __ssp_bos);
24  return __ssp_real_wctomb (__buf, __wc);
25}
26
27__END_DECLS
28
29#endif /* __SSP_FORTIFY_LEVEL > 0 */
30#endif /* _SSP_STDLIB_H_ */
Note: See TracBrowser for help on using the repository browser.