Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the prototype of getline on platforms where we need to redefine it (non-GNU)
[simgrid.git] / src / xbt / getline.c
index dfda650..ecf94b3 100644 (file)
@@ -22,7 +22,8 @@
 #include "xbt/sysdep.h" /* headers of this function */
 #include "portable.h"
 
-ssize_t getline(char **buf, size_t *n, FILE *stream) {
+#ifndef HAVE_GETLINE
+long getline(char **buf, size_t *n, FILE *stream) {
    
    int i, ch;
    
@@ -56,4 +57,4 @@ ssize_t getline(char **buf, size_t *n, FILE *stream) {
    return (ssize_t)i;
 }
 
-
+#endif /* HAVE_GETLINE */