rework langinfo code for ABI compat and for use by time code
[musl] / src / stdio / getdelim.c
index 20d345d..26093a6 100644 (file)
@@ -1,8 +1,11 @@
 #include "stdio_impl.h"
+#include <string.h>
+#include <inttypes.h>
+#include <errno.h>
 
 #define MIN(a,b) ((a)<(b) ? (a) : (b))
 
-ssize_t getdelim(char **s, size_t *n, int delim, FILE *f)
+ssize_t getdelim(char **restrict s, size_t *restrict n, int delim, FILE *restrict f)
 {
        char *tmp;
        unsigned char *z;
@@ -57,3 +60,5 @@ oom:
        errno = ENOMEM;
        return -1;
 }
+
+weak_alias(getdelim, __getdelim);