ChangeSet 1.914.157.6, 2003/02/15 23:20:13-06:00, kai@tp1.ruhr-uni-bochum.de klibc: Fix the "hello" example (for real) Greg's fix used fwrite on a file descriptor obtained from open(), which only works by luck, since for klibc FILE * == fd. Use standard C lib functions for open/close. diff -Nru a/usr/root/hello.c b/usr/root/hello.c --- a/usr/root/hello.c Wed Feb 19 11:42:10 2003 +++ b/usr/root/hello.c Wed Feb 19 11:42:10 2003 @@ -4,10 +4,10 @@ const char hello[] = "Hi Ma!\n"; int main (void) { - int file; + FILE *file; - file = open("/dev/console", O_WRONLY); + file = fopen("/dev/console", "w"); _fwrite(hello, sizeof(hello)-1, file); - close(file); + fclose(file); return 0; }