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.
This commit is contained in:
Theo Buehler
2024-12-19 20:24:33 +01:00
parent c8bb011470
commit bf808ea0fc
8 changed files with 163 additions and 1 deletions

View File

@@ -18,6 +18,18 @@
#include_next <stdio.h>
#endif
#ifndef HAVE_GETDELIM
#include <sys/types.h>
#define getdelim libressl_getdelim
ssize_t getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp);
#endif
#ifndef HAVE_GETLINE
#include <sys/types.h>
#define getline libressl_getline
ssize_t getline(char **buf, size_t *bufsiz, FILE *fp);
#endif
#ifndef HAVE_ASPRINTF
#include <stdarg.h>
#define vasprintf libressl_vasprintf