A Darwin PPC 32-bit user observes huge values numer == 1000000000 and
denom == 18431683 returned from mach_timebase_info(). For these
values, mach_absolute_time() * numer overflows uint64_t every 1000.82
seconds, and 1000000 * denom always overflows uint32_t, with the
effect of making time run backwards at -11190660 times its usual
speed.
This bug was masked on Darwin x86 64-bit, where numer == denom == 1.
Fix it by doing the conversion with double arithmetic instead.
Closes#479.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Fixes following problem when compiling mosh with gcc4.8 and
__ARM_NEON__ defined by using -121 instead of 135.
ocb.cc: In function 'block double_block(block)':
ocb.cc:263:56: error: narrowing conversion of '135' from
'int' to '__builtin_neon_qi' inside { } is ill-formed in
C++11 [-Werror=narrowing]
Signed-off-by: Pasi Sjöholm <pasi.sjoholm@jollamobile.com>
We aren't sure why this change was made, and reverting it appears to help
fix mouse issues in emacs related to text hilighting.
Signed-off-by: Andrew Chin <achin@eminence32.net>
This reverts commit 578db45fbf.
The NULL inputs to getaddrinfo are valid in certain cases, and at
least in the case of node, important. The segfault happens not with
getaddrinfo, but with the error message generation below it.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Otherwise the printed exception may be immediately hidden when the
terminal exits alternate screen mode.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Uses environment variable MOSH_ESCAPE_KEY. Defaults to current Ctrl-^
which is somewhat problematic for many non-US keyboards.
Signed-off-by: Timo J. Rinne <tri@iki.fi>
Closes#425. Closes#215.
Instead of looking for htobe64 which is be available both when
be64toh or betoh64 are, check for the latter functions. If we
find betoh64 but not be64toh, use compat #defines. If both
can't be found, search for OSX' OSSwapHostToBigInt64.
Also include sys/types.h in byteorder.h (which is necessary for
byteorder functions on OpenBSD), and incidentally fixes build
of networkfragment.cc.
Fixes build on OpenBSD
Signed-off-by: Jérémie Courrèges-Anglas <jca@wxcvbn.org>
There’s a bug in automake ≥ 1.10, < 1.12 where ‘-Wall foreign’
incorrectly turns off warnings about portability issues. To get
consistent results across automake versions, use ‘foreign -Wall’
instead.
http://debbugs.gnu.org/cgi-bin/bugreport.cgi?bug=7669
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Closes#413