Changed to check I_PUSH macro
Stopped including stropts.h
Changed definition of TTYNAME_MAX
Removed unnecessary headers/routines in order to improve compatibility