diff options
author | Gary E. Miller <gem@rellim.com> | 2015-01-30 16:17:35 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-01-30 16:17:35 -0800 |
commit | e76ba112ea83864c4b384e39af8f3752eaa9ecef (patch) | |
tree | 20e8d94d3611c7b77bb422491c899e0bd5553b21 | |
parent | 48c27c3148aef8ed29cad85d808746b0c0082e0a (diff) | |
parent | b36efc999c5024cd9aa987f85ba8d4a4774823c5 (diff) | |
download | gpsd-e76ba112ea83864c4b384e39af8f3752eaa9ecef.tar.gz |
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/gpsd
-rw-r--r-- | serial.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -610,13 +610,27 @@ ssize_t gpsd_serial_write(struct gps_device_t * session, } void gpsd_optimize_io(struct gps_device_t *session, - const int minlength, const bool textual UNUSED) + int minlength, const bool textual UNUSED) /* optimize I/O mode depending on the minimum packet size */ { /* bail out if this is not actually a tty */ if (isatty(session->gpsdata.gps_fd) == 0) return; +#ifdef __NetBSD__ + /* + * Apparently NetBSD termios (at least on pty on netbsd-[56]) has + * trouble with VMIN=n VTIME=1. Or reads are aftempted when no + * bytes are present and none arrive, in which case read is + * correct for waiting indefinitely. Until this is + * debugged/fixed, avoid it, because even if it doesn't affect + * actual operation (unknown) it's important to preserve + * regression tests to allow bisecting for other bugs. + * http://pubs.opengroup.org/onlinepubs/007908799/xbd/termios.html + */ + minlength = 1; +#endif + /* * This is an optimization hack. The idea is to get away from * character-at-a-time I/O in order to slow down the rate at |