; Another attempt to fix the MinGW64 build

* src/conf_post.h [WINDOWSNT]: Add prototype for 'getline'.
This commit is contained in:
Eli Zaretskii
2026-04-14 15:32:11 +03:00
parent 601c099d1d
commit 6bda6e2123

View File

@@ -426,10 +426,17 @@ extern int gl_consolesafe_vprintf (const char *restrict format, va_list args)
# endif /* !_UCRT */
#endif /* WINDOWSNT */
#if defined WINDOWSNT && !defined HAVE_DECL_GETDELIM
#if defined WINDOWSNT
/* MinGW64 doesn't have getdelim, called by Gnulib's getline, but the
MS-Windows build omits stdio.h module, where getdelim is declared. */
# include <stdio.h>
# include <stddef.h>
# if !(defined HAVE_DECL_GETDELIM && defined HAVE_DECL_GETLINE)
# include <stdio.h>
# include <stddef.h>
# if !defined HAVE_DECL_GETDELIM
extern ssize_t getdelim (char **, size_t *, int, FILE *);
# endif
# if !defined HAVE_DECL_GETLINE
extern ssize_t getline (char **, size_t *, FILE *);
# endif
# endif
#endif