Use the right header guard.

Believe it or not, clang found this detail with -Wheader-guard.
darwin13 also uses kernel_sysctl
Use vm_region_64 on 64-bit arch; cache memory for longer

This is a port of the Apple patches at
http://www.opensource.apple.com/source/net_snmp/net_snmp-140.1/patches/darwin64.patch
1. Use vm_region_64 instead of vm_region on __ppc64__ or __x86_64__
2. Use 300 second timeout for the cache.

This comment about the code being incredibly expensive is
very true: on a 1.7 GHz i7 with 8 GB of RAM (admittedly a
small machine) it took 17 seconds to calculate and
return HOST-RESOURCES-MIB::hrMemorySize.0.  Most SNMP
clients would give up long before getting this answer.
If sdl_alen is too long for the static buffer, call it incomplete instead of overrunning the buffer
Updates for BFD mibs.
Fix for FreeBSD9 losing mib-modules list because of missing NL in sed input.
Merge branch 'V5-6-patches' into V5-7-patches

* V5-6-patches:
  Updates for BFD mibs.
Merge branch 'V5-7-patches'

* V5-7-patches:
  Fix for FreeBSD9 losing mib-modules list because of missing NL in sed input.
  Updates for BFD mibs.
  If sdl_alen is too long for the static buffer, call it incomplete instead of overrunning the buffer
  Use vm_region_64 on 64-bit arch; cache memory for longer
  darwin13 also uses kernel_sysctl
  Use the right header guard.
Handle duplicates in a binary_array container

The CONTAINER_KEY_ALLOW_DUPLICATES setting is fundamentally flawed;
it really effectively meant "I promise I won't insert duplicates
so don't check at insert time".  However, the ip-forward-mib
sets this flag but relies on the duplicate prevention at insert
time under certain scenarios (e.g., multiple attachments to the
same subnet on MacOS), resulting in a loop in ip-forward-mib
in these scenarios.  So, now it means "check for duplicates at
getnext time" - the binary search will find an arbitrary one
of the entries with the same key, and when we've incremented
we have to check whether or not we've actually incremented past
any duplicates.  This costs an extra key compare per getnext.

If there's a scenario in the future where a MIB implementation
can really guarantee that it isn't inserting duplicates, we
might want to add a "CONTAINER_KEY_I_PROMISE_I_WONT_INSERT_DUPLICATES",
that disables the insertion check but doesn't perform the getnext
check.
Merge branch 'V5-7-patches'

* V5-7-patches:
  Handle duplicates in a binary_array container
Add a scalar object containing the number of processors seen by the agent. Placed this in the systemStats group for lack of an obviously better location. Updated UCD-SNMP-MIB accordingly.

Signed-off-by: Niels Baggesen <nba@users.sourceforge.net>
Merge branch 'V5-7-patches'

* V5-7-patches:
  Add a scalar object containing the number of processors seen by the agent. Placed this in the systemStats group for lack of an obviously better location. Updated UCD-SNMP-MIB accordingly.
Added checks for printing variables with wrong types.

When -OQ command line argument is used, variable formatter preffers the type
of the varible parsed from a MIB file instead of checking type of the variable
as parsed from SNMP message.

This can lead to crashes when incoming packets contains a variable with
NULL type, while the MIB says the variable should be non-NULL, like Integer.
The formatter then tries to interpret the NULL (from packet) as Integer (from
MIB file).
Added test for sprint_realloc_variable with -OQ cmdline argument.
Merge branch 'V5-4-patches' into V5-5-patches

* V5-4-patches:
  Added checks for printing variables with wrong types.
Merge branch 'V5-5-patches' into V5-6-patches

* V5-5-patches:
  Added checks for printing variables with wrong types.
Merge branch 'V5-6-patches' into V5-7-patches

* V5-6-patches:
  Added test for sprint_realloc_variable with -OQ cmdline argument.
  Added checks for printing variables with wrong types.
Merge branch 'V5-7-patches'

* V5-7-patches:
  Added test for sprint_realloc_variable with -OQ cmdline argument.
  Added checks for printing variables with wrong types.

Conflicts:
	snmplib/mib.c
Add a debug message when skipping a key
Merge branch 'V5-7-patches'

* V5-7-patches:
  Add a debug message when skipping a key