003-fputs-stdout.c (380B)
1 /* fputs(s, stdout) — canonical libc usage. fputs casts stream to long 2 * (the fd) and forwards to write. stdout is a global (FILE*)1 that 3 * boot2-syscall.c provides as a real symbol (mes's #define is undef'd 4 * post-include). */ 5 typedef long FILE; 6 extern FILE *stdout; 7 extern int fputs (char const *s, FILE *stream); 8 9 int 10 main (void) 11 { 12 fputs ("hi\n", stdout); 13 return 0; 14 }