From d0862e2176092420d4e877de0831d1458c39a32b Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 14:49:16 -0500 Subject: compile under c89 --- src/stdlib/wcstombs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/stdlib/wcstombs.c b/src/stdlib/wcstombs.c index 62524aa3..76958ae9 100644 --- a/src/stdlib/wcstombs.c +++ b/src/stdlib/wcstombs.c @@ -1,7 +1,13 @@ #include -#include #include "_stdlib.h" +#ifdef __STDC_VERSION__ +#include +#else +static size_t wcslen(const wchar_t *); +#include "wchar/wcslen.c" +#endif + /** convert wide character string to multibyte string **/ size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n) -- cgit v1.2.1