ffi 1.9.18 → 1.9.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +22 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +52 -0
  5. data/.yardopts +5 -0
  6. data/Gemfile +15 -0
  7. data/{spec/ffi/LICENSE.SPECS → LICENSE.SPECS} +1 -1
  8. data/README.md +3 -4
  9. data/Rakefile +41 -5
  10. data/appveyor.yml +22 -0
  11. data/ext/ffi_c/AbstractMemory.c +6 -1
  12. data/ext/ffi_c/Call.c +1 -22
  13. data/ext/ffi_c/Call.h +0 -9
  14. data/ext/ffi_c/Closure.c +54 -0
  15. data/ext/ffi_c/{ClosurePool.h → Closure.h} +13 -23
  16. data/ext/ffi_c/Function.c +16 -25
  17. data/ext/ffi_c/Function.h +1 -2
  18. data/ext/ffi_c/FunctionInfo.c +0 -4
  19. data/ext/ffi_c/MethodHandle.c +33 -268
  20. data/ext/ffi_c/Platform.c +10 -2
  21. data/ext/ffi_c/extconf.rb +10 -5
  22. data/ext/ffi_c/ffi.c +2 -2
  23. data/ext/ffi_c/libffi/.appveyor.yml +48 -0
  24. data/ext/ffi_c/libffi/.gitignore +36 -0
  25. data/ext/ffi_c/libffi/.travis/install.sh +14 -0
  26. data/ext/ffi_c/libffi/.travis.yml +30 -0
  27. data/ext/ffi_c/libffi/ChangeLog.libffi +2 -2
  28. data/ext/ffi_c/libffi/{ChangeLog → ChangeLog.libffi-3.1} +1402 -2
  29. data/ext/ffi_c/libffi/ChangeLog.v1 +1 -1
  30. data/ext/ffi_c/libffi/LICENSE +1 -1
  31. data/ext/ffi_c/libffi/Makefile.am +169 -158
  32. data/ext/ffi_c/libffi/Makefile.in +927 -938
  33. data/ext/ffi_c/libffi/README +164 -52
  34. data/ext/ffi_c/libffi/acinclude.m4 +387 -0
  35. data/ext/ffi_c/libffi/autogen.sh +2 -0
  36. data/ext/ffi_c/libffi/config.guess +336 -371
  37. data/ext/ffi_c/libffi/config.sub +246 -115
  38. data/ext/ffi_c/libffi/configure +6976 -2189
  39. data/ext/ffi_c/libffi/configure.ac +148 -256
  40. data/ext/ffi_c/libffi/configure.host +277 -4
  41. data/ext/ffi_c/libffi/doc/Makefile.am +3 -0
  42. data/ext/ffi_c/libffi/doc/Makefile.in +811 -0
  43. data/ext/ffi_c/libffi/doc/libffi.texi +430 -45
  44. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  45. data/ext/ffi_c/libffi/fficonfig.h.in +24 -13
  46. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +203 -0
  47. data/ext/ffi_c/libffi/include/Makefile.am +3 -3
  48. data/ext/ffi_c/libffi/include/Makefile.in +188 -71
  49. data/ext/ffi_c/libffi/include/ffi.h.in +112 -50
  50. data/ext/ffi_c/libffi/include/ffi_cfi.h +55 -0
  51. data/ext/ffi_c/libffi/include/ffi_common.h +32 -11
  52. data/ext/ffi_c/libffi/install-sh +190 -202
  53. data/ext/ffi_c/libffi/libffi.map.in +80 -0
  54. data/ext/ffi_c/libffi/libffi.pc.in +3 -2
  55. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +1043 -0
  56. data/ext/ffi_c/libffi/libtool-ldflags +106 -0
  57. data/ext/ffi_c/libffi/libtool-version +1 -1
  58. data/ext/ffi_c/libffi/ltmain.sh +3553 -2033
  59. data/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
  60. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +69 -0
  61. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +13 -8
  62. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +31 -104
  63. data/ext/ffi_c/libffi/m4/{ax_check_compiler_flags.m4 → ax_check_compile_flag.m4} +30 -34
  64. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +32 -11
  65. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +6 -5
  66. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +31 -21
  67. data/ext/ffi_c/libffi/man/Makefile.am +2 -2
  68. data/ext/ffi_c/libffi/man/Makefile.in +141 -49
  69. data/ext/ffi_c/libffi/man/ffi.3 +10 -0
  70. data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +6 -4
  71. data/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
  72. data/ext/ffi_c/libffi/missing +150 -311
  73. data/ext/ffi_c/libffi/msvcc.sh +72 -9
  74. data/ext/ffi_c/libffi/src/aarch64/ffi.c +964 -0
  75. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +81 -0
  76. data/ext/ffi_c/libffi/src/aarch64/internal.h +67 -0
  77. data/ext/ffi_c/libffi/src/aarch64/sysv.S +438 -0
  78. data/ext/ffi_c/libffi/src/alpha/ffi.c +335 -98
  79. data/ext/ffi_c/libffi/src/alpha/ffitarget.h +10 -1
  80. data/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
  81. data/ext/ffi_c/libffi/src/alpha/osf.S +161 -266
  82. data/ext/ffi_c/libffi/src/arc/arcompact.S +135 -0
  83. data/ext/ffi_c/libffi/src/arc/ffi.c +266 -0
  84. data/ext/ffi_c/libffi/src/arc/ffitarget.h +53 -0
  85. data/ext/ffi_c/libffi/src/arm/ffi.c +608 -517
  86. data/ext/ffi_c/libffi/src/arm/ffitarget.h +24 -7
  87. data/ext/ffi_c/libffi/src/arm/internal.h +7 -0
  88. data/ext/ffi_c/libffi/src/arm/sysv.S +303 -417
  89. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +6 -1
  90. data/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
  91. data/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
  92. data/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
  93. data/ext/ffi_c/libffi/src/closures.c +366 -45
  94. data/ext/ffi_c/libffi/src/cris/ffi.c +10 -7
  95. data/ext/ffi_c/libffi/src/cris/ffitarget.h +6 -1
  96. data/ext/ffi_c/libffi/src/debug.c +6 -1
  97. data/ext/ffi_c/libffi/src/dlmalloc.c +16 -11
  98. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  99. data/ext/ffi_c/libffi/src/frv/ffitarget.h +6 -1
  100. data/ext/ffi_c/libffi/src/ia64/ffi.c +11 -7
  101. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +6 -1
  102. data/ext/ffi_c/libffi/src/ia64/unix.S +2 -0
  103. data/ext/ffi_c/libffi/src/java_raw_api.c +23 -5
  104. data/ext/ffi_c/libffi/src/m32r/ffi.c +1 -1
  105. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +6 -1
  106. data/ext/ffi_c/libffi/src/m68k/ffi.c +87 -13
  107. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +6 -1
  108. data/ext/ffi_c/libffi/src/m68k/sysv.S +119 -32
  109. data/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
  110. data/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
  111. data/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
  112. data/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
  113. data/ext/ffi_c/libffi/{fficonfig.hw → src/metag/ffitarget.h} +22 -26
  114. data/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
  115. data/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
  116. data/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
  117. data/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
  118. data/ext/ffi_c/libffi/src/mips/ffi.c +103 -28
  119. data/ext/ffi_c/libffi/src/mips/ffitarget.h +10 -3
  120. data/ext/ffi_c/libffi/src/mips/n32.S +128 -56
  121. data/ext/ffi_c/libffi/src/mips/o32.S +148 -27
  122. data/ext/ffi_c/libffi/src/moxie/eabi.S +55 -82
  123. data/ext/ffi_c/libffi/src/moxie/ffi.c +40 -44
  124. data/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
  125. data/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
  126. data/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
  127. data/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
  128. data/ext/ffi_c/libffi/src/or1k/ffi.c +328 -0
  129. data/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
  130. data/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
  131. data/ext/ffi_c/libffi/src/pa/ffitarget.h +8 -1
  132. data/ext/ffi_c/libffi/src/powerpc/aix.S +245 -7
  133. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +253 -4
  134. data/ext/ffi_c/libffi/src/powerpc/asm.h +2 -2
  135. data/ext/ffi_c/libffi/src/powerpc/darwin.S +2 -7
  136. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +22 -26
  137. data/ext/ffi_c/libffi/src/powerpc/ffi.c +103 -1378
  138. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +111 -30
  139. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +945 -0
  140. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +94 -0
  141. data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
  142. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +103 -44
  143. data/ext/ffi_c/libffi/src/powerpc/linux64.S +100 -59
  144. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +360 -108
  145. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +138 -68
  146. data/ext/ffi_c/libffi/src/powerpc/sysv.S +68 -112
  147. data/ext/ffi_c/libffi/src/prep_cif.c +108 -24
  148. data/ext/ffi_c/libffi/src/raw_api.c +18 -5
  149. data/ext/ffi_c/libffi/src/s390/ffi.c +294 -318
  150. data/ext/ffi_c/libffi/src/s390/ffitarget.h +9 -1
  151. data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  152. data/ext/ffi_c/libffi/src/s390/sysv.S +257 -366
  153. data/ext/ffi_c/libffi/src/sh/ffi.c +4 -3
  154. data/ext/ffi_c/libffi/src/sh/ffitarget.h +6 -1
  155. data/ext/ffi_c/libffi/src/sh64/ffi.c +3 -2
  156. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +6 -1
  157. data/ext/ffi_c/libffi/src/sparc/ffi.c +326 -527
  158. data/ext/ffi_c/libffi/src/sparc/ffi64.c +608 -0
  159. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +20 -7
  160. data/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
  161. data/ext/ffi_c/libffi/src/sparc/v8.S +364 -234
  162. data/ext/ffi_c/libffi/src/sparc/v9.S +340 -207
  163. data/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
  164. data/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
  165. data/ext/ffi_c/libffi/src/tile/tile.S +360 -0
  166. data/ext/ffi_c/libffi/src/types.c +43 -14
  167. data/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
  168. data/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
  169. data/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
  170. data/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
  171. data/ext/ffi_c/libffi/src/x86/ffi.c +591 -500
  172. data/ext/ffi_c/libffi/src/x86/ffi64.c +359 -116
  173. data/ext/ffi_c/libffi/src/x86/ffitarget.h +55 -35
  174. data/ext/ffi_c/libffi/src/x86/ffiw64.c +287 -0
  175. data/ext/ffi_c/libffi/src/x86/internal.h +29 -0
  176. data/ext/ffi_c/libffi/src/x86/internal64.h +22 -0
  177. data/ext/ffi_c/libffi/src/x86/sysv.S +975 -400
  178. data/ext/ffi_c/libffi/src/x86/unix64.S +398 -299
  179. data/ext/ffi_c/libffi/src/x86/win64.S +222 -458
  180. data/ext/ffi_c/libffi/src/x86/win64_intel.S +237 -0
  181. data/ext/ffi_c/libffi/src/xtensa/ffi.c +298 -0
  182. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +53 -0
  183. data/ext/ffi_c/libffi/src/xtensa/sysv.S +253 -0
  184. data/ext/ffi_c/libffi/stamp-h.in +1 -0
  185. data/ext/ffi_c/libffi/testsuite/Makefile.am +79 -73
  186. data/ext/ffi_c/libffi/testsuite/Makefile.in +219 -111
  187. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +121 -25
  188. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +21 -1
  189. data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
  190. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +4 -6
  191. data/ext/ffi_c/libffi/testsuite/libffi.call/{closure_stdcall.c → closure_simple.c} +7 -16
  192. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +4 -4
  193. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +4 -4
  194. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +4 -4
  195. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +4 -4
  196. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +4 -4
  197. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +4 -4
  198. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +4 -4
  199. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +5 -5
  200. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +4 -4
  201. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +4 -4
  202. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +4 -4
  203. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +4 -4
  204. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3float.c +95 -0
  205. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +4 -4
  206. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +4 -4
  207. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +4 -4
  208. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +4 -4
  209. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +5 -5
  210. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +4 -4
  211. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +4 -4
  212. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +4 -4
  213. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +4 -4
  214. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +4 -4
  215. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +4 -4
  216. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +4 -4
  217. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +4 -4
  218. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +4 -4
  219. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +4 -4
  220. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +4 -6
  221. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +4 -6
  222. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +4 -4
  223. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +4 -4
  224. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +4 -4
  225. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +4 -4
  226. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +4 -4
  227. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +4 -4
  228. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +4 -4
  229. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +4 -4
  230. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +10 -9
  231. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +3 -3
  232. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +10 -9
  233. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_args.c +70 -0
  234. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_float_double.c +55 -0
  235. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +1 -1
  236. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +11 -9
  237. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_struct_va1.c +114 -0
  238. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar_va.c +44 -0
  239. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint_va.c +45 -0
  240. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulong_va.c +45 -0
  241. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +5 -5
  242. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort_va.c +44 -0
  243. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -2
  244. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +23 -40
  245. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +3 -1
  246. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +6 -4
  247. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +4 -2
  248. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +107 -0
  249. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +18 -19
  250. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +6 -16
  251. data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
  252. data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
  253. data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
  254. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -1
  255. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +6 -6
  256. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +8 -8
  257. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +6 -6
  258. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct11.c +121 -0
  259. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +5 -5
  260. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +5 -5
  261. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +5 -5
  262. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +5 -5
  263. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +6 -6
  264. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +5 -5
  265. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +6 -6
  266. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +6 -6
  267. data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
  268. data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
  269. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +1 -0
  270. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  271. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +1 -1
  272. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +1 -1
  273. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +7 -7
  274. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +7 -7
  275. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +5 -5
  276. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +5 -5
  277. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +2 -2
  278. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
  279. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
  280. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
  281. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +9 -7
  282. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +7 -7
  283. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +7 -6
  284. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +9 -8
  285. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +9 -8
  286. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +9 -9
  287. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +9 -9
  288. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +9 -8
  289. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +9 -8
  290. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +2 -2
  291. data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
  292. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest.cc +3 -10
  293. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest_ffi_call.cc +2 -1
  294. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +196 -0
  295. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +121 -0
  296. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +123 -0
  297. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +125 -0
  298. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
  299. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
  301. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
  302. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
  303. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
  304. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
  305. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
  306. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
  307. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
  308. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
  309. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
  310. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
  311. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
  312. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
  313. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
  314. data/ext/ffi_c/libffi/testsuite/{libffi.special/special.exp → libffi.complex/complex.exp} +9 -8
  315. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
  316. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
  317. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
  318. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
  319. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
  320. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
  321. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
  322. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
  323. data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
  324. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
  325. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
  326. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
  327. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
  328. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
  329. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
  330. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
  331. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
  332. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
  333. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
  334. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
  335. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
  336. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
  337. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
  338. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
  339. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
  340. data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
  341. data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
  342. data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
  343. data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
  344. data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
  345. data/ext/ffi_c/libffi.bsd.mk +11 -5
  346. data/ext/ffi_c/libffi.darwin.mk +14 -4
  347. data/ext/ffi_c/libffi.gnu.mk +3 -2
  348. data/ext/ffi_c/libffi.mk +10 -5
  349. data/ext/ffi_c/libffi.vc.mk +1 -1
  350. data/ext/ffi_c/libffi.vc64.mk +1 -1
  351. data/ffi.gemspec +16 -3
  352. data/lib/ffi/enum.rb +124 -0
  353. data/lib/ffi/library.rb +66 -14
  354. data/lib/ffi/platform/sparc64-linux/types.conf +102 -0
  355. data/lib/ffi/platform/x86_64-windows/types.conf +113 -20
  356. data/lib/ffi/platform.rb +7 -2
  357. data/lib/ffi/pointer.rb +1 -0
  358. data/lib/ffi/struct.rb +0 -2
  359. data/lib/ffi/version.rb +1 -2
  360. data/samples/getlogin.rb +8 -0
  361. data/samples/getpid.rb +8 -0
  362. data/samples/gettimeofday.rb +18 -0
  363. data/samples/hello.rb +7 -0
  364. data/samples/inotify.rb +60 -0
  365. data/samples/pty.rb +76 -0
  366. data/samples/qsort.rb +21 -0
  367. data/samples/sample_helper.rb +6 -0
  368. metadata +164 -115
  369. data/ext/ffi_c/ClosurePool.c +0 -283
  370. data/ext/ffi_c/libffi/Makefile.vc +0 -141
  371. data/ext/ffi_c/libffi/Makefile.vc64 +0 -141
  372. data/ext/ffi_c/libffi/aclocal.m4 +0 -1873
  373. data/ext/ffi_c/libffi/build-ios.sh +0 -67
  374. data/ext/ffi_c/libffi/compile +0 -143
  375. data/ext/ffi_c/libffi/depcomp +0 -630
  376. data/ext/ffi_c/libffi/doc/libffi.info +0 -593
  377. data/ext/ffi_c/libffi/doc/stamp-vti +0 -4
  378. data/ext/ffi_c/libffi/include/ffi.h.vc +0 -427
  379. data/ext/ffi_c/libffi/include/ffi.h.vc64 +0 -427
  380. data/ext/ffi_c/libffi/m4/libtool.m4 +0 -7831
  381. data/ext/ffi_c/libffi/m4/ltoptions.m4 +0 -369
  382. data/ext/ffi_c/libffi/m4/ltsugar.m4 +0 -123
  383. data/ext/ffi_c/libffi/m4/ltversion.m4 +0 -23
  384. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +0 -98
  385. data/ext/ffi_c/libffi/mdate-sh +0 -201
  386. data/ext/ffi_c/libffi/src/arm/gentramp.sh +0 -118
  387. data/ext/ffi_c/libffi/src/arm/trampoline.S +0 -4450
  388. data/ext/ffi_c/libffi/src/x86/darwin.S +0 -444
  389. data/ext/ffi_c/libffi/src/x86/darwin64.S +0 -416
  390. data/ext/ffi_c/libffi/src/x86/freebsd.S +0 -458
  391. data/ext/ffi_c/libffi/src/x86/win32.S +0 -1065
  392. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +0 -300
  393. data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +0 -63
  394. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +0 -44
  395. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +0 -96
  396. data/ext/ffi_c/libffi/texinfo.tex +0 -7210
  397. data/gen/Rakefile +0 -30
  398. data/libtest/Benchmark.c +0 -52
  399. data/libtest/BoolTest.c +0 -34
  400. data/libtest/BufferTest.c +0 -31
  401. data/libtest/ClosureTest.c +0 -205
  402. data/libtest/EnumTest.c +0 -51
  403. data/libtest/FunctionTest.c +0 -70
  404. data/libtest/GNUmakefile +0 -149
  405. data/libtest/GlobalVariable.c +0 -62
  406. data/libtest/LastErrorTest.c +0 -21
  407. data/libtest/NumberTest.c +0 -132
  408. data/libtest/PointerTest.c +0 -63
  409. data/libtest/ReferenceTest.c +0 -23
  410. data/libtest/StringTest.c +0 -34
  411. data/libtest/StructTest.c +0 -243
  412. data/libtest/UnionTest.c +0 -43
  413. data/libtest/VariadicTest.c +0 -99
  414. data/spec/ffi/async_callback_spec.rb +0 -35
  415. data/spec/ffi/bool_spec.rb +0 -32
  416. data/spec/ffi/buffer_spec.rb +0 -279
  417. data/spec/ffi/callback_spec.rb +0 -773
  418. data/spec/ffi/custom_param_type.rb +0 -37
  419. data/spec/ffi/custom_type_spec.rb +0 -74
  420. data/spec/ffi/dup_spec.rb +0 -52
  421. data/spec/ffi/enum_spec.rb +0 -423
  422. data/spec/ffi/errno_spec.rb +0 -20
  423. data/spec/ffi/ffi_spec.rb +0 -28
  424. data/spec/ffi/fixtures/Benchmark.c +0 -52
  425. data/spec/ffi/fixtures/BoolTest.c +0 -34
  426. data/spec/ffi/fixtures/BufferTest.c +0 -31
  427. data/spec/ffi/fixtures/ClosureTest.c +0 -205
  428. data/spec/ffi/fixtures/EnumTest.c +0 -51
  429. data/spec/ffi/fixtures/FunctionTest.c +0 -142
  430. data/spec/ffi/fixtures/GNUmakefile +0 -149
  431. data/spec/ffi/fixtures/GlobalVariable.c +0 -62
  432. data/spec/ffi/fixtures/LastErrorTest.c +0 -21
  433. data/spec/ffi/fixtures/NumberTest.c +0 -132
  434. data/spec/ffi/fixtures/PipeHelper.h +0 -21
  435. data/spec/ffi/fixtures/PipeHelperPosix.c +0 -41
  436. data/spec/ffi/fixtures/PipeHelperWindows.c +0 -72
  437. data/spec/ffi/fixtures/PointerTest.c +0 -63
  438. data/spec/ffi/fixtures/ReferenceTest.c +0 -23
  439. data/spec/ffi/fixtures/StringTest.c +0 -34
  440. data/spec/ffi/fixtures/StructTest.c +0 -243
  441. data/spec/ffi/fixtures/UnionTest.c +0 -43
  442. data/spec/ffi/fixtures/VariadicTest.c +0 -99
  443. data/spec/ffi/fixtures/classes.rb +0 -438
  444. data/spec/ffi/function_spec.rb +0 -97
  445. data/spec/ffi/io_spec.rb +0 -16
  446. data/spec/ffi/library_spec.rb +0 -286
  447. data/spec/ffi/long_double.rb +0 -30
  448. data/spec/ffi/managed_struct_spec.rb +0 -68
  449. data/spec/ffi/memorypointer_spec.rb +0 -78
  450. data/spec/ffi/number_spec.rb +0 -247
  451. data/spec/ffi/platform_spec.rb +0 -114
  452. data/spec/ffi/pointer_spec.rb +0 -285
  453. data/spec/ffi/rbx/attach_function_spec.rb +0 -34
  454. data/spec/ffi/rbx/memory_pointer_spec.rb +0 -194
  455. data/spec/ffi/rbx/spec_helper.rb +0 -6
  456. data/spec/ffi/rbx/struct_spec.rb +0 -18
  457. data/spec/ffi/spec_helper.rb +0 -93
  458. data/spec/ffi/string_spec.rb +0 -118
  459. data/spec/ffi/strptr_spec.rb +0 -50
  460. data/spec/ffi/struct_by_ref_spec.rb +0 -43
  461. data/spec/ffi/struct_callback_spec.rb +0 -69
  462. data/spec/ffi/struct_initialize_spec.rb +0 -35
  463. data/spec/ffi/struct_packed_spec.rb +0 -50
  464. data/spec/ffi/struct_spec.rb +0 -886
  465. data/spec/ffi/typedef_spec.rb +0 -91
  466. data/spec/ffi/union_spec.rb +0 -67
  467. data/spec/ffi/variadic_spec.rb +0 -132
  468. data/spec/spec.opts +0 -4
@@ -1,14 +1,12 @@
1
1
  #! /bin/sh
2
2
  # Attempt to guess a canonical system name.
3
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
- # Free Software Foundation, Inc.
3
+ # Copyright 1992-2017 Free Software Foundation, Inc.
6
4
 
7
- timestamp='2009-11-20'
5
+ timestamp='2017-05-11'
8
6
 
9
7
  # This file is free software; you can redistribute it and/or modify it
10
8
  # under the terms of the GNU General Public License as published by
11
- # the Free Software Foundation; either version 2 of the License, or
9
+ # the Free Software Foundation; either version 3 of the License, or
12
10
  # (at your option) any later version.
13
11
  #
14
12
  # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2009-11-20'
17
15
  # General Public License for more details.
18
16
  #
19
17
  # You should have received a copy of the GNU General Public License
20
- # along with this program; if not, write to the Free Software
21
- # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
- # 02110-1301, USA.
18
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
23
19
  #
24
20
  # As a special exception to the GNU General Public License, if you
25
21
  # distribute this file as part of a program that contains a
26
22
  # configuration script generated by Autoconf, you may include it under
27
- # the same distribution terms that you use for the rest of that program.
28
-
29
-
30
- # Originally written by Per Bothner. Please send patches (context
31
- # diff format) to <config-patches@gnu.org> and include a ChangeLog
32
- # entry.
23
+ # the same distribution terms that you use for the rest of that
24
+ # program. This Exception is an additional permission under section 7
25
+ # of the GNU General Public License, version 3 ("GPLv3").
33
26
  #
34
- # This script attempts to guess a canonical system name similar to
35
- # config.sub. If it succeeds, it prints the system name on stdout, and
36
- # exits with 0. Otherwise, it exits with 1.
27
+ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
37
28
  #
38
29
  # You can get the latest version of this script from:
39
- # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30
+ # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31
+ #
32
+ # Please send patches to <config-patches@gnu.org>.
33
+
40
34
 
41
35
  me=`echo "$0" | sed -e 's,.*/,,'`
42
36
 
@@ -56,8 +50,7 @@ version="\
56
50
  GNU config.guess ($timestamp)
57
51
 
58
52
  Originally written by Per Bothner.
59
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
- 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
53
+ Copyright 1992-2017 Free Software Foundation, Inc.
61
54
 
62
55
  This is free software; see the source for copying conditions. There is NO
63
56
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139
132
  UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140
133
  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
134
 
135
+ case "${UNAME_SYSTEM}" in
136
+ Linux|GNU|GNU/*)
137
+ # If the system lacks a compiler, then just pick glibc.
138
+ # We could probably try harder.
139
+ LIBC=gnu
140
+
141
+ eval $set_cc_for_build
142
+ cat <<-EOF > $dummy.c
143
+ #include <features.h>
144
+ #if defined(__UCLIBC__)
145
+ LIBC=uclibc
146
+ #elif defined(__dietlibc__)
147
+ LIBC=dietlibc
148
+ #else
149
+ LIBC=gnu
150
+ #endif
151
+ EOF
152
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153
+ ;;
154
+ esac
155
+
142
156
  # Note: order is significant - the case branches are not exclusive.
143
157
 
144
158
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145
159
  *:NetBSD:*:*)
146
160
  # NetBSD (nbsd) targets should (where applicable) match one or
147
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
161
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148
162
  # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149
163
  # switched to ELF, *-*-netbsd* would select the old
150
164
  # object file format. This provides both forward
@@ -154,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
154
168
  # Note: NetBSD doesn't particularly care about the vendor
155
169
  # portion of the name. We always set it to "unknown".
156
170
  sysctl="sysctl -n hw.machine_arch"
157
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
171
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
172
+ /sbin/$sysctl 2>/dev/null || \
173
+ /usr/sbin/$sysctl 2>/dev/null || \
174
+ echo unknown)`
159
175
  case "${UNAME_MACHINE_ARCH}" in
160
176
  armeb) machine=armeb-unknown ;;
161
177
  arm*) machine=arm-unknown ;;
162
178
  sh3el) machine=shl-unknown ;;
163
179
  sh3eb) machine=sh-unknown ;;
164
180
  sh5el) machine=sh5le-unknown ;;
181
+ earmv*)
182
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184
+ machine=${arch}${endian}-unknown
185
+ ;;
165
186
  *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166
187
  esac
167
188
  # The Operating System including object format, if it has switched
168
- # to ELF recently, or will in the future.
189
+ # to ELF recently (or will in the future) and ABI.
169
190
  case "${UNAME_MACHINE_ARCH}" in
191
+ earm*)
192
+ os=netbsdelf
193
+ ;;
170
194
  arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171
195
  eval $set_cc_for_build
172
196
  if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -180,7 +204,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
180
204
  fi
181
205
  ;;
182
206
  *)
183
- os=netbsd
207
+ os=netbsd
208
+ ;;
209
+ esac
210
+ # Determine ABI tags.
211
+ case "${UNAME_MACHINE_ARCH}" in
212
+ earm*)
213
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
214
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
184
215
  ;;
185
216
  esac
186
217
  # The OS release
@@ -193,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
193
224
  release='-gnu'
194
225
  ;;
195
226
  *)
196
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
227
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
197
228
  ;;
198
229
  esac
199
230
  # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200
231
  # contains redundant information, the shorter form:
201
232
  # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202
- echo "${machine}-${os}${release}"
233
+ echo "${machine}-${os}${release}${abi}"
234
+ exit ;;
235
+ *:Bitrig:*:*)
236
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
237
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
203
238
  exit ;;
204
239
  *:OpenBSD:*:*)
205
240
  UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206
241
  echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207
242
  exit ;;
243
+ *:LibertyBSD:*:*)
244
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
245
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
246
+ exit ;;
208
247
  *:ekkoBSD:*:*)
209
248
  echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210
249
  exit ;;
@@ -217,13 +256,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
217
256
  *:MirBSD:*:*)
218
257
  echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219
258
  exit ;;
259
+ *:Sortix:*:*)
260
+ echo ${UNAME_MACHINE}-unknown-sortix
261
+ exit ;;
220
262
  alpha:OSF1:*:*)
221
263
  case $UNAME_RELEASE in
222
264
  *4.0)
223
265
  UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224
266
  ;;
225
267
  *5.*)
226
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
268
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227
269
  ;;
228
270
  esac
229
271
  # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -233,43 +275,46 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
233
275
  ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234
276
  case "$ALPHA_CPU_TYPE" in
235
277
  "EV4 (21064)")
236
- UNAME_MACHINE="alpha" ;;
278
+ UNAME_MACHINE=alpha ;;
237
279
  "EV4.5 (21064)")
238
- UNAME_MACHINE="alpha" ;;
280
+ UNAME_MACHINE=alpha ;;
239
281
  "LCA4 (21066/21068)")
240
- UNAME_MACHINE="alpha" ;;
282
+ UNAME_MACHINE=alpha ;;
241
283
  "EV5 (21164)")
242
- UNAME_MACHINE="alphaev5" ;;
284
+ UNAME_MACHINE=alphaev5 ;;
243
285
  "EV5.6 (21164A)")
244
- UNAME_MACHINE="alphaev56" ;;
286
+ UNAME_MACHINE=alphaev56 ;;
245
287
  "EV5.6 (21164PC)")
246
- UNAME_MACHINE="alphapca56" ;;
288
+ UNAME_MACHINE=alphapca56 ;;
247
289
  "EV5.7 (21164PC)")
248
- UNAME_MACHINE="alphapca57" ;;
290
+ UNAME_MACHINE=alphapca57 ;;
249
291
  "EV6 (21264)")
250
- UNAME_MACHINE="alphaev6" ;;
292
+ UNAME_MACHINE=alphaev6 ;;
251
293
  "EV6.7 (21264A)")
252
- UNAME_MACHINE="alphaev67" ;;
294
+ UNAME_MACHINE=alphaev67 ;;
253
295
  "EV6.8CB (21264C)")
254
- UNAME_MACHINE="alphaev68" ;;
296
+ UNAME_MACHINE=alphaev68 ;;
255
297
  "EV6.8AL (21264B)")
256
- UNAME_MACHINE="alphaev68" ;;
298
+ UNAME_MACHINE=alphaev68 ;;
257
299
  "EV6.8CX (21264D)")
258
- UNAME_MACHINE="alphaev68" ;;
300
+ UNAME_MACHINE=alphaev68 ;;
259
301
  "EV6.9A (21264/EV69A)")
260
- UNAME_MACHINE="alphaev69" ;;
302
+ UNAME_MACHINE=alphaev69 ;;
261
303
  "EV7 (21364)")
262
- UNAME_MACHINE="alphaev7" ;;
304
+ UNAME_MACHINE=alphaev7 ;;
263
305
  "EV7.9 (21364A)")
264
- UNAME_MACHINE="alphaev79" ;;
306
+ UNAME_MACHINE=alphaev79 ;;
265
307
  esac
266
308
  # A Pn.n version is a patched version.
267
309
  # A Vn.n version is a released version.
268
310
  # A Tn.n version is a released field test version.
269
311
  # A Xn.n version is an unreleased experimental baselevel.
270
312
  # 1.2 uses "1.2" for uname -r.
271
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272
- exit ;;
313
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
314
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
315
+ exitcode=$?
316
+ trap '' 0
317
+ exit $exitcode ;;
273
318
  Alpha\ *:Windows_NT*:*)
274
319
  # How do we know it's Interix rather than the generic POSIX subsystem?
275
320
  # Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,12 +340,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
295
340
  echo s390-ibm-zvmoe
296
341
  exit ;;
297
342
  *:OS400:*:*)
298
- echo powerpc-ibm-os400
343
+ echo powerpc-ibm-os400
299
344
  exit ;;
300
345
  arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301
346
  echo arm-acorn-riscix${UNAME_RELEASE}
302
347
  exit ;;
303
- arm:riscos:*:*|arm:RISCOS:*:*)
348
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
304
349
  echo arm-unknown-riscos
305
350
  exit ;;
306
351
  SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -338,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
338
383
  exit ;;
339
384
  i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
340
385
  eval $set_cc_for_build
341
- SUN_ARCH="i386"
386
+ SUN_ARCH=i386
342
387
  # If there is a compiler, see if it is configured for 64-bit objects.
343
388
  # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
344
389
  # This test works for both compilers.
345
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
390
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
346
391
  if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
347
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
392
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
348
393
  grep IS_64BIT_ARCH >/dev/null
349
394
  then
350
- SUN_ARCH="x86_64"
395
+ SUN_ARCH=x86_64
351
396
  fi
352
397
  fi
353
398
  echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -372,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
372
417
  exit ;;
373
418
  sun*:*:4.2BSD:*)
374
419
  UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
375
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
420
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
376
421
  case "`/bin/arch`" in
377
422
  sun3)
378
423
  echo m68k-sun-sunos${UNAME_RELEASE}
@@ -394,23 +439,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
394
439
  # MiNT. But MiNT is downward compatible to TOS, so this should
395
440
  # be no problem.
396
441
  atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
397
- echo m68k-atari-mint${UNAME_RELEASE}
442
+ echo m68k-atari-mint${UNAME_RELEASE}
398
443
  exit ;;
399
444
  atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
400
445
  echo m68k-atari-mint${UNAME_RELEASE}
401
- exit ;;
446
+ exit ;;
402
447
  *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
403
- echo m68k-atari-mint${UNAME_RELEASE}
448
+ echo m68k-atari-mint${UNAME_RELEASE}
404
449
  exit ;;
405
450
  milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
406
- echo m68k-milan-mint${UNAME_RELEASE}
407
- exit ;;
451
+ echo m68k-milan-mint${UNAME_RELEASE}
452
+ exit ;;
408
453
  hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
409
- echo m68k-hades-mint${UNAME_RELEASE}
410
- exit ;;
454
+ echo m68k-hades-mint${UNAME_RELEASE}
455
+ exit ;;
411
456
  *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
412
- echo m68k-unknown-mint${UNAME_RELEASE}
413
- exit ;;
457
+ echo m68k-unknown-mint${UNAME_RELEASE}
458
+ exit ;;
414
459
  m68k:machten:*:*)
415
460
  echo m68k-apple-machten${UNAME_RELEASE}
416
461
  exit ;;
@@ -480,8 +525,8 @@ EOF
480
525
  echo m88k-motorola-sysv3
481
526
  exit ;;
482
527
  AViiON:dgux:*:*)
483
- # DG/UX returns AViiON for all architectures
484
- UNAME_PROCESSOR=`/usr/bin/uname -p`
528
+ # DG/UX returns AViiON for all architectures
529
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
485
530
  if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
486
531
  then
487
532
  if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -494,7 +539,7 @@ EOF
494
539
  else
495
540
  echo i586-dg-dgux${UNAME_RELEASE}
496
541
  fi
497
- exit ;;
542
+ exit ;;
498
543
  M88*:DolphinOS:*:*) # DolphinOS (SVR3)
499
544
  echo m88k-dolphin-sysv3
500
545
  exit ;;
@@ -551,15 +596,16 @@ EOF
551
596
  echo rs6000-ibm-aix3.2
552
597
  fi
553
598
  exit ;;
554
- *:AIX:*:[456])
599
+ *:AIX:*:[4567])
555
600
  IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
556
601
  if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
557
602
  IBM_ARCH=rs6000
558
603
  else
559
604
  IBM_ARCH=powerpc
560
605
  fi
561
- if [ -x /usr/bin/oslevel ] ; then
562
- IBM_REV=`/usr/bin/oslevel`
606
+ if [ -x /usr/bin/lslpp ] ; then
607
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
608
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
563
609
  else
564
610
  IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
565
611
  fi
@@ -594,58 +640,58 @@ EOF
594
640
  9000/[678][0-9][0-9])
595
641
  if [ -x /usr/bin/getconf ]; then
596
642
  sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
597
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
598
- case "${sc_cpu_version}" in
599
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
600
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
601
- 532) # CPU_PA_RISC2_0
602
- case "${sc_kernel_bits}" in
603
- 32) HP_ARCH="hppa2.0n" ;;
604
- 64) HP_ARCH="hppa2.0w" ;;
605
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
606
- esac ;;
607
- esac
643
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
644
+ case "${sc_cpu_version}" in
645
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
646
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
647
+ 532) # CPU_PA_RISC2_0
648
+ case "${sc_kernel_bits}" in
649
+ 32) HP_ARCH=hppa2.0n ;;
650
+ 64) HP_ARCH=hppa2.0w ;;
651
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
652
+ esac ;;
653
+ esac
608
654
  fi
609
655
  if [ "${HP_ARCH}" = "" ]; then
610
656
  eval $set_cc_for_build
611
- sed 's/^ //' << EOF >$dummy.c
657
+ sed 's/^ //' << EOF >$dummy.c
612
658
 
613
- #define _HPUX_SOURCE
614
- #include <stdlib.h>
615
- #include <unistd.h>
659
+ #define _HPUX_SOURCE
660
+ #include <stdlib.h>
661
+ #include <unistd.h>
616
662
 
617
- int main ()
618
- {
619
- #if defined(_SC_KERNEL_BITS)
620
- long bits = sysconf(_SC_KERNEL_BITS);
621
- #endif
622
- long cpu = sysconf (_SC_CPU_VERSION);
663
+ int main ()
664
+ {
665
+ #if defined(_SC_KERNEL_BITS)
666
+ long bits = sysconf(_SC_KERNEL_BITS);
667
+ #endif
668
+ long cpu = sysconf (_SC_CPU_VERSION);
623
669
 
624
- switch (cpu)
625
- {
626
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
627
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
628
- case CPU_PA_RISC2_0:
629
- #if defined(_SC_KERNEL_BITS)
630
- switch (bits)
631
- {
632
- case 64: puts ("hppa2.0w"); break;
633
- case 32: puts ("hppa2.0n"); break;
634
- default: puts ("hppa2.0"); break;
635
- } break;
636
- #else /* !defined(_SC_KERNEL_BITS) */
637
- puts ("hppa2.0"); break;
638
- #endif
639
- default: puts ("hppa1.0"); break;
640
- }
641
- exit (0);
642
- }
670
+ switch (cpu)
671
+ {
672
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
673
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
674
+ case CPU_PA_RISC2_0:
675
+ #if defined(_SC_KERNEL_BITS)
676
+ switch (bits)
677
+ {
678
+ case 64: puts ("hppa2.0w"); break;
679
+ case 32: puts ("hppa2.0n"); break;
680
+ default: puts ("hppa2.0"); break;
681
+ } break;
682
+ #else /* !defined(_SC_KERNEL_BITS) */
683
+ puts ("hppa2.0"); break;
684
+ #endif
685
+ default: puts ("hppa1.0"); break;
686
+ }
687
+ exit (0);
688
+ }
643
689
  EOF
644
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
690
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
645
691
  test -z "$HP_ARCH" && HP_ARCH=hppa
646
692
  fi ;;
647
693
  esac
648
- if [ ${HP_ARCH} = "hppa2.0w" ]
694
+ if [ ${HP_ARCH} = hppa2.0w ]
649
695
  then
650
696
  eval $set_cc_for_build
651
697
 
@@ -658,12 +704,12 @@ EOF
658
704
  # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
659
705
  # => hppa64-hp-hpux11.23
660
706
 
661
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
707
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
662
708
  grep -q __LP64__
663
709
  then
664
- HP_ARCH="hppa2.0w"
710
+ HP_ARCH=hppa2.0w
665
711
  else
666
- HP_ARCH="hppa64"
712
+ HP_ARCH=hppa64
667
713
  fi
668
714
  fi
669
715
  echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -730,22 +776,22 @@ EOF
730
776
  exit ;;
731
777
  C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
732
778
  echo c1-convex-bsd
733
- exit ;;
779
+ exit ;;
734
780
  C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
735
781
  if getsysinfo -f scalar_acc
736
782
  then echo c32-convex-bsd
737
783
  else echo c2-convex-bsd
738
784
  fi
739
- exit ;;
785
+ exit ;;
740
786
  C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
741
787
  echo c34-convex-bsd
742
- exit ;;
788
+ exit ;;
743
789
  C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
744
790
  echo c38-convex-bsd
745
- exit ;;
791
+ exit ;;
746
792
  C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
747
793
  echo c4-convex-bsd
748
- exit ;;
794
+ exit ;;
749
795
  CRAY*Y-MP:*:*:*)
750
796
  echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
751
797
  exit ;;
@@ -768,15 +814,15 @@ EOF
768
814
  echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
769
815
  exit ;;
770
816
  F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
771
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
772
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
773
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
774
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
775
- exit ;;
817
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
818
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
819
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
820
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
821
+ exit ;;
776
822
  5000:UNIX_System_V:4.*:*)
777
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
778
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
779
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
823
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
824
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
825
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
780
826
  exit ;;
781
827
  i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
782
828
  echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -788,30 +834,36 @@ EOF
788
834
  echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
789
835
  exit ;;
790
836
  *:FreeBSD:*:*)
791
- case ${UNAME_MACHINE} in
792
- pc98)
793
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
837
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
838
+ case ${UNAME_PROCESSOR} in
794
839
  amd64)
795
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
796
- *)
797
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
840
+ UNAME_PROCESSOR=x86_64 ;;
841
+ i386)
842
+ UNAME_PROCESSOR=i586 ;;
798
843
  esac
844
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
799
845
  exit ;;
800
846
  i*:CYGWIN*:*)
801
847
  echo ${UNAME_MACHINE}-pc-cygwin
802
848
  exit ;;
849
+ *:MINGW64*:*)
850
+ echo ${UNAME_MACHINE}-pc-mingw64
851
+ exit ;;
803
852
  *:MINGW*:*)
804
853
  echo ${UNAME_MACHINE}-pc-mingw32
805
854
  exit ;;
855
+ *:MSYS*:*)
856
+ echo ${UNAME_MACHINE}-pc-msys
857
+ exit ;;
806
858
  i*:windows32*:*)
807
- # uname -m includes "-pc" on this system.
808
- echo ${UNAME_MACHINE}-mingw32
859
+ # uname -m includes "-pc" on this system.
860
+ echo ${UNAME_MACHINE}-mingw32
809
861
  exit ;;
810
862
  i*:PW*:*)
811
863
  echo ${UNAME_MACHINE}-pc-pw32
812
864
  exit ;;
813
865
  *:Interix*:*)
814
- case ${UNAME_MACHINE} in
866
+ case ${UNAME_MACHINE} in
815
867
  x86)
816
868
  echo i586-pc-interix${UNAME_RELEASE}
817
869
  exit ;;
@@ -848,15 +900,22 @@ EOF
848
900
  exit ;;
849
901
  *:GNU:*:*)
850
902
  # the GNU system
851
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
903
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
852
904
  exit ;;
853
905
  *:GNU/*:*:*)
854
906
  # other systems with GNU libc and userland
855
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
907
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
856
908
  exit ;;
857
909
  i*86:Minix:*:*)
858
910
  echo ${UNAME_MACHINE}-pc-minix
859
911
  exit ;;
912
+ aarch64:Linux:*:*)
913
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
914
+ exit ;;
915
+ aarch64_be:Linux:*:*)
916
+ UNAME_MACHINE=aarch64_be
917
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
918
+ exit ;;
860
919
  alpha:Linux:*:*)
861
920
  case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
862
921
  EV5) UNAME_MACHINE=alphaev5 ;;
@@ -866,52 +925,62 @@ EOF
866
925
  EV6) UNAME_MACHINE=alphaev6 ;;
867
926
  EV67) UNAME_MACHINE=alphaev67 ;;
868
927
  EV68*) UNAME_MACHINE=alphaev68 ;;
869
- esac
928
+ esac
870
929
  objdump --private-headers /bin/sh | grep -q ld.so.1
871
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
930
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
931
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
932
+ exit ;;
933
+ arc:Linux:*:* | arceb:Linux:*:*)
934
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
873
935
  exit ;;
874
936
  arm*:Linux:*:*)
875
937
  eval $set_cc_for_build
876
938
  if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
877
939
  | grep -q __ARM_EABI__
878
940
  then
879
- echo ${UNAME_MACHINE}-unknown-linux-gnu
941
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
880
942
  else
881
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
943
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
944
+ | grep -q __ARM_PCS_VFP
945
+ then
946
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
947
+ else
948
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
949
+ fi
882
950
  fi
883
951
  exit ;;
884
952
  avr32*:Linux:*:*)
885
- echo ${UNAME_MACHINE}-unknown-linux-gnu
953
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
886
954
  exit ;;
887
955
  cris:Linux:*:*)
888
- echo cris-axis-linux-gnu
956
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
889
957
  exit ;;
890
958
  crisv32:Linux:*:*)
891
- echo crisv32-axis-linux-gnu
959
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
960
+ exit ;;
961
+ e2k:Linux:*:*)
962
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
892
963
  exit ;;
893
964
  frv:Linux:*:*)
894
- echo frv-unknown-linux-gnu
965
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
966
+ exit ;;
967
+ hexagon:Linux:*:*)
968
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
895
969
  exit ;;
896
970
  i*86:Linux:*:*)
897
- LIBC=gnu
898
- eval $set_cc_for_build
899
- sed 's/^ //' << EOF >$dummy.c
900
- #ifdef __dietlibc__
901
- LIBC=dietlibc
902
- #endif
903
- EOF
904
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
905
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
971
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
906
972
  exit ;;
907
973
  ia64:Linux:*:*)
908
- echo ${UNAME_MACHINE}-unknown-linux-gnu
974
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
975
+ exit ;;
976
+ k1om:Linux:*:*)
977
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909
978
  exit ;;
910
979
  m32r*:Linux:*:*)
911
- echo ${UNAME_MACHINE}-unknown-linux-gnu
980
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912
981
  exit ;;
913
982
  m68*:Linux:*:*)
914
- echo ${UNAME_MACHINE}-unknown-linux-gnu
983
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915
984
  exit ;;
916
985
  mips:Linux:*:* | mips64:Linux:*:*)
917
986
  eval $set_cc_for_build
@@ -930,51 +999,69 @@ EOF
930
999
  #endif
931
1000
  EOF
932
1001
  eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
933
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
1002
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
934
1003
  ;;
935
- or32:Linux:*:*)
936
- echo or32-unknown-linux-gnu
1004
+ mips64el:Linux:*:*)
1005
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1006
+ exit ;;
1007
+ openrisc*:Linux:*:*)
1008
+ echo or1k-unknown-linux-${LIBC}
1009
+ exit ;;
1010
+ or32:Linux:*:* | or1k*:Linux:*:*)
1011
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937
1012
  exit ;;
938
1013
  padre:Linux:*:*)
939
- echo sparc-unknown-linux-gnu
1014
+ echo sparc-unknown-linux-${LIBC}
940
1015
  exit ;;
941
1016
  parisc64:Linux:*:* | hppa64:Linux:*:*)
942
- echo hppa64-unknown-linux-gnu
1017
+ echo hppa64-unknown-linux-${LIBC}
943
1018
  exit ;;
944
1019
  parisc:Linux:*:* | hppa:Linux:*:*)
945
1020
  # Look for CPU level
946
1021
  case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
947
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
948
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
949
- *) echo hppa-unknown-linux-gnu ;;
1022
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1023
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1024
+ *) echo hppa-unknown-linux-${LIBC} ;;
950
1025
  esac
951
1026
  exit ;;
952
1027
  ppc64:Linux:*:*)
953
- echo powerpc64-unknown-linux-gnu
1028
+ echo powerpc64-unknown-linux-${LIBC}
954
1029
  exit ;;
955
1030
  ppc:Linux:*:*)
956
- echo powerpc-unknown-linux-gnu
1031
+ echo powerpc-unknown-linux-${LIBC}
1032
+ exit ;;
1033
+ ppc64le:Linux:*:*)
1034
+ echo powerpc64le-unknown-linux-${LIBC}
1035
+ exit ;;
1036
+ ppcle:Linux:*:*)
1037
+ echo powerpcle-unknown-linux-${LIBC}
1038
+ exit ;;
1039
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
1040
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957
1041
  exit ;;
958
1042
  s390:Linux:*:* | s390x:Linux:*:*)
959
- echo ${UNAME_MACHINE}-ibm-linux
1043
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
960
1044
  exit ;;
961
1045
  sh64*:Linux:*:*)
962
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1046
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
963
1047
  exit ;;
964
1048
  sh*:Linux:*:*)
965
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1049
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
966
1050
  exit ;;
967
1051
  sparc:Linux:*:* | sparc64:Linux:*:*)
968
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1052
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1053
+ exit ;;
1054
+ tile*:Linux:*:*)
1055
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
969
1056
  exit ;;
970
1057
  vax:Linux:*:*)
971
- echo ${UNAME_MACHINE}-dec-linux-gnu
1058
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
972
1059
  exit ;;
973
1060
  x86_64:Linux:*:*)
974
- echo x86_64-unknown-linux-gnu
1061
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
975
1062
  exit ;;
976
1063
  xtensa*:Linux:*:*)
977
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1064
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
978
1065
  exit ;;
979
1066
  i*86:DYNIX/ptx:4*:*)
980
1067
  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -983,11 +1070,11 @@ EOF
983
1070
  echo i386-sequent-sysv4
984
1071
  exit ;;
985
1072
  i*86:UNIX_SV:4.2MP:2.*)
986
- # Unixware is an offshoot of SVR4, but it has its own version
987
- # number series starting with 2...
988
- # I am not positive that other SVR4 systems won't match this,
1073
+ # Unixware is an offshoot of SVR4, but it has its own version
1074
+ # number series starting with 2...
1075
+ # I am not positive that other SVR4 systems won't match this,
989
1076
  # I just have to hope. -- rms.
990
- # Use sysv4.2uw... so that sysv4* matches it.
1077
+ # Use sysv4.2uw... so that sysv4* matches it.
991
1078
  echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
992
1079
  exit ;;
993
1080
  i*86:OS/2:*:*)
@@ -1019,7 +1106,7 @@ EOF
1019
1106
  fi
1020
1107
  exit ;;
1021
1108
  i*86:*:5:[678]*)
1022
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
1109
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
1023
1110
  case `/bin/uname -X | grep "^Machine"` in
1024
1111
  *486*) UNAME_MACHINE=i486 ;;
1025
1112
  *Pentium) UNAME_MACHINE=i586 ;;
@@ -1047,13 +1134,13 @@ EOF
1047
1134
  exit ;;
1048
1135
  pc:*:*:*)
1049
1136
  # Left here for compatibility:
1050
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
1051
- # the processor, so we play safe by assuming i586.
1137
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
1138
+ # the processor, so we play safe by assuming i586.
1052
1139
  # Note: whatever this is, it MUST be the same as what config.sub
1053
- # prints for the "djgpp" host, or else GDB configury will decide that
1140
+ # prints for the "djgpp" host, or else GDB configure will decide that
1054
1141
  # this is a cross-build.
1055
1142
  echo i586-pc-msdosdjgpp
1056
- exit ;;
1143
+ exit ;;
1057
1144
  Intel:Mach:3*:*)
1058
1145
  echo i386-pc-mach3
1059
1146
  exit ;;
@@ -1088,8 +1175,8 @@ EOF
1088
1175
  /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1089
1176
  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1090
1177
  3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1091
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1092
- && { echo i486-ncr-sysv4; exit; } ;;
1178
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1179
+ && { echo i486-ncr-sysv4; exit; } ;;
1093
1180
  NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1094
1181
  OS_REL='.3'
1095
1182
  test -r /etc/.relid \
@@ -1132,10 +1219,10 @@ EOF
1132
1219
  echo ns32k-sni-sysv
1133
1220
  fi
1134
1221
  exit ;;
1135
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1136
- # says <Richard.M.Bartel@ccMail.Census.GOV>
1137
- echo i586-unisys-sysv4
1138
- exit ;;
1222
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1223
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
1224
+ echo i586-unisys-sysv4
1225
+ exit ;;
1139
1226
  *:UNIX_System_V:4*:FTX*)
1140
1227
  # From Gerald Hewes <hewes@openmarket.com>.
1141
1228
  # How about differentiating between stratus architectures? -djm
@@ -1161,11 +1248,11 @@ EOF
1161
1248
  exit ;;
1162
1249
  R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1163
1250
  if [ -d /usr/nec ]; then
1164
- echo mips-nec-sysv${UNAME_RELEASE}
1251
+ echo mips-nec-sysv${UNAME_RELEASE}
1165
1252
  else
1166
- echo mips-unknown-sysv${UNAME_RELEASE}
1253
+ echo mips-unknown-sysv${UNAME_RELEASE}
1167
1254
  fi
1168
- exit ;;
1255
+ exit ;;
1169
1256
  BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1170
1257
  echo powerpc-be-beos
1171
1258
  exit ;;
@@ -1178,6 +1265,9 @@ EOF
1178
1265
  BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1179
1266
  echo i586-pc-haiku
1180
1267
  exit ;;
1268
+ x86_64:Haiku:*:*)
1269
+ echo x86_64-unknown-haiku
1270
+ exit ;;
1181
1271
  SX-4:SUPER-UX:*:*)
1182
1272
  echo sx4-nec-superux${UNAME_RELEASE}
1183
1273
  exit ;;
@@ -1196,6 +1286,9 @@ EOF
1196
1286
  SX-8R:SUPER-UX:*:*)
1197
1287
  echo sx8r-nec-superux${UNAME_RELEASE}
1198
1288
  exit ;;
1289
+ SX-ACE:SUPER-UX:*:*)
1290
+ echo sxace-nec-superux${UNAME_RELEASE}
1291
+ exit ;;
1199
1292
  Power*:Rhapsody:*:*)
1200
1293
  echo powerpc-apple-rhapsody${UNAME_RELEASE}
1201
1294
  exit ;;
@@ -1204,24 +1297,36 @@ EOF
1204
1297
  exit ;;
1205
1298
  *:Darwin:*:*)
1206
1299
  UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1207
- case $UNAME_PROCESSOR in
1208
- i386)
1209
- eval $set_cc_for_build
1210
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1211
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1212
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1213
- grep IS_64BIT_ARCH >/dev/null
1214
- then
1215
- UNAME_PROCESSOR="x86_64"
1216
- fi
1217
- fi ;;
1218
- unknown) UNAME_PROCESSOR=powerpc ;;
1219
- esac
1300
+ eval $set_cc_for_build
1301
+ if test "$UNAME_PROCESSOR" = unknown ; then
1302
+ UNAME_PROCESSOR=powerpc
1303
+ fi
1304
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1305
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1306
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1307
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1308
+ grep IS_64BIT_ARCH >/dev/null
1309
+ then
1310
+ case $UNAME_PROCESSOR in
1311
+ i386) UNAME_PROCESSOR=x86_64 ;;
1312
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
1313
+ esac
1314
+ fi
1315
+ fi
1316
+ elif test "$UNAME_PROCESSOR" = i386 ; then
1317
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
1318
+ # that puts up a graphical alert prompting to install
1319
+ # developer tools. Any system running Mac OS X 10.7 or
1320
+ # later (Darwin 11 and later) is required to have a 64-bit
1321
+ # processor. This is not true of the ARM version of Darwin
1322
+ # that Apple uses in portable devices.
1323
+ UNAME_PROCESSOR=x86_64
1324
+ fi
1220
1325
  echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1221
1326
  exit ;;
1222
1327
  *:procnto*:*:* | *:QNX:[0123456789]*:*)
1223
1328
  UNAME_PROCESSOR=`uname -p`
1224
- if test "$UNAME_PROCESSOR" = "x86"; then
1329
+ if test "$UNAME_PROCESSOR" = x86; then
1225
1330
  UNAME_PROCESSOR=i386
1226
1331
  UNAME_MACHINE=pc
1227
1332
  fi
@@ -1230,12 +1335,18 @@ EOF
1230
1335
  *:QNX:*:4*)
1231
1336
  echo i386-pc-qnx
1232
1337
  exit ;;
1233
- NSE-?:NONSTOP_KERNEL:*:*)
1338
+ NEO-*:NONSTOP_KERNEL:*:*)
1339
+ echo neo-tandem-nsk${UNAME_RELEASE}
1340
+ exit ;;
1341
+ NSE-*:NONSTOP_KERNEL:*:*)
1234
1342
  echo nse-tandem-nsk${UNAME_RELEASE}
1235
1343
  exit ;;
1236
- NSR-?:NONSTOP_KERNEL:*:*)
1344
+ NSR-*:NONSTOP_KERNEL:*:*)
1237
1345
  echo nsr-tandem-nsk${UNAME_RELEASE}
1238
1346
  exit ;;
1347
+ NSX-*:NONSTOP_KERNEL:*:*)
1348
+ echo nsx-tandem-nsk${UNAME_RELEASE}
1349
+ exit ;;
1239
1350
  *:NonStop-UX:*:*)
1240
1351
  echo mips-compaq-nonstopux
1241
1352
  exit ;;
@@ -1249,7 +1360,7 @@ EOF
1249
1360
  # "uname -m" is not consistent, so use $cputype instead. 386
1250
1361
  # is converted to i386 for consistency with other x86
1251
1362
  # operating systems.
1252
- if test "$cputype" = "386"; then
1363
+ if test "$cputype" = 386; then
1253
1364
  UNAME_MACHINE=i386
1254
1365
  else
1255
1366
  UNAME_MACHINE="$cputype"
@@ -1275,13 +1386,13 @@ EOF
1275
1386
  echo pdp10-unknown-its
1276
1387
  exit ;;
1277
1388
  SEI:*:*:SEIUX)
1278
- echo mips-sei-seiux${UNAME_RELEASE}
1389
+ echo mips-sei-seiux${UNAME_RELEASE}
1279
1390
  exit ;;
1280
1391
  *:DragonFly:*:*)
1281
1392
  echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1282
1393
  exit ;;
1283
1394
  *:*VMS:*:*)
1284
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
1395
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
1285
1396
  case "${UNAME_MACHINE}" in
1286
1397
  A*) echo alpha-dec-vms ; exit ;;
1287
1398
  I*) echo ia64-dec-vms ; exit ;;
@@ -1291,7 +1402,7 @@ EOF
1291
1402
  echo i386-pc-xenix
1292
1403
  exit ;;
1293
1404
  i*86:skyos:*:*)
1294
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1405
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1295
1406
  exit ;;
1296
1407
  i*86:rdos:*:*)
1297
1408
  echo ${UNAME_MACHINE}-pc-rdos
@@ -1299,174 +1410,28 @@ EOF
1299
1410
  i*86:AROS:*:*)
1300
1411
  echo ${UNAME_MACHINE}-pc-aros
1301
1412
  exit ;;
1302
- esac
1303
-
1304
- #echo '(No uname command or uname output not recognized.)' 1>&2
1305
- #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1306
-
1307
- eval $set_cc_for_build
1308
- cat >$dummy.c <<EOF
1309
- #ifdef _SEQUENT_
1310
- # include <sys/types.h>
1311
- # include <sys/utsname.h>
1312
- #endif
1313
- main ()
1314
- {
1315
- #if defined (sony)
1316
- #if defined (MIPSEB)
1317
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1318
- I don't know.... */
1319
- printf ("mips-sony-bsd\n"); exit (0);
1320
- #else
1321
- #include <sys/param.h>
1322
- printf ("m68k-sony-newsos%s\n",
1323
- #ifdef NEWSOS4
1324
- "4"
1325
- #else
1326
- ""
1327
- #endif
1328
- ); exit (0);
1329
- #endif
1330
- #endif
1331
-
1332
- #if defined (__arm) && defined (__acorn) && defined (__unix)
1333
- printf ("arm-acorn-riscix\n"); exit (0);
1334
- #endif
1335
-
1336
- #if defined (hp300) && !defined (hpux)
1337
- printf ("m68k-hp-bsd\n"); exit (0);
1338
- #endif
1339
-
1340
- #if defined (NeXT)
1341
- #if !defined (__ARCHITECTURE__)
1342
- #define __ARCHITECTURE__ "m68k"
1343
- #endif
1344
- int version;
1345
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1346
- if (version < 4)
1347
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1348
- else
1349
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1350
- exit (0);
1351
- #endif
1352
-
1353
- #if defined (MULTIMAX) || defined (n16)
1354
- #if defined (UMAXV)
1355
- printf ("ns32k-encore-sysv\n"); exit (0);
1356
- #else
1357
- #if defined (CMU)
1358
- printf ("ns32k-encore-mach\n"); exit (0);
1359
- #else
1360
- printf ("ns32k-encore-bsd\n"); exit (0);
1361
- #endif
1362
- #endif
1363
- #endif
1364
-
1365
- #if defined (__386BSD__)
1366
- printf ("i386-pc-bsd\n"); exit (0);
1367
- #endif
1368
-
1369
- #if defined (sequent)
1370
- #if defined (i386)
1371
- printf ("i386-sequent-dynix\n"); exit (0);
1372
- #endif
1373
- #if defined (ns32000)
1374
- printf ("ns32k-sequent-dynix\n"); exit (0);
1375
- #endif
1376
- #endif
1377
-
1378
- #if defined (_SEQUENT_)
1379
- struct utsname un;
1380
-
1381
- uname(&un);
1382
-
1383
- if (strncmp(un.version, "V2", 2) == 0) {
1384
- printf ("i386-sequent-ptx2\n"); exit (0);
1385
- }
1386
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1387
- printf ("i386-sequent-ptx1\n"); exit (0);
1388
- }
1389
- printf ("i386-sequent-ptx\n"); exit (0);
1390
-
1391
- #endif
1392
-
1393
- #if defined (vax)
1394
- # if !defined (ultrix)
1395
- # include <sys/param.h>
1396
- # if defined (BSD)
1397
- # if BSD == 43
1398
- printf ("vax-dec-bsd4.3\n"); exit (0);
1399
- # else
1400
- # if BSD == 199006
1401
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
1402
- # else
1403
- printf ("vax-dec-bsd\n"); exit (0);
1404
- # endif
1405
- # endif
1406
- # else
1407
- printf ("vax-dec-bsd\n"); exit (0);
1408
- # endif
1409
- # else
1410
- printf ("vax-dec-ultrix\n"); exit (0);
1411
- # endif
1412
- #endif
1413
-
1414
- #if defined (alliant) && defined (i860)
1415
- printf ("i860-alliant-bsd\n"); exit (0);
1416
- #endif
1417
-
1418
- exit (1);
1419
- }
1420
- EOF
1421
-
1422
- $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1423
- { echo "$SYSTEM_NAME"; exit; }
1424
-
1425
- # Apollos put the system type in the environment.
1426
-
1427
- test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1428
-
1429
- # Convex versions that predate uname can use getsysinfo(1)
1430
-
1431
- if [ -x /usr/convex/getsysinfo ]
1432
- then
1433
- case `getsysinfo -f cpu_type` in
1434
- c1*)
1435
- echo c1-convex-bsd
1436
- exit ;;
1437
- c2*)
1438
- if getsysinfo -f scalar_acc
1439
- then echo c32-convex-bsd
1440
- else echo c2-convex-bsd
1441
- fi
1442
- exit ;;
1443
- c34*)
1444
- echo c34-convex-bsd
1413
+ x86_64:VMkernel:*:*)
1414
+ echo ${UNAME_MACHINE}-unknown-esx
1445
1415
  exit ;;
1446
- c38*)
1447
- echo c38-convex-bsd
1416
+ amd64:Isilon\ OneFS:*:*)
1417
+ echo x86_64-unknown-onefs
1448
1418
  exit ;;
1449
- c4*)
1450
- echo c4-convex-bsd
1451
- exit ;;
1452
- esac
1453
- fi
1419
+ esac
1454
1420
 
1455
1421
  cat >&2 <<EOF
1456
1422
  $0: unable to guess system type
1457
1423
 
1458
- This script, last modified $timestamp, has failed to recognize
1459
- the operating system you are using. It is advised that you
1460
- download the most up to date version of the config scripts from
1424
+ This script (version $timestamp), has failed to recognize the
1425
+ operating system you are using. If your script is old, overwrite
1426
+ config.guess and config.sub with the latest versions from:
1461
1427
 
1462
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1428
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1463
1429
  and
1464
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1430
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1465
1431
 
1466
- If the version you run ($0) is already up to date, please
1467
- send the following data and any information you think might be
1468
- pertinent to <config-patches@gnu.org> in order to provide the needed
1469
- information to handle your system.
1432
+ If $0 has already been updated, send the following data and any
1433
+ information you think might be pertinent to config-patches@gnu.org to
1434
+ provide the necessary information to handle your system.
1470
1435
 
1471
1436
  config.guess timestamp = $timestamp
1472
1437