diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index ada29b27e..351ba34cb 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -33,7 +33,9 @@ #include #include #include +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #ifdef HAVE_PTHREAD #include #endif @@ -2358,9 +2360,13 @@ struct rig_state { /* * overridable fields */ - hamlib_port_t rigport; /*!< Rig port (internal use). */ - hamlib_port_t pttport; /*!< PTT port (internal use). */ - hamlib_port_t dcdport; /*!< DCD port (internal use). */ + // moving the hamlib_port_t to the end of rig_state and making it a pointer + // this should allow changes to hamlib_port_t without breaking shared libraries + // these will maintain a copy of the new port_t for backwards compatiblity + // to these offsets -- note these must stay until a major version update is done + hamlib_port_t rigport_deprecated; /*!< Rig port (internal use). */ + hamlib_port_t pttport_deprecated; /*!< PTT port (internal use). */ + hamlib_port_t dcdport_deprecated; /*!< DCD port (internal use). */ double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */ @@ -2454,6 +2460,9 @@ struct rig_state { #ifdef HAVE_PTHREAD pthread_mutex_t mutex_set_transaction; #endif + hamlib_port_t *rigport; /*!< Rig port (internal use). */ + hamlib_port_t *pttport; /*!< PTT port (internal use). */ + hamlib_port_t *dcdport; /*!< DCD port (internal use). */ }; //! @cond Doxygen_Suppress