Use config.h
Add fgetc and friends.
realloc: return new pointer