From bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Thu, 19 Dec 2024 20:24:33 +0100 Subject: Provide getdelim and getline compat shims These are portable implementations from NetBSD that are needed on Windows and perhaps some other platforms with the new versions of the mlkem tests. --- include/compat/stdio.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/compat/stdio.h b/include/compat/stdio.h index 2af8f3e..2ccdeeb 100644 --- a/include/compat/stdio.h +++ b/include/compat/stdio.h @@ -18,6 +18,18 @@ #include_next #endif +#ifndef HAVE_GETDELIM +#include +#define getdelim libressl_getdelim +ssize_t getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp); +#endif + +#ifndef HAVE_GETLINE +#include +#define getline libressl_getline +ssize_t getline(char **buf, size_t *bufsiz, FILE *fp); +#endif + #ifndef HAVE_ASPRINTF #include #define vasprintf libressl_vasprintf -- cgit v1.2.3-55-g6feb