Added an implementation of puts(3) because gcc needs it.

I still didn't add it to stdio.h since it's still stupid.
This commit is contained in:
Jonas 'Sortie' Termansen 2012-01-08 01:57:45 +01:00
parent 25d8551b26
commit 8eebe18922
1 changed files with 9 additions and 0 deletions

View File

@ -47,3 +47,12 @@ int putchar(int c)
{
return fputc(c, stdout);
}
/* This function is quite stupid because of its trailing newline that fputs(3)
does not have - but it's still better than gets(3). I'd have left it out if
various programs didn't need it. */
int puts(const char* str)
{
return printf("%s\n", str) < 0 ? EOF : 1;
}