  Convienence constants for return values from dyld_get_sdk_version ( ) and friends .
let kDYLD_MACOSX_VERSION_10_4  = 0x000A0400
let kDYLD_MACOSX_VERSION_10_5  = 0x000A0500
let kDYLD_MACOSX_VERSION_10_6  = 0x000A0600
let kDYLD_MACOSX_VERSION_10_7  = 0x000A0700
let kDYLD_MACOSX_VERSION_10_8  = 0x000A0800
let kDYLD_MACOSX_VERSION_10_9  = 0x000A0900
let kDYLD_MACOSX_VERSION_10_10 = 0x000A0A00
let kDYLD_MACOSX_VERSION_10_11 = 0x000A0B00

let kDYLD_IOS_VERSION_2_0 =  0x00020000
let kDYLD_IOS_VERSION_2_1 =  0x00020100
let kDYLD_IOS_VERSION_2_2 =  0x00020200
let kDYLD_IOS_VERSION_3_0 =  0x00030000
let kDYLD_IOS_VERSION_3_1 =  0x00030100
let kDYLD_IOS_VERSION_3_2 =  0x00030200
let kDYLD_IOS_VERSION_4_0 =  0x00040000
let kDYLD_IOS_VERSION_4_1 =  0x00040100
let kDYLD_IOS_VERSION_4_2 =  0x00040200
let kDYLD_IOS_VERSION_4_3 =  0x00040300
let kDYLD_IOS_VERSION_5_0 =  0x00050000
let kDYLD_IOS_VERSION_5_1 =  0x00050100
let kDYLD_IOS_VERSION_6_0 =  0x00060000
let kDYLD_IOS_VERSION_6_1 =  0x00060100
let kDYLD_IOS_VERSION_7_0 =  0x00070000
let kDYLD_IOS_VERSION_7_1 =  0x00070100
let kDYLD_IOS_VERSION_8_0 =  0x00080000
let kDYLD_IOS_VERSION_9_0 =  0x00090000

let osx_version_to_string version = 
  match version with
  | 0x000A0400 -> "DYLD_MACOSX_VERSION_10_4"
  | 0x000A0500 -> "DYLD_MACOSX_VERSION_10_5"
  | 0x000A0600 -> "DYLD_MACOSX_VERSION_10_6"
  | 0x000A0700 -> "DYLD_MACOSX_VERSION_10_7"
  | 0x000A0800 -> "DYLD_MACOSX_VERSION_10_8"
  | 0x000A0900 -> "DYLD_MACOSX_VERSION_10_9"
  | 0x000A0A00 -> "DYLD_MACOSX_VERSION_10_10"
  | 0x000A0B00 -> "DYLD_MACOSX_VERSION_10_11"
  | _ -> "UNKNOWN OSX VERSION"

let ios_version_to_string version =
  match version with
  | 0x00020000 -> "DYLD_IOS_VERSION_2_0"
  | 0x00020100 -> "DYLD_IOS_VERSION_2_1"
  | 0x00020200 -> "DYLD_IOS_VERSION_2_2"
  | 0x00030000 -> "DYLD_IOS_VERSION_3_0"
  | 0x00030100 -> "DYLD_IOS_VERSION_3_1"
  | 0x00030200 -> "DYLD_IOS_VERSION_3_2"
  | 0x00040000 -> "DYLD_IOS_VERSION_4_0"
  | 0x00040100 -> "DYLD_IOS_VERSION_4_1"
  | 0x00040200 -> "DYLD_IOS_VERSION_4_2"
  | 0x00040300 -> "DYLD_IOS_VERSION_4_3"
  | 0x00050000 -> "DYLD_IOS_VERSION_5_0"
  | 0x00050100 -> "DYLD_IOS_VERSION_5_1"
  | 0x00060000 -> "DYLD_IOS_VERSION_6_0"
  | 0x00060100 -> "DYLD_IOS_VERSION_6_1"
  | 0x00070000 -> "DYLD_IOS_VERSION_7_0"
  | 0x00070100 -> "DYLD_IOS_VERSION_7_1"
  | 0x00080000 -> "DYLD_IOS_VERSION_8_0"
  | 0x00090000 -> "DYLD_IOS_VERSION_9_0"
  | _ -> "UNKNOWN IOS VERSION"

  LC_VERSION_MIN_MACOSX or LC_VERSION_MIN_IPHONEOS
let version_to_string version = 
  match version with
  osx
  | 0x000A0400 -> "OSX 10.4"
  | 0x000A0500 -> "OSX 10.5"
  | 0x000A0600 -> "OSX 10.6"
  | 0x000A0700 -> "OSX 10.7"
  | 0x000A0800 -> "OSX 10.8"
  | 0x000A0900 -> "OSX 10.9"
  | 0x000A0A00 -> "OSX 10.10"
  | 0x000A0B00 -> "OSX 10.11"
  (* ios ... because numbers (smartly) don't conflict *)
  | 0x00020000 -> "iOS 2.0"
  | 0x00020100 -> "iOS 2.1"
  | 0x00020200 -> "iOS 2.2"
  | 0x00030000 -> "iOS 3.0"
  | 0x00030100 -> "iOS 3.1"
  | 0x00030200 -> "iOS 3.2"
  | 0x00040000 -> "iOS 4.0"
  | 0x00040100 -> "iOS 4.1"
  | 0x00040200 -> "iOS 4.2"
  | 0x00040300 -> "iOS 4.3"
  | 0x00050000 -> "iOS 5.0"
  | 0x00050100 -> "iOS 5.1"
  | 0x00060000 -> "iOS 6.0"
  | 0x00060100 -> "iOS 6.1"
  | 0x00070000 -> "iOS 7.0"
  | 0x00070100 -> "iOS 7.1"
  | 0x00080000 -> "iOS 8.0"
  | 0x00090000 -> "iOS 9.0"
  | _ -> "UNKNOWN VERSION"

 ios ... because numbers (smartly) don't conflict 
  Convienence constants for return values from dyld_get_sdk_version ( ) and friends .
let kDYLD_MACOSX_VERSION_10_4  = 0x000A0400
let kDYLD_MACOSX_VERSION_10_5  = 0x000A0500
let kDYLD_MACOSX_VERSION_10_6  = 0x000A0600
let kDYLD_MACOSX_VERSION_10_7  = 0x000A0700
let kDYLD_MACOSX_VERSION_10_8  = 0x000A0800
let kDYLD_MACOSX_VERSION_10_9  = 0x000A0900
let kDYLD_MACOSX_VERSION_10_10 = 0x000A0A00
let kDYLD_MACOSX_VERSION_10_11 = 0x000A0B00

let kDYLD_IOS_VERSION_2_0 =  0x00020000
let kDYLD_IOS_VERSION_2_1 =  0x00020100
let kDYLD_IOS_VERSION_2_2 =  0x00020200
let kDYLD_IOS_VERSION_3_0 =  0x00030000
let kDYLD_IOS_VERSION_3_1 =  0x00030100
let kDYLD_IOS_VERSION_3_2 =  0x00030200
let kDYLD_IOS_VERSION_4_0 =  0x00040000
let kDYLD_IOS_VERSION_4_1 =  0x00040100
let kDYLD_IOS_VERSION_4_2 =  0x00040200
let kDYLD_IOS_VERSION_4_3 =  0x00040300
let kDYLD_IOS_VERSION_5_0 =  0x00050000
let kDYLD_IOS_VERSION_5_1 =  0x00050100
let kDYLD_IOS_VERSION_6_0 =  0x00060000
let kDYLD_IOS_VERSION_6_1 =  0x00060100
let kDYLD_IOS_VERSION_7_0 =  0x00070000
let kDYLD_IOS_VERSION_7_1 =  0x00070100
let kDYLD_IOS_VERSION_8_0 =  0x00080000
let kDYLD_IOS_VERSION_9_0 =  0x00090000

let osx_version_to_string version = 
  match version with
  | 0x000A0400 -> "DYLD_MACOSX_VERSION_10_4"
  | 0x000A0500 -> "DYLD_MACOSX_VERSION_10_5"
  | 0x000A0600 -> "DYLD_MACOSX_VERSION_10_6"
  | 0x000A0700 -> "DYLD_MACOSX_VERSION_10_7"
  | 0x000A0800 -> "DYLD_MACOSX_VERSION_10_8"
  | 0x000A0900 -> "DYLD_MACOSX_VERSION_10_9"
  | 0x000A0A00 -> "DYLD_MACOSX_VERSION_10_10"
  | 0x000A0B00 -> "DYLD_MACOSX_VERSION_10_11"
  | _ -> "UNKNOWN OSX VERSION"

let ios_version_to_string version =
  match version with
  | 0x00020000 -> "DYLD_IOS_VERSION_2_0"
  | 0x00020100 -> "DYLD_IOS_VERSION_2_1"
  | 0x00020200 -> "DYLD_IOS_VERSION_2_2"
  | 0x00030000 -> "DYLD_IOS_VERSION_3_0"
  | 0x00030100 -> "DYLD_IOS_VERSION_3_1"
  | 0x00030200 -> "DYLD_IOS_VERSION_3_2"
  | 0x00040000 -> "DYLD_IOS_VERSION_4_0"
  | 0x00040100 -> "DYLD_IOS_VERSION_4_1"
  | 0x00040200 -> "DYLD_IOS_VERSION_4_2"
  | 0x00040300 -> "DYLD_IOS_VERSION_4_3"
  | 0x00050000 -> "DYLD_IOS_VERSION_5_0"
  | 0x00050100 -> "DYLD_IOS_VERSION_5_1"
  | 0x00060000 -> "DYLD_IOS_VERSION_6_0"
  | 0x00060100 -> "DYLD_IOS_VERSION_6_1"
  | 0x00070000 -> "DYLD_IOS_VERSION_7_0"
  | 0x00070100 -> "DYLD_IOS_VERSION_7_1"
  | 0x00080000 -> "DYLD_IOS_VERSION_8_0"
  | 0x00090000 -> "DYLD_IOS_VERSION_9_0"
  | _ -> "UNKNOWN IOS VERSION"

  LC_VERSION_MIN_MACOSX or LC_VERSION_MIN_IPHONEOS
let version_to_string version = 
  match version with
  osx
  | 0x000A0400 -> "OSX 10.4"
  | 0x000A0500 -> "OSX 10.5"
  | 0x000A0600 -> "OSX 10.6"
  | 0x000A0700 -> "OSX 10.7"
  | 0x000A0800 -> "OSX 10.8"
  | 0x000A0900 -> "OSX 10.9"
  | 0x000A0A00 -> "OSX 10.10"
  | 0x000A0B00 -> "OSX 10.11"
  | 0x00020000 -> "iOS 2.0"
  | 0x00020100 -> "iOS 2.1"
  | 0x00020200 -> "iOS 2.2"
  | 0x00030000 -> "iOS 3.0"
  | 0x00030100 -> "iOS 3.1"
  | 0x00030200 -> "iOS 3.2"
  | 0x00040000 -> "iOS 4.0"
  | 0x00040100 -> "iOS 4.1"
  | 0x00040200 -> "iOS 4.2"
  | 0x00040300 -> "iOS 4.3"
  | 0x00050000 -> "iOS 5.0"
  | 0x00050100 -> "iOS 5.1"
  | 0x00060000 -> "iOS 6.0"
  | 0x00060100 -> "iOS 6.1"
  | 0x00070000 -> "iOS 7.0"
  | 0x00070100 -> "iOS 7.1"
  | 0x00080000 -> "iOS 8.0"
  | 0x00090000 -> "iOS 9.0"
  | _ -> "UNKNOWN VERSION"
