[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #ATY-776694]: [udunits] Compiler-Error in udunits2 with compatibility include-file of udunits


> I have now made some small tests. The problem is, that you use the name
> ut_unit twice, once as typedef and once as variablename:
> typedef struct utUnit {
> ut_unit*            ut_unit;
> } utUnit;

That's allowed in C.  I guess the g++ compiler is more restrictive.

> If you change the second ut_unit with something else (e.g.  ut_Unit),
> this works nicely as interface. But you will also need to change your
> files udunits-1.c:
> perl -pi.bak -e 's/->ut_unit/->ut_Unit/g;' udunits-1.c
> And of course, I don't know if anybody outside did rely upon
> utUnit->ut_unit , but I doubt it since the utUnit struct has been
> changed since udunits-1 anyway.

I changed the member's name from "ut_unit" to "unit2".  This will be in the 
next release.

> Best regards,
> Heiko

Steve Emmerson

Ticket Details
Ticket ID: ATY-776694
Department: Support UDUNITS
Priority: High
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.