diff options
Diffstat (limited to 'gpsd.h')
-rw-r--r-- | gpsd.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -17,11 +17,16 @@ extern "C" { #include <stdbool.h> #include <stdint.h> #include <stdio.h> +#include "gpsd_config.h" +#ifdef HAVE_TERMIOS_H #include <termios.h> +#endif +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> /* for fd_set */ +#endif #include <time.h> /* for time_t */ #include "gps.h" -#include "gpsd_config.h" #include "os_compat.h" /* @@ -361,11 +366,13 @@ struct gps_type_t { void (*init_query)(struct gps_device_t *session); void (*event_hook)(struct gps_device_t *session, event_t event); #ifdef RECONFIGURE_ENABLE +#ifdef HAVE_TERMIOS_H bool (*speed_switcher)(struct gps_device_t *session, speed_t speed, char parity, int stopbits); void (*mode_switcher)(struct gps_device_t *session, int mode); bool (*rate_switcher)(struct gps_device_t *session, double rate); double min_cycle; +#endif /* HAVE_TERMIOS_H */ #endif /* RECONFIGURE_ENABLE */ #ifdef CONTROLSEND_ENABLE ssize_t (*control_send)(struct gps_device_t *session, char *buf, size_t buflen); @@ -472,7 +479,9 @@ struct gps_device_t { sourcetype_t sourcetype; servicetype_t servicetype; int mode; +#ifdef HAVE_TERMIOS_H struct termios ttyset, ttyset_old; +#endif #ifndef FIXED_PORT_SPEED unsigned int baudindex; #endif /* FIXED_PORT_SPEED */ @@ -822,9 +831,11 @@ extern ssize_t gpsd_serial_write(struct gps_device_t *, const char *, const size_t); extern bool gpsd_next_hunt_setting(struct gps_device_t *); extern int gpsd_switch_driver(struct gps_device_t *, char *); +#ifdef HAVE_TERMIOS_H extern void gpsd_set_speed(struct gps_device_t *, speed_t, char, unsigned int); extern speed_t gpsd_get_speed(const struct gps_device_t *); extern speed_t gpsd_get_speed_old(const struct gps_device_t *); +#endif /* HAVE_TERMIOS_H */ extern int gpsd_get_stopbits(const struct gps_device_t *); extern char gpsd_get_parity(const struct gps_device_t *); extern void gpsd_assert_sync(struct gps_device_t *); |