Yes, we do have snprintf() for a few decades
Use INT_MAX/LONG_MAX
No need to #ifdef standard POSIX includes
NAMLEN macro isn't used
mkstemp() exists since 2001
Begin removing old tty cruft
No need to guard inclusion of standard headers