On Sun, Mar 6, 2016 at 4:36 PM, Magnus Fromreide <ma...@lysator.liu.se>
wrote:

> On Sat, Mar 05, 2016 at 02:59:55PM -0800, Bart Van Assche wrote:
> > On 03/03/16 19:05, Robert Story wrote:
> > > On Sat, 20 Feb 2016 19:36:20 -0800 Bart wrote:
> > > BVA> On 02/05/16 17:35, Robert Drake wrote:
> > > BVA> > The perl guys apparently added a definition for U64 which
> > > BVA> > conflicts with the one in int64.h. Is it possible to add
> > > BVA> > #ifdef guards to one definition or the other, or if one is
> > > BVA> > used in a limited scope can the name be changed?
> > > BVA>
> > > BVA> The U64 typedef has been removed from
> > > BVA> include/net-snmp/library/int64.h. Can you verify whether this
> > > BVA> fixes the build issue ?
> > >
> > > I think this needs some discussion. While the change does not
> > > affect binary compatibility, it does remove a typedef that has been
> > > around since 1998. It's possible and even likely that people are
> > > using this typedef in their own modules, and this will break
> > > backwards compatibility for them.
> >
> > Hello Robert,
> >
> > Restoring that typedef is easy - all that is needed is something like
> > the patch below. But I'm not sure whether we really should restore that
> > typedef. The name of the U64 type is so short that there might be other
> > projects than Perl that define a conflicting type with the same name.
>
> Yes, but then, counter64 and oid ain't that good as names goes either...
> (And yes, the perl folks are just as bad as us when it comes to inventing
> good
> names)
>
> I can surely see how both points of view have merit.
>

Just a data point: one of the first things we did to be able to use the
net-snmp client libraries was to change the net-snmp U64 typedef, since our
system has its own idea of what a U64 is.  (I think this is Bart's point.)

(Bart, I think mib2c still needs to be fixed, and since it uses the type as
part of a filename I fear that we do need *a* typedef, since having a file
named "mib2c-conf.d/generic-get-struct counter64 *.m2i" is probably going
to cause way more problems than it's worth :-) .)

  Bill

>
> > diff --git a/include/net-snmp/library/int64.h
> b/include/net-snmp/library/int64.h
> > index 3a85213..78e7601 100644
> > --- a/include/net-snmp/library/int64.h
> > +++ b/include/net-snmp/library/int64.h
> > @@ -5,6 +5,8 @@
> >  extern          "C" {
> >  #endif
> >
> > +    typedef struct counter64 U64;
> > +
> >  #define I64CHARSZ 21
> >
> >      void            divBy10(struct counter64, struct counter64 *,
> unsigned int *);
> > --
> > 2.7.2
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Net-snmp-coders mailing list
> > Net-snmp-coders@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to