[Nut-upsdev] Bug#439986: Renaming `UPSCONN' to `UPSCONN_t' causes problems when upgrading.

Arnaud Quette aquette.dev at gmail.com
Tue Sep 11 18:53:21 UTC 2007


tags 439986 upstream
thanks

Hi Florian,

2007/8/29, Florian Forster <octo at verplant.org>:
> Package: nut-dev
> Version: 2.2.0-1
> Severity: minor
>
> After upgrading from version 2.0.something to version 2.2.0-1 the type
> `UPSCONN' had been renamed to `UPSCONN_t'. This is a problem for
> software that is supposed to work with different versions of this
> library - especially since it's not possible to determine the version
> from within the preprocessor.
>
> The arguably best solution would be to add an additional type
>   typedef UPSCONN_t UPSCONN
> for backwards compatibility.
>
> The second best option would be to use a define, such as
>   #define UPSCONN UPSCONN_t
>
> The third best option would be to add something to let the preprocessor
> determine the libraries version and have it configure the program
> accordingly. An example could be:
>   /* Version 2.2.0 */
>   #define LIBUPSCLIENT_VERSION 200200000L

Since I'm preparing 2.2.1, I will add a typedef to manage the backward compat.
I've fixed it in the subversion trunk and Testing branches.

A last question: what is your use of this (wmnut or something else)?

Thanks for the report.
Arnaud
-- 
Free Software Developer - http://arnaud.quette.free.fr/
Debian Developer - http://people.debian.org/~aquette/
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Ubuntu Media Center (UMC) Project Leader - https://launchpad.net/~umc-team



More information about the Nut-upsdev mailing list