ffi 1.12.2 → 1.13.0

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/.appveyor.yml +3 -0
  3. data/.github/workflows/ci.yml +64 -0
  4. data/.travis.yml +19 -5
  5. data/CHANGELOG.md +30 -0
  6. data/Gemfile +4 -2
  7. data/Rakefile +24 -43
  8. data/ext/ffi_c/Buffer.c +2 -2
  9. data/ext/ffi_c/Call.c +1 -7
  10. data/ext/ffi_c/ClosurePool.c +11 -14
  11. data/ext/ffi_c/Function.c +8 -23
  12. data/ext/ffi_c/FunctionInfo.c +1 -2
  13. data/ext/ffi_c/LongDouble.c +5 -3
  14. data/ext/ffi_c/LongDouble.h +0 -4
  15. data/ext/ffi_c/MemoryPointer.c +1 -1
  16. data/ext/ffi_c/MethodHandle.c +18 -24
  17. data/ext/ffi_c/MethodHandle.h +3 -2
  18. data/ext/ffi_c/Platform.c +1 -0
  19. data/ext/ffi_c/Pointer.c +1 -1
  20. data/ext/ffi_c/StructLayout.c +7 -2
  21. data/ext/ffi_c/Thread.c +0 -3
  22. data/ext/ffi_c/Thread.h +0 -3
  23. data/ext/ffi_c/compat.h +4 -0
  24. data/ext/ffi_c/extconf.rb +13 -15
  25. data/ext/ffi_c/libffi/.travis.yml +4 -0
  26. data/ext/ffi_c/libffi/.travis/build.sh +4 -0
  27. data/ext/ffi_c/libffi/Makefile.am +2 -1
  28. data/ext/ffi_c/libffi/README.md +7 -1
  29. data/ext/ffi_c/libffi/configure.ac +25 -9
  30. data/ext/ffi_c/libffi/include/ffi.h.in +8 -0
  31. data/ext/ffi_c/libffi/libffi.map.in +8 -12
  32. data/ext/ffi_c/libffi/libtool-version +1 -1
  33. data/ext/ffi_c/libffi/src/aarch64/ffi.c +6 -0
  34. data/ext/ffi_c/libffi/src/aarch64/sysv.S +13 -2
  35. data/ext/ffi_c/libffi/src/closures.c +10 -4
  36. data/ext/ffi_c/libffi/src/pa/ffi.c +46 -91
  37. data/ext/ffi_c/libffi/src/pa/ffitarget.h +1 -6
  38. data/ext/ffi_c/libffi/src/pa/hpux32.S +4 -2
  39. data/ext/ffi_c/libffi/src/pa/linux.S +4 -2
  40. data/ext/ffi_c/libffi/src/powerpc/sysv.S +5 -7
  41. data/ext/ffi_c/libffi/src/x86/ffi.c +7 -4
  42. data/ext/ffi_c/libffi/src/x86/ffi64.c +10 -8
  43. data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -2
  44. data/ext/ffi_c/libffi/src/x86/ffiw64.c +10 -8
  45. data/ext/ffi_c/libffi/src/x86/sysv.S +13 -4
  46. data/ext/ffi_c/libffi/src/x86/unix64.S +58 -2
  47. data/ext/ffi_c/libffi/src/x86/win64.S +4 -1
  48. data/ffi.gemspec +1 -1
  49. data/lib/ffi.rb +10 -2
  50. data/lib/ffi/library.rb +5 -1
  51. data/lib/ffi/platform.rb +2 -2
  52. data/lib/ffi/platform/arm-linux/types.conf +32 -4
  53. data/lib/ffi/platform/i386-windows/types.conf +26 -79
  54. data/lib/ffi/platform/powerpc-linux/types.conf +32 -2
  55. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  56. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  57. data/lib/ffi/platform/x86_64-darwin/types.conf +4 -0
  58. data/lib/ffi/platform/x86_64-linux/types.conf +21 -0
  59. data/lib/ffi/platform/x86_64-windows/types.conf +10 -78
  60. data/lib/ffi/pointer.rb +19 -12
  61. data/lib/ffi/struct.rb +8 -2
  62. data/lib/ffi/tools/types_generator.rb +2 -0
  63. data/lib/ffi/version.rb +1 -1
  64. data/samples/getlogin.rb +1 -1
  65. data/samples/getpid.rb +1 -1
  66. data/samples/gettimeofday.rb +8 -8
  67. data/samples/hello.rb +2 -1
  68. data/samples/inotify.rb +1 -1
  69. data/samples/pty.rb +1 -2
  70. data/samples/qsort.rb +0 -1
  71. metadata +6 -4
  72. data/samples/sample_helper.rb +0 -6
@@ -48,6 +48,7 @@
48
48
  SEH(.seh_proc ffi_call_win64)
49
49
  C(ffi_call_win64):
50
50
  cfi_startproc
51
+ _CET_ENDBR
51
52
  /* Set up the local stack frame and install it in rbp/rsp. */
52
53
  movq (%rsp), %rax
53
54
  movq %rbp, (arg1)
@@ -80,7 +81,7 @@ C(ffi_call_win64):
80
81
  cmpl $FFI_TYPE_SMALL_STRUCT_4B, %ecx
81
82
  leaq (%r10, %rcx, 8), %r10
82
83
  ja 99f
83
- jmp *%r10
84
+ _CET_NOTRACK jmp *%r10
84
85
 
85
86
  /* Below, we're space constrained most of the time. Thus we eschew the
86
87
  modern "mov, pop, ret" sequence (5 bytes) for "leave, ret" (2 bytes). */
@@ -176,6 +177,7 @@ E(0b, FFI_TYPE_SMALL_STRUCT_4B)
176
177
  SEH(.seh_proc ffi_go_closure_win64)
177
178
  C(ffi_go_closure_win64):
178
179
  cfi_startproc
180
+ _CET_ENDBR
179
181
  /* Save all integer arguments into the incoming reg stack space. */
180
182
  movq %rcx, 8(%rsp)
181
183
  movq %rdx, 16(%rsp)
@@ -196,6 +198,7 @@ C(ffi_go_closure_win64):
196
198
  SEH(.seh_proc ffi_closure_win64)
197
199
  C(ffi_closure_win64):
198
200
  cfi_startproc
201
+ _CET_ENDBR
199
202
  /* Save all integer arguments into the incoming reg stack space. */
200
203
  movq %rcx, 8(%rsp)
201
204
  movq %rdx, 16(%rsp)
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.rdoc_options = %w[--exclude=ext/ffi_c/.*\.o$ --exclude=ffi_c\.(bundle|so)$]
35
35
  s.license = 'BSD-3-Clause'
36
36
  s.require_paths << 'ext/ffi_c'
37
- s.required_ruby_version = '>= 2.0'
37
+ s.required_ruby_version = '>= 2.3'
38
38
  s.add_development_dependency 'rake', '~> 13.0'
39
39
  s.add_development_dependency 'rake-compiler', '~> 1.0'
40
40
  s.add_development_dependency 'rake-compiler-dock', '~> 1.0'
data/lib/ffi.rb CHANGED
@@ -1,4 +1,4 @@
1
- if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
1
+ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
2
2
  Object.send(:remove_const, :FFI) if defined?(::FFI)
3
3
  begin
4
4
  require RUBY_VERSION.split('.')[0, 2].join('.') + '/ffi_c'
@@ -8,7 +8,15 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
8
8
 
9
9
  require 'ffi/ffi'
10
10
 
11
- elsif defined?(RUBY_ENGINE)
11
+ elsif RUBY_ENGINE == 'jruby' && Gem::Version.new(RUBY_ENGINE_VERSION) >= Gem::Version.new("9.3.pre")
12
+ JRuby::Util.load_ext("org.jruby.ext.ffi.FFIService")
13
+ require 'ffi/ffi'
14
+
15
+ elsif RUBY_ENGINE == 'truffleruby' && Gem::Version.new(RUBY_ENGINE_VERSION) >= Gem::Version.new("20.1.0-dev-a")
16
+ require 'truffleruby/ffi_backend'
17
+ require 'ffi/ffi'
18
+
19
+ else
12
20
  # Remove the ffi gem dir from the load path, then reload the internal ffi implementation
13
21
  $LOAD_PATH.delete(File.dirname(__FILE__))
14
22
  $LOAD_PATH.delete(File.join(File.dirname(__FILE__), 'ffi'))
@@ -394,7 +394,11 @@ module FFI
394
394
  options = Hash.new
395
395
  options[:convention] = ffi_convention
396
396
  options[:enums] = @ffi_enums if defined?(@ffi_enums)
397
- cb = FFI::CallbackInfo.new(find_type(ret), native_params, options)
397
+ ret_type = find_type(ret)
398
+ if ret_type == Type::STRING
399
+ raise TypeError, ":string is not allowed as return type of callbacks"
400
+ end
401
+ cb = FFI::CallbackInfo.new(ret_type, native_params, options)
398
402
 
399
403
  # Add to the symbol -> type map (unless there was no name)
400
404
  unless name.nil?
@@ -61,7 +61,7 @@ module FFI
61
61
  CPU = RbConfig::CONFIG['host_cpu']
62
62
 
63
63
  ARCH = case CPU.downcase
64
- when /amd64|x86_64/
64
+ when /amd64|x86_64|x64/
65
65
  "x86_64"
66
66
  when /i?86|x86|i86pc/
67
67
  "i386"
@@ -129,7 +129,7 @@ module FFI
129
129
  end
130
130
 
131
131
  LIBC = if IS_WINDOWS
132
- RbConfig::CONFIG['RUBY_SO_NAME'].split('-')[-2] + '.dll'
132
+ "ucrtbase.dll"
133
133
  elsif IS_GNU
134
134
  GNU_LIBC
135
135
  elsif OS == 'cygwin'
@@ -1,5 +1,4 @@
1
1
  rbx.platform.typedef.*__caddr_t = char
2
- rbx.platform.typedef.*__qaddr_t = long_long
3
2
  rbx.platform.typedef.__blkcnt64_t = long_long
4
3
  rbx.platform.typedef.__blkcnt_t = long
5
4
  rbx.platform.typedef.__blksize_t = long
@@ -12,16 +11,16 @@ rbx.platform.typedef.__fsblkcnt64_t = ulong_long
12
11
  rbx.platform.typedef.__fsblkcnt_t = ulong
13
12
  rbx.platform.typedef.__fsfilcnt64_t = ulong_long
14
13
  rbx.platform.typedef.__fsfilcnt_t = ulong
14
+ rbx.platform.typedef.__fsword_t = int
15
15
  rbx.platform.typedef.__gid_t = uint
16
16
  rbx.platform.typedef.__id_t = uint
17
- rbx.platform.typedef.__in_addr_t = uint
18
- rbx.platform.typedef.__in_port_t = ushort
19
17
  rbx.platform.typedef.__ino64_t = ulong_long
20
18
  rbx.platform.typedef.__ino_t = ulong
21
19
  rbx.platform.typedef.__int16_t = short
22
20
  rbx.platform.typedef.__int32_t = int
23
21
  rbx.platform.typedef.__int64_t = long_long
24
22
  rbx.platform.typedef.__int8_t = char
23
+ rbx.platform.typedef.__intmax_t = long_long
25
24
  rbx.platform.typedef.__intptr_t = int
26
25
  rbx.platform.typedef.__key_t = int
27
26
  rbx.platform.typedef.__loff_t = long_long
@@ -40,7 +39,8 @@ rbx.platform.typedef.__sig_atomic_t = int
40
39
  rbx.platform.typedef.__socklen_t = uint
41
40
  rbx.platform.typedef.__ssize_t = int
42
41
  rbx.platform.typedef.__suseconds_t = long
43
- rbx.platform.typedef.__swblk_t = long
42
+ rbx.platform.typedef.__syscall_slong_t = long
43
+ rbx.platform.typedef.__syscall_ulong_t = ulong
44
44
  rbx.platform.typedef.__time_t = long
45
45
  rbx.platform.typedef.__timer_t = pointer
46
46
  rbx.platform.typedef.__u_char = uchar
@@ -53,6 +53,7 @@ rbx.platform.typedef.__uint16_t = ushort
53
53
  rbx.platform.typedef.__uint32_t = uint
54
54
  rbx.platform.typedef.__uint64_t = ulong_long
55
55
  rbx.platform.typedef.__uint8_t = uchar
56
+ rbx.platform.typedef.__uintmax_t = ulong_long
56
57
  rbx.platform.typedef.__useconds_t = uint
57
58
  rbx.platform.typedef.blkcnt_t = long_long
58
59
  rbx.platform.typedef.blksize_t = long
@@ -65,11 +66,22 @@ rbx.platform.typedef.fsblkcnt_t = ulong_long
65
66
  rbx.platform.typedef.fsfilcnt_t = ulong_long
66
67
  rbx.platform.typedef.gid_t = uint
67
68
  rbx.platform.typedef.id_t = uint
69
+ rbx.platform.typedef.in_addr_t = uint
70
+ rbx.platform.typedef.in_port_t = ushort
68
71
  rbx.platform.typedef.ino_t = ulong_long
69
72
  rbx.platform.typedef.int16_t = short
70
73
  rbx.platform.typedef.int32_t = int
71
74
  rbx.platform.typedef.int64_t = long_long
72
75
  rbx.platform.typedef.int8_t = char
76
+ rbx.platform.typedef.int_fast16_t = int
77
+ rbx.platform.typedef.int_fast32_t = int
78
+ rbx.platform.typedef.int_fast64_t = long_long
79
+ rbx.platform.typedef.int_fast8_t = char
80
+ rbx.platform.typedef.int_least32_t = int
81
+ rbx.platform.typedef.int_least64_t = long_long
82
+ rbx.platform.typedef.int_least8_t = char
83
+ rbx.platform.typedef.intmax_t = long_long
84
+ rbx.platform.typedef.intptr_t = int
73
85
  rbx.platform.typedef.key_t = int
74
86
  rbx.platform.typedef.loff_t = long_long
75
87
  rbx.platform.typedef.mode_t = uint
@@ -79,6 +91,7 @@ rbx.platform.typedef.pid_t = int
79
91
  rbx.platform.typedef.pthread_key_t = uint
80
92
  rbx.platform.typedef.pthread_once_t = int
81
93
  rbx.platform.typedef.pthread_t = ulong
94
+ rbx.platform.typedef.ptrdiff_t = int
82
95
  rbx.platform.typedef.quad_t = long_long
83
96
  rbx.platform.typedef.register_t = long
84
97
  rbx.platform.typedef.rlim_t = ulong_long
@@ -100,5 +113,20 @@ rbx.platform.typedef.u_quad_t = ulong_long
100
113
  rbx.platform.typedef.u_short = ushort
101
114
  rbx.platform.typedef.uid_t = uint
102
115
  rbx.platform.typedef.uint = uint
116
+ rbx.platform.typedef.uint16_t = ushort
117
+ rbx.platform.typedef.uint32_t = uint
118
+ rbx.platform.typedef.uint64_t = ulong_long
119
+ rbx.platform.typedef.uint8_t = uchar
120
+ rbx.platform.typedef.uint_fast16_t = uint
121
+ rbx.platform.typedef.uint_fast32_t = uint
122
+ rbx.platform.typedef.uint_fast64_t = ulong_long
123
+ rbx.platform.typedef.uint_fast8_t = uchar
124
+ rbx.platform.typedef.uint_least16_t = ushort
125
+ rbx.platform.typedef.uint_least32_t = uint
126
+ rbx.platform.typedef.uint_least64_t = ulong_long
127
+ rbx.platform.typedef.uint_least8_t = uchar
128
+ rbx.platform.typedef.uintmax_t = ulong_long
129
+ rbx.platform.typedef.uintptr_t = uint
103
130
  rbx.platform.typedef.ulong = ulong
104
131
  rbx.platform.typedef.ushort = ushort
132
+ rbx.platform.typedef.wchar_t = uint
@@ -1,105 +1,52 @@
1
- rbx.platform.typedef.*addr_t = char
2
- rbx.platform.typedef.__ULong = ulong
3
- rbx.platform.typedef.__blkcnt32_t = long
4
- rbx.platform.typedef.__blkcnt64_t = long_long
5
- rbx.platform.typedef.__dev16_t = short
6
- rbx.platform.typedef.__dev32_t = ulong
7
- rbx.platform.typedef.__gid16_t = ushort
8
- rbx.platform.typedef.__gid32_t = ulong
9
- rbx.platform.typedef.__ino32_t = ulong
10
- rbx.platform.typedef.__ino64_t = ulong_long
11
- rbx.platform.typedef.__int16_t = short
12
- rbx.platform.typedef.__int32_t = int
13
- rbx.platform.typedef.__int64_t = long_long
14
- rbx.platform.typedef.__int8_t = char
15
- rbx.platform.typedef.__int_least16_t = short
16
- rbx.platform.typedef.__int_least32_t = int
17
- rbx.platform.typedef.__loff_t = long_long
18
- rbx.platform.typedef.__off_t = long
19
- rbx.platform.typedef.__pid_t = int
20
- rbx.platform.typedef.__uid16_t = ushort
21
- rbx.platform.typedef.__uid32_t = ulong
22
- rbx.platform.typedef.__uint16_t = ushort
23
- rbx.platform.typedef.__uint32_t = uint
24
- rbx.platform.typedef.__uint64_t = ulong_long
25
- rbx.platform.typedef.__uint8_t = uchar
26
- rbx.platform.typedef.__uint_least16_t = ushort
27
- rbx.platform.typedef.__uint_least32_t = uint
28
- rbx.platform.typedef._fpos64_t = long_long
29
- rbx.platform.typedef._fpos_t = long
1
+ rbx.platform.typedef.__time32_t = long
2
+ rbx.platform.typedef.__time64_t = long_long
3
+ rbx.platform.typedef._dev_t = uint
4
+ rbx.platform.typedef._ino_t = ushort
5
+ rbx.platform.typedef._mode_t = ushort
30
6
  rbx.platform.typedef._off64_t = long_long
31
7
  rbx.platform.typedef._off_t = long
32
- rbx.platform.typedef._ssize_t = int
33
- rbx.platform.typedef.blkcnt_t = long_long
34
- rbx.platform.typedef.blksize_t = long
35
- rbx.platform.typedef.caddr_t = string
36
- rbx.platform.typedef.clock_t = ulong
37
- rbx.platform.typedef.clockid_t = ulong
38
- rbx.platform.typedef.daddr_t = long
39
- rbx.platform.typedef.dev_t = ulong
40
- rbx.platform.typedef.fd_mask = long
41
- rbx.platform.typedef.fsblkcnt_t = ulong
42
- rbx.platform.typedef.fsfilcnt_t = ulong
43
- rbx.platform.typedef.gid_t = ulong
44
- rbx.platform.typedef.id_t = ulong
45
- rbx.platform.typedef.ino_t = ulong_long
8
+ rbx.platform.typedef._pid_t = int
9
+ rbx.platform.typedef._sigset_t = ulong
10
+ rbx.platform.typedef.dev_t = uint
11
+ rbx.platform.typedef.errno_t = int
12
+ rbx.platform.typedef.ino_t = ushort
46
13
  rbx.platform.typedef.int16_t = short
47
- rbx.platform.typedef.int32_t = long
14
+ rbx.platform.typedef.int32_t = int
48
15
  rbx.platform.typedef.int64_t = long_long
49
16
  rbx.platform.typedef.int8_t = char
50
- rbx.platform.typedef.int_fast16_t = long
51
- rbx.platform.typedef.int_fast32_t = long
17
+ rbx.platform.typedef.int_fast16_t = short
18
+ rbx.platform.typedef.int_fast32_t = int
52
19
  rbx.platform.typedef.int_fast64_t = long_long
53
20
  rbx.platform.typedef.int_fast8_t = char
54
21
  rbx.platform.typedef.int_least16_t = short
55
- rbx.platform.typedef.int_least32_t = long
22
+ rbx.platform.typedef.int_least32_t = int
56
23
  rbx.platform.typedef.int_least64_t = long_long
57
24
  rbx.platform.typedef.int_least8_t = char
58
25
  rbx.platform.typedef.intmax_t = long_long
59
- rbx.platform.typedef.intptr_t = long
60
- rbx.platform.typedef.key_t = long_long
61
- rbx.platform.typedef.loff_t = long_long
62
- rbx.platform.typedef.nlink_t = ushort
26
+ rbx.platform.typedef.intptr_t = int
27
+ rbx.platform.typedef.mode_t = ushort
28
+ rbx.platform.typedef.off32_t = long
29
+ rbx.platform.typedef.off64_t = long_long
63
30
  rbx.platform.typedef.off_t = long_long
64
31
  rbx.platform.typedef.pid_t = int
65
32
  rbx.platform.typedef.ptrdiff_t = int
66
- rbx.platform.typedef.register_t = int
67
- rbx.platform.typedef.rlim_t = ulong
68
- rbx.platform.typedef.sa_family_t = ushort
69
- rbx.platform.typedef.sig_atomic_t = int
70
- rbx.platform.typedef.sigset_t = ulong
33
+ rbx.platform.typedef.rsize_t = uint
71
34
  rbx.platform.typedef.size_t = uint
72
- rbx.platform.typedef.socklen_t = int
73
35
  rbx.platform.typedef.ssize_t = int
74
- rbx.platform.typedef.suseconds_t = long
75
36
  rbx.platform.typedef.time_t = long
76
- rbx.platform.typedef.timer_t = ulong
77
- rbx.platform.typedef.u_char = uchar
78
- rbx.platform.typedef.u_int = uint
79
- rbx.platform.typedef.u_int16_t = ushort
80
- rbx.platform.typedef.u_int32_t = uint
81
- rbx.platform.typedef.u_int64_t = ulong_long
82
- rbx.platform.typedef.u_int8_t = uchar
83
- rbx.platform.typedef.u_long = ulong
84
- rbx.platform.typedef.u_short = ushort
85
- rbx.platform.typedef.uid_t = ulong
86
- rbx.platform.typedef.uint = uint
87
37
  rbx.platform.typedef.uint16_t = ushort
88
- rbx.platform.typedef.uint32_t = ulong
89
38
  rbx.platform.typedef.uint64_t = ulong_long
90
39
  rbx.platform.typedef.uint8_t = uchar
91
- rbx.platform.typedef.uint_fast16_t = ulong
92
- rbx.platform.typedef.uint_fast32_t = ulong
40
+ rbx.platform.typedef.uint_fast16_t = ushort
41
+ rbx.platform.typedef.uint_fast32_t = uint
93
42
  rbx.platform.typedef.uint_fast64_t = ulong_long
94
43
  rbx.platform.typedef.uint_fast8_t = uchar
95
44
  rbx.platform.typedef.uint_least16_t = ushort
96
- rbx.platform.typedef.uint_least32_t = ulong
97
45
  rbx.platform.typedef.uint_least64_t = ulong_long
98
46
  rbx.platform.typedef.uint_least8_t = uchar
99
47
  rbx.platform.typedef.uintmax_t = ulong_long
100
- rbx.platform.typedef.uintptr_t = ulong
101
- rbx.platform.typedef.useconds_t = ulong
102
- rbx.platform.typedef.ushort = ushort
103
- rbx.platform.typedef.vm_offset_t = ulong
104
- rbx.platform.typedef.vm_size_t = ulong
105
- rbx.platform.typedef.wint_t = uint
48
+ rbx.platform.typedef.uintptr_t = uint
49
+ rbx.platform.typedef.useconds_t = uint
50
+ rbx.platform.typedef.wchar_t = ushort
51
+ rbx.platform.typedef.wctype_t = ushort
52
+ rbx.platform.typedef.wint_t = ushort
@@ -12,6 +12,7 @@ rbx.platform.typedef.__fsblkcnt64_t = ulong_long
12
12
  rbx.platform.typedef.__fsblkcnt_t = ulong
13
13
  rbx.platform.typedef.__fsfilcnt64_t = ulong_long
14
14
  rbx.platform.typedef.__fsfilcnt_t = ulong
15
+ rbx.platform.typedef.__fsword_t = int
15
16
  rbx.platform.typedef.__gid_t = uint
16
17
  rbx.platform.typedef.__id_t = uint
17
18
  rbx.platform.typedef.__ino64_t = ulong_long
@@ -38,7 +39,8 @@ rbx.platform.typedef.__sig_atomic_t = int
38
39
  rbx.platform.typedef.__socklen_t = uint
39
40
  rbx.platform.typedef.__ssize_t = int
40
41
  rbx.platform.typedef.__suseconds_t = long
41
- rbx.platform.typedef.__swblk_t = long
42
+ rbx.platform.typedef.__syscall_slong_t = long
43
+ rbx.platform.typedef.__syscall_ulong_t = ulong
42
44
  rbx.platform.typedef.__time_t = long
43
45
  rbx.platform.typedef.__timer_t = pointer
44
46
  rbx.platform.typedef.__u_char = uchar
@@ -53,6 +55,8 @@ rbx.platform.typedef.__uint64_t = ulong_long
53
55
  rbx.platform.typedef.__uint8_t = uchar
54
56
  rbx.platform.typedef.__useconds_t = uint
55
57
  rbx.platform.typedef.blkcnt_t = long_long
58
+ rbx.platform.typedef.blksize_t = long
59
+ rbx.platform.typedef.clock_t = long
56
60
  rbx.platform.typedef.clockid_t = int
57
61
  rbx.platform.typedef.daddr_t = int
58
62
  rbx.platform.typedef.dev_t = ulong_long
@@ -61,11 +65,21 @@ rbx.platform.typedef.fsblkcnt_t = ulong_long
61
65
  rbx.platform.typedef.fsfilcnt_t = ulong_long
62
66
  rbx.platform.typedef.gid_t = uint
63
67
  rbx.platform.typedef.id_t = uint
68
+ rbx.platform.typedef.in_addr_t = uint
69
+ rbx.platform.typedef.in_port_t = ushort
64
70
  rbx.platform.typedef.ino_t = ulong_long
65
- rbx.platform.typedef.int16_t = short
66
71
  rbx.platform.typedef.int32_t = int
67
72
  rbx.platform.typedef.int64_t = long_long
68
73
  rbx.platform.typedef.int8_t = char
74
+ rbx.platform.typedef.int_fast16_t = int
75
+ rbx.platform.typedef.int_fast32_t = int
76
+ rbx.platform.typedef.int_fast64_t = long_long
77
+ rbx.platform.typedef.int_fast8_t = char
78
+ rbx.platform.typedef.int_least32_t = int
79
+ rbx.platform.typedef.int_least64_t = long_long
80
+ rbx.platform.typedef.int_least8_t = char
81
+ rbx.platform.typedef.intmax_t = long_long
82
+ rbx.platform.typedef.intptr_t = int
69
83
  rbx.platform.typedef.key_t = int
70
84
  rbx.platform.typedef.loff_t = long_long
71
85
  rbx.platform.typedef.mode_t = uint
@@ -75,6 +89,7 @@ rbx.platform.typedef.pid_t = int
75
89
  rbx.platform.typedef.pthread_key_t = uint
76
90
  rbx.platform.typedef.pthread_once_t = int
77
91
  rbx.platform.typedef.pthread_t = ulong
92
+ rbx.platform.typedef.ptrdiff_t = int
78
93
  rbx.platform.typedef.quad_t = long_long
79
94
  rbx.platform.typedef.register_t = long
80
95
  rbx.platform.typedef.rlim_t = ulong_long
@@ -96,5 +111,20 @@ rbx.platform.typedef.u_quad_t = ulong_long
96
111
  rbx.platform.typedef.u_short = ushort
97
112
  rbx.platform.typedef.uid_t = uint
98
113
  rbx.platform.typedef.uint = uint
114
+ rbx.platform.typedef.uint16_t = ushort
115
+ rbx.platform.typedef.uint32_t = uint
116
+ rbx.platform.typedef.uint64_t = ulong_long
117
+ rbx.platform.typedef.uint8_t = uchar
118
+ rbx.platform.typedef.uint_fast16_t = uint
119
+ rbx.platform.typedef.uint_fast32_t = uint
120
+ rbx.platform.typedef.uint_fast64_t = ulong_long
121
+ rbx.platform.typedef.uint_fast8_t = uchar
122
+ rbx.platform.typedef.uint_least16_t = ushort
123
+ rbx.platform.typedef.uint_least32_t = uint
124
+ rbx.platform.typedef.uint_least64_t = ulong_long
125
+ rbx.platform.typedef.uint_least8_t = uchar
126
+ rbx.platform.typedef.uintmax_t = ulong_long
127
+ rbx.platform.typedef.uintptr_t = uint
99
128
  rbx.platform.typedef.ulong = ulong
100
129
  rbx.platform.typedef.ushort = ushort
130
+ rbx.platform.typedef.wchar_t = long
@@ -0,0 +1,156 @@
1
+ rbx.platform.typedef.__blkcnt_t = long_long
2
+ rbx.platform.typedef.__blksize_t = int
3
+ rbx.platform.typedef.__clock_t = long_long
4
+ rbx.platform.typedef.__clockid_t = int
5
+ rbx.platform.typedef.__cpuid_t = ulong
6
+ rbx.platform.typedef.__dev_t = int
7
+ rbx.platform.typedef.__fd_mask = uint
8
+ rbx.platform.typedef.__fixpt_t = uint
9
+ rbx.platform.typedef.__fsblkcnt_t = ulong_long
10
+ rbx.platform.typedef.__fsfilcnt_t = ulong_long
11
+ rbx.platform.typedef.__gid_t = uint
12
+ rbx.platform.typedef.__id_t = uint
13
+ rbx.platform.typedef.__in_addr_t = uint
14
+ rbx.platform.typedef.__in_port_t = ushort
15
+ rbx.platform.typedef.__ino_t = ulong_long
16
+ rbx.platform.typedef.__int16_t = short
17
+ rbx.platform.typedef.__int32_t = int
18
+ rbx.platform.typedef.__int64_t = long_long
19
+ rbx.platform.typedef.__int8_t = char
20
+ rbx.platform.typedef.__int_fast16_t = int
21
+ rbx.platform.typedef.__int_fast32_t = int
22
+ rbx.platform.typedef.__int_fast64_t = long_long
23
+ rbx.platform.typedef.__int_fast8_t = int
24
+ rbx.platform.typedef.__int_least16_t = short
25
+ rbx.platform.typedef.__int_least32_t = int
26
+ rbx.platform.typedef.__int_least64_t = long_long
27
+ rbx.platform.typedef.__int_least8_t = char
28
+ rbx.platform.typedef.__intmax_t = long_long
29
+ rbx.platform.typedef.__intptr_t = long
30
+ rbx.platform.typedef.__key_t = long
31
+ rbx.platform.typedef.__mode_t = uint
32
+ rbx.platform.typedef.__nlink_t = uint
33
+ rbx.platform.typedef.__off_t = long_long
34
+ rbx.platform.typedef.__paddr_t = ulong
35
+ rbx.platform.typedef.__pid_t = int
36
+ rbx.platform.typedef.__psize_t = ulong
37
+ rbx.platform.typedef.__ptrdiff_t = long
38
+ rbx.platform.typedef.__register_t = long
39
+ rbx.platform.typedef.__rlim_t = ulong_long
40
+ rbx.platform.typedef.__rune_t = int
41
+ rbx.platform.typedef.__sa_family_t = uchar
42
+ rbx.platform.typedef.__segsz_t = int
43
+ rbx.platform.typedef.__size_t = ulong
44
+ rbx.platform.typedef.__socklen_t = uint
45
+ rbx.platform.typedef.__ssize_t = long
46
+ rbx.platform.typedef.__suseconds_t = long
47
+ rbx.platform.typedef.__swblk_t = int
48
+ rbx.platform.typedef.__time_t = long_long
49
+ rbx.platform.typedef.__timer_t = int
50
+ rbx.platform.typedef.__uid_t = uint
51
+ rbx.platform.typedef.__uint16_t = ushort
52
+ rbx.platform.typedef.__uint32_t = uint
53
+ rbx.platform.typedef.__uint64_t = ulong_long
54
+ rbx.platform.typedef.__uint8_t = uchar
55
+ rbx.platform.typedef.__uint_fast16_t = uint
56
+ rbx.platform.typedef.__uint_fast32_t = uint
57
+ rbx.platform.typedef.__uint_fast64_t = ulong_long
58
+ rbx.platform.typedef.__uint_fast8_t = uint
59
+ rbx.platform.typedef.__uint_least16_t = ushort
60
+ rbx.platform.typedef.__uint_least32_t = uint
61
+ rbx.platform.typedef.__uint_least64_t = ulong_long
62
+ rbx.platform.typedef.__uint_least8_t = uchar
63
+ rbx.platform.typedef.__uintmax_t = ulong_long
64
+ rbx.platform.typedef.__uintptr_t = ulong
65
+ rbx.platform.typedef.__useconds_t = uint
66
+ rbx.platform.typedef.__vaddr_t = ulong
67
+ rbx.platform.typedef.__vsize_t = ulong
68
+ rbx.platform.typedef.__wchar_t = int
69
+ rbx.platform.typedef.__wctrans_t = pointer
70
+ rbx.platform.typedef.__wctype_t = pointer
71
+ rbx.platform.typedef.__wint_t = int
72
+ rbx.platform.typedef.blkcnt_t = long_long
73
+ rbx.platform.typedef.blksize_t = int
74
+ rbx.platform.typedef.caddr_t = string
75
+ rbx.platform.typedef.clock_t = long_long
76
+ rbx.platform.typedef.clockid_t = int
77
+ rbx.platform.typedef.cpuid_t = ulong
78
+ rbx.platform.typedef.daddr32_t = int
79
+ rbx.platform.typedef.daddr_t = long_long
80
+ rbx.platform.typedef.dev_t = int
81
+ rbx.platform.typedef.fixpt_t = uint
82
+ rbx.platform.typedef.fsblkcnt_t = ulong_long
83
+ rbx.platform.typedef.fsfilcnt_t = ulong_long
84
+ rbx.platform.typedef.gid_t = uint
85
+ rbx.platform.typedef.id_t = uint
86
+ rbx.platform.typedef.in_addr_t = uint
87
+ rbx.platform.typedef.in_port_t = ushort
88
+ rbx.platform.typedef.ino_t = ulong_long
89
+ rbx.platform.typedef.int16_t = short
90
+ rbx.platform.typedef.int32_t = int
91
+ rbx.platform.typedef.int64_t = long_long
92
+ rbx.platform.typedef.int8_t = char
93
+ rbx.platform.typedef.int_fast16_t = int
94
+ rbx.platform.typedef.int_fast32_t = int
95
+ rbx.platform.typedef.int_fast64_t = long_long
96
+ rbx.platform.typedef.int_fast8_t = int
97
+ rbx.platform.typedef.int_least16_t = short
98
+ rbx.platform.typedef.int_least32_t = int
99
+ rbx.platform.typedef.int_least64_t = long_long
100
+ rbx.platform.typedef.int_least8_t = char
101
+ rbx.platform.typedef.intmax_t = long_long
102
+ rbx.platform.typedef.intptr_t = long
103
+ rbx.platform.typedef.key_t = long
104
+ rbx.platform.typedef.mode_t = uint
105
+ rbx.platform.typedef.nlink_t = uint
106
+ rbx.platform.typedef.off_t = long_long
107
+ rbx.platform.typedef.paddr_t = ulong
108
+ rbx.platform.typedef.pid_t = int
109
+ rbx.platform.typedef.psize_t = ulong
110
+ rbx.platform.typedef.ptrdiff_t = long
111
+ rbx.platform.typedef.quad_t = long_long
112
+ rbx.platform.typedef.register_t = long
113
+ rbx.platform.typedef.rlim_t = ulong_long
114
+ rbx.platform.typedef.sa_family_t = uchar
115
+ rbx.platform.typedef.segsz_t = int
116
+ rbx.platform.typedef.sigset_t = uint
117
+ rbx.platform.typedef.size_t = ulong
118
+ rbx.platform.typedef.socklen_t = uint
119
+ rbx.platform.typedef.ssize_t = long
120
+ rbx.platform.typedef.suseconds_t = long
121
+ rbx.platform.typedef.swblk_t = int
122
+ rbx.platform.typedef.time_t = long_long
123
+ rbx.platform.typedef.timer_t = int
124
+ rbx.platform.typedef.u_char = uchar
125
+ rbx.platform.typedef.u_int = uint
126
+ rbx.platform.typedef.u_int16_t = ushort
127
+ rbx.platform.typedef.u_int32_t = uint
128
+ rbx.platform.typedef.u_int64_t = ulong_long
129
+ rbx.platform.typedef.u_int8_t = uchar
130
+ rbx.platform.typedef.u_long = ulong
131
+ rbx.platform.typedef.u_quad_t = ulong_long
132
+ rbx.platform.typedef.u_short = ushort
133
+ rbx.platform.typedef.uid_t = uint
134
+ rbx.platform.typedef.uint = uint
135
+ rbx.platform.typedef.uint16_t = ushort
136
+ rbx.platform.typedef.uint32_t = uint
137
+ rbx.platform.typedef.uint64_t = ulong_long
138
+ rbx.platform.typedef.uint8_t = uchar
139
+ rbx.platform.typedef.uint_fast16_t = uint
140
+ rbx.platform.typedef.uint_fast32_t = uint
141
+ rbx.platform.typedef.uint_fast64_t = ulong_long
142
+ rbx.platform.typedef.uint_fast8_t = uint
143
+ rbx.platform.typedef.uint_least16_t = ushort
144
+ rbx.platform.typedef.uint_least32_t = uint
145
+ rbx.platform.typedef.uint_least64_t = ulong_long
146
+ rbx.platform.typedef.uint_least8_t = uchar
147
+ rbx.platform.typedef.uintmax_t = ulong_long
148
+ rbx.platform.typedef.uintptr_t = ulong
149
+ rbx.platform.typedef.ulong = ulong
150
+ rbx.platform.typedef.unchar = uchar
151
+ rbx.platform.typedef.useconds_t = uint
152
+ rbx.platform.typedef.ushort = ushort
153
+ rbx.platform.typedef.vaddr_t = ulong
154
+ rbx.platform.typedef.vsize_t = ulong
155
+ rbx.platform.typedef.wchar_t = int
156
+ rbx.platform.typedef.wint_t = int