3 #define _POSIX_C_SOURCE 200112L
18 return (os_error_t)errno;
30 if (strerror_r(err, buffer,
size) != 0)
#define STA_DECL
sal2 annotation on function implementations to copy annotations from the declaration
CT_NODISCARD CT_PUREFN CT_BASE_API size_t ctu_strlen(const char *str)
get the length of a string not including the null terminator equivalent to strlen but with safety che...
#define CT_UNUSED(x)
mark a variable as unused
CT_STD_API size_t str_sprintf(STA_WRITES(len) char *str, size_t len, STA_FORMAT_STRING const char *fmt,...)
format a string with printf-like syntax
CT_LOCAL size_t impl_error_length(os_error_t error)
STA_DECL CT_LOCAL os_error_t impl_last_error(void)
CT_LOCAL size_t impl_error_string(os_error_t error, char *buffer, size_t size)