diff options
author | Theo Buehler <tb@openbsd.org> | 2024-12-19 20:24:33 +0100 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2024-12-20 01:14:04 +0100 |
commit | bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a (patch) | |
tree | ab5a678d5652e2b261a7084706a36132b6aa4f80 /include | |
parent | c8bb0114707a17ddb2d4a7a62deef2622252a05e (diff) | |
download | portable-bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a.tar.gz portable-bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a.tar.bz2 portable-bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a.zip |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/compat/stdio.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ | |||
18 | #include_next <stdio.h> | 18 | #include_next <stdio.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #ifndef HAVE_GETDELIM | ||
22 | #include <sys/types.h> | ||
23 | #define getdelim libressl_getdelim | ||
24 | ssize_t getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp); | ||
25 | #endif | ||
26 | |||
27 | #ifndef HAVE_GETLINE | ||
28 | #include <sys/types.h> | ||
29 | #define getline libressl_getline | ||
30 | ssize_t getline(char **buf, size_t *bufsiz, FILE *fp); | ||
31 | #endif | ||
32 | |||
21 | #ifndef HAVE_ASPRINTF | 33 | #ifndef HAVE_ASPRINTF |
22 | #include <stdarg.h> | 34 | #include <stdarg.h> |
23 | #define vasprintf libressl_vasprintf | 35 | #define vasprintf libressl_vasprintf |