From 75ef5bb160fb261da1950abfd3d22f54011458e1 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 5 Dec 2015 13:58:37 -0600 Subject: wrap gets on Windows, replacing '\r\n' with '\n' --- include/compat/stdio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/compat/stdio.h b/include/compat/stdio.h index 4b96b8b..a0dda6f 100644 --- a/include/compat/stdio.h +++ b/include/compat/stdio.h @@ -28,11 +28,13 @@ int asprintf(char **str, const char *fmt, ...); void posix_perror(const char *s); FILE * posix_fopen(const char *path, const char *mode); +char * posix_fgets(char *s, int size, FILE *stream); int posix_rename(const char *oldpath, const char *newpath); #ifndef NO_REDEF_POSIX_FUNCTIONS #define perror(errnum) posix_perror(errnum) #define fopen(path, mode) posix_fopen(path, mode) +#define fgets(s, size, stream) posix_fgets(s, size, stream) #define rename(oldpath, newpath) posix_rename(oldpath, newpath) #endif -- cgit v1.2.3-55-g6feb