| 1 |
//===- not-null-terminated-result-c.h - Helper header -------------*- C -*-===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
// |
| 9 |
// This header helps to maintain every function call checked by the |
| 10 |
// NotNullTerminatedResult checker. |
| 11 |
// |
| 12 |
//===----------------------------------------------------------------------===// |
| 13 |
|
| 14 |
#pragma clang system_header |
| 15 |
|
| 16 |
typedef __typeof__(sizeof(int)) size_t; |
| 17 |
typedef int errno_t; |
| 18 |
|
| 19 |
size_t strlen(const char *str); |
| 20 |
void *malloc(size_t size); |
| 21 |
char *strerror(int errnum); |
| 22 |
errno_t strerror_s(char *buffer, size_t bufferSize, int errnum); |
| 23 |
|
| 24 |
char *strcpy(char *dest, const char *src); |
| 25 |
errno_t strcpy_s(char *dest, size_t destSize, const char *src); |
| 26 |
char *strncpy(char *dest, const char *src, size_t count); |
| 27 |
errno_t strncpy_s(char *dest, size_t destSize, const char *src, size_t count); |
| 28 |
|
| 29 |
void *memcpy(void *dest, const void *src, size_t count); |
| 30 |
errno_t memcpy_s(void *dest, size_t destSize, const void *src, size_t count); |
| 31 |
|
| 32 |
char *strchr(char *str, int c); |
| 33 |
int strncmp(const char *str1, const char *str2, size_t count); |
| 34 |
size_t strxfrm(char *dest, const char *src, size_t count); |
| 35 |
|
| 36 |
void *memchr(const void *buffer, int c, size_t count); |
| 37 |
void *memmove(void *dest, const void *src, size_t count); |
| 38 |
errno_t memmove_s(void *dest, size_t destSize, const void *src, size_t count); |
| 39 |
void *memset(void *dest, int c, size_t count); |