add extern C to libc-shim string.h in C++ mode

This commit is contained in:
Martin Fouilleul 2023-09-19 08:57:23 +02:00
parent ea74114693
commit 01565324c5
1 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,9 @@
#include "stb/stb_sprintf.h"
#ifdef __cplusplus
extern "C" {
#endif
void* memset(void* b, int c, size_t n);
void* memcpy(void* __restrict dst, const void* __restrict src, size_t n);
void* memmove(void* dst, const void* src, size_t n);
@ -12,3 +16,7 @@ char* strcpy(char* __restrict s1, const char* __restrict s2);
#define snprintf stbsp_snprintf
#define vsnprintf stbsp_vsnprintf
#ifdef __cplusplus
} // extern "C"
#endif