--- configure.DIST 2005-09-14 05:15:11.000000000 -0700 +++ configure 2005-09-15 21:36:26.566715200 -0700 @@ -21248,6 +21248,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define timezonevar #include int --- gpsd.h.DIST 2005-08-16 16:39:33.000000000 -0700 +++ gpsd.h 2005-09-19 18:23:13.930828800 -0700 @@ -329,12 +329,16 @@ #define roundf(x) ((float)rintf(x)) #endif /* !HAVE_ROUND */ -/* OpenBSD and FreeBSD don't seem to have NAN, NetBSD does, others? */ +/* OpenBSD and FreeBSD and Cygwin don't seem to have NAN, NetBSD does, others? */ /* XXX test for this in configure? */ -#if defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__CYGWIN__) #ifndef NAN #define NAN (0.0/0.0) #endif /* !NAN */ #endif /* list of Operating Systems */ +/* Cygwin, in addition to NAN, doesn't have cfmakeraw */ +#if defined(__CYGWIN__) +void cfmakeraw(struct termios *); +#endif /* defined(__CYGWIN__) */ #endif /* _gpsd_h_ */ --- serial.c.DIST 2005-08-16 17:07:13.000000000 -0700 +++ serial.c 2005-09-19 18:32:53.634401600 -0700 @@ -17,6 +17,20 @@ # endif /* CNEW_RTSCTS */ #endif /* !CRTSCTS */ +#if defined(__CYGWIN__) +/* Workaround for Cygwin, which is missing cfmakeraw */ +/* Pasted from man page; added in serial.c arbitrarily */ +void cfmakeraw(struct termios *termios_p) +{ + termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP +|INLCR|IGNCR|ICRNL|IXON); + termios_p->c_oflag &= ~OPOST; + termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + termios_p->c_cflag &= ~(CSIZE|PARENB); + termios_p->c_cflag |= CS8; +} +#endif /* defined(__CYGWIN__) */ + speed_t gpsd_get_speed(struct termios* ttyctl) { speed_t code = cfgetospeed(ttyctl); @@ -103,7 +117,8 @@ } if (session->saved_baud != -1) { - /*@i@*/(void)cfsetspeed(&session->ttyset, (speed_t)session->saved_baud); + /*@i@*/(void)cfsetispeed(&session->ttyset, (speed_t)session->saved_baud); + /*@i@*/(void)cfsetospeed(&session->ttyset, (speed_t)session->saved_baud); (void)tcsetattr(session->gpsdata.gps_fd, TCSANOW, &session->ttyset); (void)tcflush(session->gpsdata.gps_fd, TCIOFLUSH); } @@ -215,3 +230,4 @@ session->gpsdata.gps_fd = -1; } } + --- sirfmon.c.DIST 2005-09-15 21:51:44.917238400 -0700 +++ sirfmon.c 2005-09-19 18:28:31.577582400 -0700 @@ -29,6 +29,10 @@ #include #include #include +/* Cygwin has only _timezone and not timezone unless the following is set */ +#if defined(__CYGWIN__) +#define timezonevar +#endif /* defined(__CYGWIN__) */ #include #include #include /* for O_RDWR */