Andrew Hood wrote:
Thomas Anders wrote:
I'm seeing the same on Solaris 9 (w/ Sun cc). Looking into
/usr/include/string.h, the strtok_r declaration is nested inside:
#if defined(__EXTENSIONS__) || defined(_REENTRANT) || \
(_POSIX_C_SOURCE - 0 >= 199506L)
extern char *strtok_r(char *, const char *, char **);
#endif /* defined(__EXTENSIONS__) || defined(_REENTRANT) .. */
Adding "-D_REENTRANT" to CFLAGS consequently eliminates the warnings.
You really should not be setting flags starting with _. The correct
solution is to track back how __EXTENSIONS__ got defined and add the
appropriate flag for that. There may be other flags required which just
setting _REENTRANT do not cause to be set.
I have not been advocating anything. I've just been trying to point out
that on Solaris with Sun cc:
- default build machinery does *not* get strtok_r properly declared
- getting one of the above flags defined fixes things
As you said, the question now is how to *properly* (best) fix our build
system. BTW, this problem seems to exist in *all* 5.x lines of net-snmp,
currently, not just 5.0.10rc2.
+Thomas
--
Thomas Anders (thomas.anders at blue-cable.de)
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders