fix broken ttyname[_r] (failure to null-terminate result)
[musl] / include / stdio.h
index fa1b4e9..9aa2f78 100644 (file)
@@ -90,7 +90,9 @@ int putc(int, FILE *);
 int putchar(int);
 
 char *fgets(char *, int, FILE *);
+#if __STDC_VERSION__ < 201112L
 char *gets(char *);
+#endif
 
 int fputs(const char *, FILE *);
 int puts(const char *);
@@ -168,6 +170,12 @@ void clearerr_unlocked(FILE *);
 int feof_unlocked(FILE *);
 int ferror_unlocked(FILE *);
 int fileno_unlocked(FILE *);
+int getw(FILE *);
+int putw(int, FILE *);
+#endif
+
+#ifdef _BSD_SOURCE
+char *fgetln(FILE *, size_t *);
 #endif
 
 #ifdef _GNU_SOURCE
@@ -177,7 +185,7 @@ char *fgets_unlocked(char *, int, FILE *);
 int fputs_unlocked(const char *, FILE *);
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
 #define tmpfile64 tmpfile
 #define fopen64 fopen
 #define freopen64 freopen