On mån, 2008-05-19 at 19:01 +0530, Rakesh Pandit wrote:
> 2008/5/19 Rakesh Pandit <[EMAIL PROTECTED]>:
> [..]
> >
> >  This problem is faced while building rpm even now with net-snmp-5.4.1.
> >  I have reproduced it The reason for closing this bug was that Bernard
> >  Johnson had no time continuing contributing to this bug[1] 

Bug [1] is due to the fact that ntop #defines free to something that
require an l-value as an argument, just as Jan Safranek states.

Further, #defining any name reserved by the standard means the program
is out in undefined behaviour-land and deserve what it get, i.e. ntop
isn't written in C but in something else and thus can't expect to
interface cleanly with C libraries.

This can also be expressed as follows:

9899:1999 7.1.3 Reserved identifiers §1-2
...
--  Each identifier with file scope listed in any of the following 
        subclauses (including the future library directions) is reserved
        for use as a macro name and as an identifier with file scope in
        the same name space if any of its associated headers is
        included.

No other identifiers are reserved. If the program declares or defines an
identifier in a context in which it is reserved (other than as allowed
by 7.1.4), or defines a reserved identifier as a macro name, the
behavior is undefined.

Fix your code!

> and rpm build
> >  (as mentioned in last remark at [2]).
> >             SNMP_FREE assume that the value passed there is l-value, but
> >  net-snmp passes r-value -> compilation error at
> >
> > include/net-snmp/library/container.h: Line 440

As for comment #117 in [2], please see above.

/MF

> 
> Forgot to mention links
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=389631
> [2] https://bugzilla.redhat.com/show_bug.cgi?id=219025
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to