On Thu, 10 Aug 2006 10:46:05 +0200 Thomas wrote: TA> So if we're not picking up someone else's va_copy() magic, what else can TA> we do? Choices: TA> TA> 1) come up with our own va_copy() magic (configure test and replacement) TA> 2) rewrite the patch that introduced va_copy to work without it TA> 3) backout the patch (which fixed a potential crash) TA> 4) do nothing (i.e. building MAIN will continue to fail on a fair number TA> of platforms)
I think 3 and 4 are out. 1 is to system dependent. I think that leaves us with 2. Other possible fixes: A) My semi-tested (in another software package) solution was to just call va_start/va_end in pairs. The Linux man page explicitly says that this behaviour is allowed. The only other os I checked, FreeBSD, didn't explicitly address whether or not this is allows. Some testing is probably warranted. B) always allocate dynamic memory instead of trying to use static buffer C) increase static buffer case to reduce the possibility that dynamic allocation will be needed D) always truncate if static buffer size is exceeded E) use va_copy if available, and one or more of A-D otherwise. If A is portable, I think that's the best option. Otherwise I'd say E, then C+D. fyi: va_start/va_end are from C89, and va_copy was added in C99. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
