diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-11 12:46:48 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-11 12:46:48 +0000 |
commit | cc576322c3fe31952e2cac3460948e0ea8bbb64a (patch) | |
tree | 3e204de60ac2debd1a4a279c762b6712aff8d4cc /tsip.c | |
parent | 1d02de96e05e286904f3241043be647d13722ab7 (diff) | |
download | gpsd-cc576322c3fe31952e2cac3460948e0ea8bbb64a.tar.gz |
Port hack for OpebBSD; base code on C99 round()/roundf().
Diffstat (limited to 'tsip.c')
-rw-r--r-- | tsip.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -105,7 +105,7 @@ static bool tsip_speed_switch(struct gps_device_t *session, unsigned int speed) unsigned char buf[100]; putbyte(0,0xff); /* current port */ - putbyte(1,(rint(log((double)speed/300)/M_LN2))+2); /* input baudrate */ + putbyte(1,(round(log((double)speed/300)/M_LN2))+2); /* input baudrate */ putbyte(2,buf[1]); /* output baudrate */ putbyte(3,8); /* character width (8 bits) */ putbyte(4,1); /* parity (odd) */ @@ -175,7 +175,7 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session) f2 = getf(6); /* leap seconds */ if (f2 > 10.0) { session->gps_week = (unsigned)s1; - session->context->leap_seconds = (int)rintf(f2); + session->context->leap_seconds = (int)roundf(f2); session->context->valid = LEAP_SECOND_VALID; session->gpsdata.sentence_time = gpstime_to_unix(s1, f1) - f2; |