27#ifndef INCLUDED_SECURE_CRT
28#define INCLUDED_SECURE_CRT
41# define EMULATE_SECURE_CRT 0
43# define EMULATE_SECURE_CRT 1
50#if !OS_UNIX || OS_MACOSX || OS_OPENBSD
56#if !OS_OPENBSD && !OS_MACOSX
57extern size_t strnlen(
const char* str,
size_t max_len);
59extern size_t wcsnlen(
const wchar_t* str,
size_t max_len);
69extern int strncpy_s(
char* dst,
size_t max_dst_chars,
const char* src,
size_t max_src_chars);
70extern int wcsncpy_s(
wchar_t* dst,
size_t max_dst_chars,
const wchar_t* src,
size_t max_src_chars);
78extern int strcpy_s(
char* dst,
size_t max_dst_chars,
const char* src);
79extern int wcscpy_s(
wchar_t* dst,
size_t max_dst_chars,
const wchar_t* src);
86extern int strncat_s(
char* dst,
size_t max_dst_chars,
const char* src,
size_t max_src_chars);
87extern int wcsncat_s(
wchar_t* dst,
size_t max_dst_chars,
const wchar_t* src,
size_t max_src_chars);
95extern int strcat_s(
char* dst,
size_t max_dst_chars,
const char* src);
96extern int wcscat_s(
wchar_t* dst,
size_t max_dst_chars,
const wchar_t* src);
115#define wscanf_s wscanf
116#define fscanf_s fscanf
117#define fwscanf_s fwscanf
118#define sscanf_s sscanf
119#define swscanf_s swscanf
#define WPRINTF_ARGS(fmtpos)
Definition: code_annotation.h:259
#define PRINTF_ARGS(fmtpos)
Definition: code_annotation.h:257
#define VWPRINTF_ARGS(fmtpos)
Definition: code_annotation.h:260
#define VPRINTF_ARGS(fmtpos)
Definition: code_annotation.h:258
const Status STRING_NOT_TERMINATED
Definition: secure_crt.h:36
size_t strnlen(const char *str, size_t max_len)
int swprintf_s(wchar_t *buf, size_t max_chars, const wchar_t *fmt,...) WPRINTF_ARGS(3)
int strncpy_s(char *dst, size_t max_dst_chars, const char *src, size_t max_src_chars)
int wcsncat_s(wchar_t *dst, size_t max_dst_chars, const wchar_t *src, size_t max_src_chars)
size_t wcsnlen(const wchar_t *str, size_t max_len)
int wcscpy_s(wchar_t *dst, size_t max_dst_chars, const wchar_t *src)
int wcscat_s(wchar_t *dst, size_t max_dst_chars, const wchar_t *src)
int vswprintf_s(wchar_t *dst, size_t max_dst_chars, const wchar_t *fmt, va_list ap) VWPRINTF_ARGS(3)
int wcsncpy_s(wchar_t *dst, size_t max_dst_chars, const wchar_t *src, size_t max_src_chars)
int strcpy_s(char *dst, size_t max_dst_chars, const char *src)
int strcat_s(char *dst, size_t max_dst_chars, const char *src)
int sprintf_s(char *buf, size_t max_chars, const char *fmt,...) PRINTF_ARGS(3)
int vsprintf_s(char *dst, size_t max_dst_chars, const char *fmt, va_list ap) VPRINTF_ARGS(3)
int strncat_s(char *dst, size_t max_dst_chars, const char *src, size_t max_src_chars)
i64 Status
Error handling system.
Definition: status.h:173