Changed definition of TTYNAME_MAX
Removed nonessential parts in order to improve compatibility
WIP: Added compatibility with HP-UX
WIP: Added compatibility with AIX