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.

> Bart.
> 
> 
> 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

Reply via email to