Fixes
aclocal:configure.ac:22: warning: macro `AM_PROG_AR' not found in library
and
./configure: line 4024: AM_PROG_AR: command not found
with old automake.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This removes our direct zlib dependency (although of course protobuf
still uses it internally), removes a fixed 4 MiB buffer and its
corresponding limit on the terminal size, reduces some string copying,
and deletes some code.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
(Closes #230.)
There appears to be a typo/thinko in the ncurses detection
stuff in configure.ac. The fallout was that on a Linux host
without ncurses-devel installed, "./configure" failed to find
curses.h but claimed overall success, then the build failed
later during make. This patch removes an extraneous comma, which
seems to make it both fail and succeed correctly when it should.
As far as I know, for all implementations of libutempter, the
utempter_remove_added_record() function depends on the file descriptor
passed to utempter_add_record() to still be valid. The reason for this,
is that this file descriptor is propagated to the setuid utility that is
responsible for modifying utmpx.
Modify the code to remove the utmpx entry before closing the
pseudo-terminal master device. While there, simply use
utempter_remove_record(), which takes the file descriptor explicitly.
The advantage is that this prevents potential foot-shooting in the
future. Visual inspection of the source code will make it more obvious
that utempter depends on the file descriptor.
Closes#179.
EL5 lacks htobe64 and friends. Using its byteswap.h requires an endianness
check in our headers, which is fragile and compiler-dependent. It's a fair
amount of code [1], and is only useful on EL5.
So instead, let's include a fallback implementation of these functions, and use
it whenever we can't find the (now-)standard Linux or OS X routines. The
fallback is endianness-independent and should work on any platform.
[1] https://github.com/rurban/mosh/commit/da1a5abd1e09f0c1e9295357bb480a643d9dc8e3