1 #define _GNU_SOURCE 2 #include <stdio.h> 3 getw(FILE * f)4 int getw(FILE* f) { 5 int x; 6 return fread(&x, sizeof x, 1, f) ? x : EOF; 7 } 8