Replaced macros by their full expression. Added explicit declaration of the fileno() function to remove gcc’s warning.