aboutsummaryrefslogtreecommitdiff
path: root/include/compat
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2015-12-05 13:58:37 -0600
committerBrent Cook <busterb@gmail.com>2015-12-05 13:58:37 -0600
commit75ef5bb160fb261da1950abfd3d22f54011458e1 (patch)
tree22c96a95db483b11f4914a5ddcea72245966a0a2 /include/compat
parentd7317353a98930650711fa94c6110b16f191d4f2 (diff)
downloadportable-75ef5bb160fb261da1950abfd3d22f54011458e1.tar.gz
portable-75ef5bb160fb261da1950abfd3d22f54011458e1.tar.bz2
portable-75ef5bb160fb261da1950abfd3d22f54011458e1.zip
wrap gets on Windows, replacing '\r\n' with '\n'
Diffstat (limited to 'include/compat')
-rw-r--r--include/compat/stdio.h2
1 files changed, 2 insertions, 0 deletions
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, ...);
28 28
29void posix_perror(const char *s); 29void posix_perror(const char *s);
30FILE * posix_fopen(const char *path, const char *mode); 30FILE * posix_fopen(const char *path, const char *mode);
31char * posix_fgets(char *s, int size, FILE *stream);
31int posix_rename(const char *oldpath, const char *newpath); 32int posix_rename(const char *oldpath, const char *newpath);
32 33
33#ifndef NO_REDEF_POSIX_FUNCTIONS 34#ifndef NO_REDEF_POSIX_FUNCTIONS
34#define perror(errnum) posix_perror(errnum) 35#define perror(errnum) posix_perror(errnum)
35#define fopen(path, mode) posix_fopen(path, mode) 36#define fopen(path, mode) posix_fopen(path, mode)
37#define fgets(s, size, stream) posix_fgets(s, size, stream)
36#define rename(oldpath, newpath) posix_rename(oldpath, newpath) 38#define rename(oldpath, newpath) posix_rename(oldpath, newpath)
37#endif 39#endif
38 40