diff --git a/src/kernel/libroot/posix/glibc/stdio-common/asprintf.c b/src/kernel/libroot/posix/glibc/stdio-common/asprintf.c index 3b211d62b8..0301095828 100644 --- a/src/kernel/libroot/posix/glibc/stdio-common/asprintf.c +++ b/src/kernel/libroot/posix/glibc/stdio-common/asprintf.c @@ -14,10 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 02111-1307 USA. +*/ + +#include #include -#include #ifdef USE_IN_LIBIO # include diff --git a/src/kernel/libroot/posix/glibc/stdio-common/getline.c b/src/kernel/libroot/posix/glibc/stdio-common/getline.c index 4acb41de77..7b9ff5993a 100644 --- a/src/kernel/libroot/posix/glibc/stdio-common/getline.c +++ b/src/kernel/libroot/posix/glibc/stdio-common/getline.c @@ -19,20 +19,13 @@ #include #include -#undef __getline -#ifdef USE_IN_LIBIO -# include "../libio/libioP.h" -# undef ssize_t -# define ssize_t _IO_ssize_t -# define __getdelim _IO_getdelim -#endif +/** Like getdelim, but always looks for a newline. */ -/* Like getdelim, but always looks for a newline. */ ssize_t -__getline (char **lineptr, size_t *n, FILE *stream) +__getline(char **lineptr, size_t *n, FILE *stream) { - return __getdelim (lineptr, n, '\n', stream); + return __getdelim(lineptr, n, '\n', stream); } -weak_alias (__getline, getline) +weak_alias(__getline, getline) diff --git a/src/kernel/libroot/posix/glibc/stdio-common/getw.c b/src/kernel/libroot/posix/glibc/stdio-common/getw.c index 81156e6781..675d33c705 100644 --- a/src/kernel/libroot/posix/glibc/stdio-common/getw.c +++ b/src/kernel/libroot/posix/glibc/stdio-common/getw.c @@ -18,19 +18,16 @@ #include -#ifdef USE_IN_LIBIO -# include -# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s) -#endif -/* Read a word (int) from STREAM. */ +/** Read a word (int) from STREAM. */ + int -getw (FILE *stream) +getw(FILE *stream) { - int w; + int w; - /* Is there a better way? */ - if (fread ((void *) &w, sizeof (w), 1, stream) != 1) - return EOF; - return w; + if (fread((void *)&w, sizeof(w), 1, stream) != 1) + return EOF; + + return w; }