darwin.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #include "freebsd4.h"
  2. #define darwin darwin
  3. #define CHECK_RT_FLAGS 1
  4. /*
  5. * udp_inpcb list symbol, e.g. for mibII/udpTable.c
  6. */
  7. #define INP_NEXT_SYMBOL inp_next
  8. /*
  9. * Mac OS X should only use the modern API and definitions.
  10. */
  11. #ifndef NETSNMP_NO_LEGACY_DEFINITIONS
  12. #define NETSNMP_NO_LEGACY_DEFINITIONS 1
  13. #endif
  14. /*
  15. * use new host resources files as well
  16. */
  17. #define NETSNMP_INCLUDE_HOST_RESOURCES
  18. #define NETSNMP_INCLUDE_HRSWINST_REWRITES
  19. #define NETSNMP_INCLUDE_HRSWRUN_REWRITES
  20. #undef NETSNMP_INCLUDE_HRSWRUN_WRITE_SUPPORT
  21. #define NETSNMP_CAN_GET_DISK_LABEL 1
  22. /*
  23. * Enabling this restricts the compiler to mostly public APIs.
  24. */
  25. #ifndef __APPLE_API_STRICT_CONFORMANCE
  26. #define __APPLE_API_STRICT_CONFORMANCE 1
  27. #endif
  28. #ifndef __APPLE_API_UNSTABLE
  29. #define __APPLE_API_UNSTABLE 1
  30. #endif
  31. /*
  32. * Although Darwin does have an fstab.h file, getfsfile etc. always return null
  33. * At least, as of 5.3.
  34. */
  35. #undef HAVE_FSTAB_H
  36. #define SWAPFILE_DIR "/private/var/vm"
  37. #define SWAPFILE_PREFIX "swapfile"
  38. /*
  39. * These apparently used to be in netinet/tcp_timers.h, but went away in
  40. * 10.4.2. Define them here til we find out a way to get the real values.
  41. */
  42. #define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
  43. #define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
  44. /*
  45. * Because Mac OS X is built on Mach, it does not provide a BSD-compatible
  46. * VM statistics API.
  47. */
  48. #define USE_MACH_HOST_STATISTICS 1
  49. /*
  50. * utility macro used in several darwin specific files
  51. */
  52. #define SNMP_CFRelease(x) do { if (x) { CFRelease(x); x = NULL; } } while(0)
  53. /*
  54. * Mac OS X runs on both PPC and Intel hardware,
  55. * which handle udpTable index values differently
  56. */
  57. #include <TargetConditionals.h>
  58. #ifdef TARGET_RT_LITTLE_ENDIAN
  59. #define UDP_ADDRESSES_IN_HOST_ORDER 1
  60. #endif