On Mon, 09 Jan 2006 17:14:53 +0100 Thomas wrote:
TA> IRIX (32-bit) and IRIX64 (64-bit) kernels need different handling 
TA> (nlist() vs. nslist64()), but there doesn't seem to be an existing 
TA> define (we currently assume IRIX64 which doesn't exist) to make this 
TA> decision at compile-time. Even if there was one, a binary compiled for 
TA> the N32 ABI can happily run on both IRIX32 and IRIX64 systems. So why 
TA> not handle this at runtime instead?

I'm a fa of doing as much as possible at compile time. In this particular
case, configure should be able to detect if nlist64 is available, and if so,
it should use it. The only time it matters is when building on 64bit host, and
wanting to run the resulting binary on a 32bit host. I think this is a corner
case that can be handled by documentation in README.irix.


TA> net-snmp already has netsnmp_os_prematch() which seems to allow us to 
TA> handle platform specifics at runtime. Naturally, there's a trade-off 
TA> between flexibility and performance.

The problem I have with this function is that it was based on kernel version,
and assumed that specific functionality was tied with specific kernel
versions. While that might be true for closed source vendors, with open source
kernels it is not uncommon to find stuff backported from a newer kernel to an
older one. This is why I prefer configure tests that check for functionality
over run-time tests against kernel versions.

-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to