ffi 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

Files changed (56) hide show
  1. data/Rakefile +4 -4
  2. data/ext/ffi_c/AbstractMemory.c +367 -14
  3. data/ext/ffi_c/AbstractMemory.h +4 -0
  4. data/ext/ffi_c/ArrayType.c +28 -0
  5. data/ext/ffi_c/Buffer.c +101 -25
  6. data/ext/ffi_c/Call.c +8 -5
  7. data/ext/ffi_c/ClosurePool.c +9 -8
  8. data/ext/ffi_c/DataConverter.c +29 -0
  9. data/ext/ffi_c/DynamicLibrary.c +64 -1
  10. data/ext/ffi_c/Function.c +111 -10
  11. data/ext/ffi_c/FunctionInfo.c +13 -1
  12. data/ext/ffi_c/LastError.c +16 -0
  13. data/ext/ffi_c/MappedType.c +22 -0
  14. data/ext/ffi_c/MemoryPointer.c +11 -1
  15. data/ext/ffi_c/MethodHandle.c +18 -11
  16. data/ext/ffi_c/Platform.c +9 -3
  17. data/ext/ffi_c/Pointer.c +98 -0
  18. data/ext/ffi_c/Struct.c +4 -4
  19. data/ext/ffi_c/Struct.h +2 -1
  20. data/ext/ffi_c/StructLayout.c +2 -2
  21. data/ext/ffi_c/Thread.c +124 -1
  22. data/ext/ffi_c/Type.c +108 -17
  23. data/ext/ffi_c/Types.c +9 -2
  24. data/ext/ffi_c/Variadic.c +5 -4
  25. data/ext/ffi_c/compat.h +8 -0
  26. data/ext/ffi_c/endian.h +7 -1
  27. data/ext/ffi_c/extconf.rb +46 -35
  28. data/ext/ffi_c/ffi.c +5 -0
  29. data/ext/ffi_c/libffi.darwin.mk +15 -15
  30. data/ext/ffi_c/libffi.gnu.mk +3 -3
  31. data/ext/ffi_c/libffi.mk +4 -4
  32. data/lib/ffi.rb +13 -9
  33. data/lib/ffi/autopointer.rb +88 -26
  34. data/lib/ffi/enum.rb +42 -0
  35. data/lib/ffi/errno.rb +6 -1
  36. data/lib/ffi/ffi.rb +1 -0
  37. data/lib/ffi/io.rb +13 -2
  38. data/lib/ffi/library.rb +212 -19
  39. data/lib/ffi/memorypointer.rb +1 -33
  40. data/lib/ffi/platform.rb +23 -7
  41. data/lib/ffi/platform/i386-freebsd/types.conf +152 -0
  42. data/lib/ffi/platform/i386-netbsd/types.conf +126 -0
  43. data/lib/ffi/platform/x86_64-freebsd/types.conf +126 -0
  44. data/lib/ffi/platform/x86_64-netbsd/types.conf +126 -0
  45. data/lib/ffi/pointer.rb +44 -0
  46. data/lib/ffi/struct.rb +1 -1
  47. data/lib/ffi/struct_layout_builder.rb +2 -1
  48. data/lib/ffi/tools/const_generator.rb +72 -17
  49. data/lib/ffi/types.rb +21 -1
  50. data/spec/ffi/rbx/memory_pointer_spec.rb +4 -2
  51. data/spec/ffi/struct_spec.rb +10 -0
  52. data/spec/ffi/typedef_spec.rb +11 -0
  53. data/tasks/extension.rake +0 -1
  54. data/tasks/gem.rake +0 -1
  55. data/tasks/yard.rake +11 -0
  56. metadata +15 -8
@@ -1,33 +1 @@
1
- #
2
- # Copyright (C) 2008, 2009 Wayne Meissner
3
- # All rights reserved.
4
- #
5
- # All rights reserved.
6
- #
7
- # This file is part of ruby-ffi.
8
- #
9
- # This code is free software: you can redistribute it and/or modify it under
10
- # the terms of the GNU Lesser General Public License version 3 only, as
11
- # published by the Free Software Foundation.
12
- #
13
- # This code is distributed in the hope that it will be useful, but WITHOUT
14
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16
- # version 3 for more details.
17
- #
18
- # You should have received a copy of the GNU Lesser General Public License
19
- # version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
20
- #
21
-
22
- require 'ffi/pointer'
23
- module FFI
24
- class MemoryPointer
25
-
26
- def self.from_string(s)
27
- ptr = self.new(s.bytesize + 1, 1, false)
28
- ptr.put_string(0, s)
29
- ptr
30
- end
31
-
32
- end
33
- end
1
+ # This class is now implemented in C
@@ -20,11 +20,15 @@
20
20
  #
21
21
 
22
22
  require 'rbconfig'
23
+ require 'ffi_c'
24
+
23
25
  module FFI
24
26
  class PlatformError < LoadError; end
25
27
 
28
+ # This module defines different constants and class methods to play with
29
+ # various platforms.
26
30
  module Platform
27
- OS = case Config::CONFIG['host_os'].downcase
31
+ OS = case RbConfig::CONFIG['host_os'].downcase
28
32
  when /linux/
29
33
  "linux"
30
34
  when /darwin/
@@ -35,10 +39,10 @@ module FFI
35
39
  "openbsd"
36
40
  when /sunos|solaris/
37
41
  "solaris"
38
- when /win|mingw/
42
+ when /mingw|mswin/
39
43
  "windows"
40
44
  else
41
- Config::CONFIG['host_os'].downcase
45
+ RbConfig::CONFIG['host_os'].downcase
42
46
  end
43
47
 
44
48
  ARCH = case CPU.downcase
@@ -49,22 +53,26 @@ module FFI
49
53
  when /ppc|powerpc/
50
54
  "powerpc"
51
55
  else
52
- Config::CONFIG['host_cpu']
56
+ RbConfig::CONFIG['host_cpu']
53
57
  end
54
58
 
55
59
  private
60
+ # @param [String) os
61
+ # @return [Boolean]
62
+ # Test if current OS is +os+.
56
63
  def self.is_os(os)
57
64
  OS == os
58
65
  end
59
66
 
60
67
  NAME = "#{ARCH}-#{OS}"
68
+ IS_GNU = defined?(GNU_LIBC)
61
69
  IS_LINUX = is_os("linux")
62
70
  IS_MAC = is_os("darwin")
63
71
  IS_FREEBSD = is_os("freebsd")
64
72
  IS_OPENBSD = is_os("openbsd")
65
73
  IS_WINDOWS = is_os("windows")
66
74
  IS_BSD = IS_MAC || IS_FREEBSD || IS_OPENBSD
67
- CONF_DIR = File.join(File.dirname(__FILE__), 'platform', ARCH.to_s + "-" + OS.to_s)
75
+ CONF_DIR = File.join(File.dirname(__FILE__), 'platform', NAME)
68
76
  public
69
77
 
70
78
 
@@ -85,24 +93,32 @@ module FFI
85
93
 
86
94
  LIBC = if IS_WINDOWS
87
95
  "msvcrt.dll"
88
- elsif IS_LINUX
89
- "libc.so.6"
96
+ elsif IS_GNU
97
+ GNU_LIBC
90
98
  else
91
99
  "#{LIBPREFIX}c.#{LIBSUFFIX}"
92
100
  end
93
101
 
102
+ # Test if current OS is a *BSD (include MAC)
103
+ # @return [Boolean]
94
104
  def self.bsd?
95
105
  IS_BSD
96
106
  end
97
107
 
108
+ # Test if current OS is Windows
109
+ # @return [Boolean]
98
110
  def self.windows?
99
111
  IS_WINDOWS
100
112
  end
101
113
 
114
+ # Test if current OS is Mac OS
115
+ # @return [Boolean]
102
116
  def self.mac?
103
117
  IS_MAC
104
118
  end
105
119
 
120
+ # Test if current OS is a unix OS
121
+ # @return [Boolean]
106
122
  def self.unix?
107
123
  !IS_WINDOWS
108
124
  end
@@ -0,0 +1,152 @@
1
+ rbx.platform.typedef.__int8_t = char
2
+ rbx.platform.typedef.__uint8_t = uchar
3
+ rbx.platform.typedef.__int16_t = short
4
+ rbx.platform.typedef.__uint16_t = ushort
5
+ rbx.platform.typedef.__int32_t = int
6
+ rbx.platform.typedef.__uint32_t = uint
7
+ rbx.platform.typedef.__int64_t = long_long
8
+ rbx.platform.typedef.__uint64_t = ulong_long
9
+ rbx.platform.typedef.__clock_t = ulong
10
+ rbx.platform.typedef.__cpumask_t = uint
11
+ rbx.platform.typedef.__critical_t = int
12
+ rbx.platform.typedef.__intfptr_t = int
13
+ rbx.platform.typedef.__intmax_t = long_long
14
+ rbx.platform.typedef.__intptr_t = int
15
+ rbx.platform.typedef.__int_fast8_t = int
16
+ rbx.platform.typedef.__int_fast16_t = int
17
+ rbx.platform.typedef.__int_fast32_t = int
18
+ rbx.platform.typedef.__int_fast64_t = long_long
19
+ rbx.platform.typedef.__int_least8_t = char
20
+ rbx.platform.typedef.__int_least16_t = short
21
+ rbx.platform.typedef.__int_least32_t = int
22
+ rbx.platform.typedef.__int_least64_t = long_long
23
+ rbx.platform.typedef.__ptrdiff_t = int
24
+ rbx.platform.typedef.__register_t = int
25
+ rbx.platform.typedef.__segsz_t = int
26
+ rbx.platform.typedef.__size_t = uint
27
+ rbx.platform.typedef.__ssize_t = int
28
+ rbx.platform.typedef.__time_t = int
29
+ rbx.platform.typedef.__uintfptr_t = uint
30
+ rbx.platform.typedef.__uintmax_t = ulong_long
31
+ rbx.platform.typedef.__uintptr_t = uint
32
+ rbx.platform.typedef.__uint_fast8_t = uint
33
+ rbx.platform.typedef.__uint_fast16_t = uint
34
+ rbx.platform.typedef.__uint_fast32_t = uint
35
+ rbx.platform.typedef.__uint_fast64_t = ulong_long
36
+ rbx.platform.typedef.__uint_least8_t = uchar
37
+ rbx.platform.typedef.__uint_least16_t = ushort
38
+ rbx.platform.typedef.__uint_least32_t = uint
39
+ rbx.platform.typedef.__uint_least64_t = ulong_long
40
+ rbx.platform.typedef.__u_register_t = uint
41
+ rbx.platform.typedef.__vm_offset_t = uint
42
+ rbx.platform.typedef.__vm_ooffset_t = long_long
43
+ rbx.platform.typedef.__vm_paddr_t = uint
44
+ rbx.platform.typedef.__vm_pindex_t = ulong_long
45
+ rbx.platform.typedef.__vm_size_t = uint
46
+ rbx.platform.typedef.__blksize_t = uint
47
+ rbx.platform.typedef.__blkcnt_t = long_long
48
+ rbx.platform.typedef.__clockid_t = int
49
+ rbx.platform.typedef.__fflags_t = uint
50
+ rbx.platform.typedef.__fsblkcnt_t = ulong_long
51
+ rbx.platform.typedef.__fsfilcnt_t = ulong_long
52
+ rbx.platform.typedef.__gid_t = uint
53
+ rbx.platform.typedef.__id_t = long_long
54
+ rbx.platform.typedef.__ino_t = uint
55
+ rbx.platform.typedef.__key_t = long
56
+ rbx.platform.typedef.__lwpid_t = int
57
+ rbx.platform.typedef.__mode_t = ushort
58
+ rbx.platform.typedef.__accmode_t = int
59
+ rbx.platform.typedef.__nl_item = int
60
+ rbx.platform.typedef.__nlink_t = ushort
61
+ rbx.platform.typedef.__off_t = long_long
62
+ rbx.platform.typedef.__pid_t = int
63
+ rbx.platform.typedef.__rlim_t = long_long
64
+ rbx.platform.typedef.__sa_family_t = uchar
65
+ rbx.platform.typedef.__socklen_t = uint
66
+ rbx.platform.typedef.__suseconds_t = long
67
+ rbx.platform.typedef.__uid_t = uint
68
+ rbx.platform.typedef.__useconds_t = uint
69
+ rbx.platform.typedef.__cpuwhich_t = int
70
+ rbx.platform.typedef.__cpulevel_t = int
71
+ rbx.platform.typedef.__cpusetid_t = int
72
+ rbx.platform.typedef.__ct_rune_t = int
73
+ rbx.platform.typedef.__rune_t = int
74
+ rbx.platform.typedef.__wchar_t = int
75
+ rbx.platform.typedef.__wint_t = int
76
+ rbx.platform.typedef.__wint_t = int
77
+ rbx.platform.typedef.__dev_t = uint
78
+ rbx.platform.typedef.__fixpt_t = uint
79
+ rbx.platform.typedef.pthread_key_t = int
80
+ rbx.platform.typedef.*) = pointer
81
+ rbx.platform.typedef.u_char = uchar
82
+ rbx.platform.typedef.u_short = ushort
83
+ rbx.platform.typedef.u_int = uint
84
+ rbx.platform.typedef.u_long = ulong
85
+ rbx.platform.typedef.ushort = ushort
86
+ rbx.platform.typedef.uint = uint
87
+ rbx.platform.typedef.int8_t = char
88
+ rbx.platform.typedef.int16_t = short
89
+ rbx.platform.typedef.int32_t = int
90
+ rbx.platform.typedef.int64_t = long_long
91
+ rbx.platform.typedef.uint8_t = uchar
92
+ rbx.platform.typedef.uint16_t = ushort
93
+ rbx.platform.typedef.uint32_t = uint
94
+ rbx.platform.typedef.uint64_t = ulong_long
95
+ rbx.platform.typedef.intptr_t = int
96
+ rbx.platform.typedef.uintptr_t = uint
97
+ rbx.platform.typedef.u_int8_t = uchar
98
+ rbx.platform.typedef.u_int16_t = ushort
99
+ rbx.platform.typedef.u_int32_t = uint
100
+ rbx.platform.typedef.u_int64_t = ulong_long
101
+ rbx.platform.typedef.u_quad_t = ulong_long
102
+ rbx.platform.typedef.quad_t = long_long
103
+ rbx.platform.typedef.qaddr_t = pointer
104
+ rbx.platform.typedef.caddr_t = string
105
+ rbx.platform.typedef.c_caddr_t = pointer
106
+ rbx.platform.typedef.blksize_t = uint
107
+ rbx.platform.typedef.cpuwhich_t = int
108
+ rbx.platform.typedef.cpulevel_t = int
109
+ rbx.platform.typedef.cpusetid_t = int
110
+ rbx.platform.typedef.blkcnt_t = long_long
111
+ rbx.platform.typedef.clock_t = ulong
112
+ rbx.platform.typedef.clockid_t = int
113
+ rbx.platform.typedef.cpumask_t = uint
114
+ rbx.platform.typedef.critical_t = int
115
+ rbx.platform.typedef.daddr_t = long_long
116
+ rbx.platform.typedef.dev_t = uint
117
+ rbx.platform.typedef.fflags_t = uint
118
+ rbx.platform.typedef.fixpt_t = uint
119
+ rbx.platform.typedef.fsblkcnt_t = ulong_long
120
+ rbx.platform.typedef.fsfilcnt_t = ulong_long
121
+ rbx.platform.typedef.gid_t = uint
122
+ rbx.platform.typedef.in_addr_t = uint
123
+ rbx.platform.typedef.in_port_t = ushort
124
+ rbx.platform.typedef.id_t = long_long
125
+ rbx.platform.typedef.ino_t = uint
126
+ rbx.platform.typedef.key_t = long
127
+ rbx.platform.typedef.lwpid_t = int
128
+ rbx.platform.typedef.mode_t = ushort
129
+ rbx.platform.typedef.accmode_t = int
130
+ rbx.platform.typedef.nlink_t = ushort
131
+ rbx.platform.typedef.off_t = long_long
132
+ rbx.platform.typedef.pid_t = int
133
+ rbx.platform.typedef.register_t = int
134
+ rbx.platform.typedef.rlim_t = long_long
135
+ rbx.platform.typedef.segsz_t = int
136
+ rbx.platform.typedef.size_t = uint
137
+ rbx.platform.typedef.ssize_t = int
138
+ rbx.platform.typedef.suseconds_t = long
139
+ rbx.platform.typedef.time_t = int
140
+ rbx.platform.typedef.u_register_t = uint
141
+ rbx.platform.typedef.uid_t = uint
142
+ rbx.platform.typedef.useconds_t = uint
143
+ rbx.platform.typedef.vm_offset_t = uint
144
+ rbx.platform.typedef.vm_ooffset_t = long_long
145
+ rbx.platform.typedef.vm_paddr_t = uint
146
+ rbx.platform.typedef.vm_pindex_t = ulong_long
147
+ rbx.platform.typedef.vm_size_t = uint
148
+ rbx.platform.typedef.__fd_mask = ulong
149
+ rbx.platform.typedef.fd_mask = ulong
150
+ rbx.platform.typedef.sa_family_t = uchar
151
+ rbx.platform.typedef.socklen_t = uint
152
+
@@ -0,0 +1,126 @@
1
+ rbx.platform.typedef.__int8_t = char
2
+ rbx.platform.typedef.__uint8_t = uchar
3
+ rbx.platform.typedef.__int16_t = short
4
+ rbx.platform.typedef.__uint16_t = ushort
5
+ rbx.platform.typedef.__int32_t = int
6
+ rbx.platform.typedef.__uint32_t = uint
7
+ rbx.platform.typedef.__int64_t = long_long
8
+ rbx.platform.typedef.__uint64_t = ulong_long
9
+ rbx.platform.typedef.__int_least8_t = char
10
+ rbx.platform.typedef.__uint_least8_t = uchar
11
+ rbx.platform.typedef.__int_least16_t = short
12
+ rbx.platform.typedef.__uint_least16_t = ushort
13
+ rbx.platform.typedef.__int_least32_t = int
14
+ rbx.platform.typedef.__uint_least32_t = uint
15
+ rbx.platform.typedef.__int_least64_t = long_long
16
+ rbx.platform.typedef.__uint_least64_t = ulong_long
17
+ rbx.platform.typedef.__int_fast8_t = int
18
+ rbx.platform.typedef.__uint_fast8_t = uint
19
+ rbx.platform.typedef.__int_fast16_t = int
20
+ rbx.platform.typedef.__uint_fast16_t = uint
21
+ rbx.platform.typedef.__int_fast32_t = int
22
+ rbx.platform.typedef.__uint_fast32_t = uint
23
+ rbx.platform.typedef.__int_fast64_t = long_long
24
+ rbx.platform.typedef.__uint_fast64_t = ulong_long
25
+ rbx.platform.typedef.__intptr_t = long
26
+ rbx.platform.typedef.__uintptr_t = ulong
27
+ rbx.platform.typedef.__intmax_t = long_long
28
+ rbx.platform.typedef.__uintmax_t = ulong_long
29
+ rbx.platform.typedef.__register_t = int
30
+ rbx.platform.typedef.__vaddr_t = ulong
31
+ rbx.platform.typedef.__paddr_t = ulong
32
+ rbx.platform.typedef.__vsize_t = ulong
33
+ rbx.platform.typedef.__psize_t = ulong
34
+ rbx.platform.typedef.__clock_t = int
35
+ rbx.platform.typedef.__clockid_t = int
36
+ rbx.platform.typedef.__off_t = long_long
37
+ rbx.platform.typedef.__ptrdiff_t = long
38
+ rbx.platform.typedef.__size_t = ulong
39
+ rbx.platform.typedef.__ssize_t = long
40
+ rbx.platform.typedef.__time_t = int
41
+ rbx.platform.typedef.__timer_t = int
42
+ rbx.platform.typedef.__wchar_t = int
43
+ rbx.platform.typedef.__wint_t = int
44
+ rbx.platform.typedef.__rune_t = int
45
+ rbx.platform.typedef.__wctrans_t = pointer
46
+ rbx.platform.typedef.__wctype_t = pointer
47
+ rbx.platform.typedef.__cpuid_t = ulong
48
+ rbx.platform.typedef.__dev_t = int
49
+ rbx.platform.typedef.__fixpt_t = uint
50
+ rbx.platform.typedef.__gid_t = uint
51
+ rbx.platform.typedef.__id_t = uint
52
+ rbx.platform.typedef.__in_addr_t = uint
53
+ rbx.platform.typedef.__in_port_t = ushort
54
+ rbx.platform.typedef.__ino_t = uint
55
+ rbx.platform.typedef.__key_t = long
56
+ rbx.platform.typedef.__mode_t = uint
57
+ rbx.platform.typedef.__nlink_t = uint
58
+ rbx.platform.typedef.__pid_t = int
59
+ rbx.platform.typedef.__rlim_t = ulong_long
60
+ rbx.platform.typedef.__sa_family_t = uchar
61
+ rbx.platform.typedef.__segsz_t = int
62
+ rbx.platform.typedef.__socklen_t = uint
63
+ rbx.platform.typedef.__swblk_t = int
64
+ rbx.platform.typedef.__uid_t = uint
65
+ rbx.platform.typedef.__useconds_t = uint
66
+ rbx.platform.typedef.__suseconds_t = int
67
+ rbx.platform.typedef.u_char = uchar
68
+ rbx.platform.typedef.u_short = ushort
69
+ rbx.platform.typedef.u_int = uint
70
+ rbx.platform.typedef.u_long = ulong
71
+ rbx.platform.typedef.unchar = uchar
72
+ rbx.platform.typedef.ushort = ushort
73
+ rbx.platform.typedef.uint = uint
74
+ rbx.platform.typedef.ulong = ulong
75
+ rbx.platform.typedef.cpuid_t = ulong
76
+ rbx.platform.typedef.register_t = int
77
+ rbx.platform.typedef.int8_t = char
78
+ rbx.platform.typedef.uint8_t = uchar
79
+ rbx.platform.typedef.int16_t = short
80
+ rbx.platform.typedef.uint16_t = ushort
81
+ rbx.platform.typedef.int32_t = int
82
+ rbx.platform.typedef.uint32_t = uint
83
+ rbx.platform.typedef.int64_t = long_long
84
+ rbx.platform.typedef.uint64_t = ulong_long
85
+ rbx.platform.typedef.u_int8_t = uchar
86
+ rbx.platform.typedef.u_int16_t = ushort
87
+ rbx.platform.typedef.u_int32_t = uint
88
+ rbx.platform.typedef.u_int64_t = ulong_long
89
+ rbx.platform.typedef.quad_t = long_long
90
+ rbx.platform.typedef.u_quad_t = ulong_long
91
+ rbx.platform.typedef.qaddr_t = pointer
92
+ rbx.platform.typedef.vaddr_t = ulong
93
+ rbx.platform.typedef.paddr_t = ulong
94
+ rbx.platform.typedef.vsize_t = ulong
95
+ rbx.platform.typedef.psize_t = ulong
96
+ rbx.platform.typedef.caddr_t = string
97
+ rbx.platform.typedef.daddr_t = int
98
+ rbx.platform.typedef.daddr32_t = int
99
+ rbx.platform.typedef.daddr64_t = long_long
100
+ rbx.platform.typedef.dev_t = int
101
+ rbx.platform.typedef.fixpt_t = uint
102
+ rbx.platform.typedef.gid_t = uint
103
+ rbx.platform.typedef.id_t = uint
104
+ rbx.platform.typedef.ino_t = uint
105
+ rbx.platform.typedef.key_t = long
106
+ rbx.platform.typedef.mode_t = uint
107
+ rbx.platform.typedef.nlink_t = uint
108
+ rbx.platform.typedef.pid_t = int
109
+ rbx.platform.typedef.rlim_t = ulong_long
110
+ rbx.platform.typedef.segsz_t = int
111
+ rbx.platform.typedef.swblk_t = int
112
+ rbx.platform.typedef.uid_t = uint
113
+ rbx.platform.typedef.useconds_t = uint
114
+ rbx.platform.typedef.suseconds_t = int
115
+ rbx.platform.typedef.in_addr_t = uint
116
+ rbx.platform.typedef.in_port_t = ushort
117
+ rbx.platform.typedef.sa_family_t = uchar
118
+ rbx.platform.typedef.socklen_t = uint
119
+ rbx.platform.typedef.clock_t = int
120
+ rbx.platform.typedef.clockid_t = int
121
+ rbx.platform.typedef.size_t = ulong
122
+ rbx.platform.typedef.ssize_t = long
123
+ rbx.platform.typedef.time_t = int
124
+ rbx.platform.typedef.timer_t = int
125
+ rbx.platform.typedef.off_t = long_long
126
+ rbx.platform.typedef.__fd_mask = int
@@ -0,0 +1,126 @@
1
+ rbx.platform.typedef.__int8_t = char
2
+ rbx.platform.typedef.__uint8_t = uchar
3
+ rbx.platform.typedef.__int16_t = short
4
+ rbx.platform.typedef.__uint16_t = ushort
5
+ rbx.platform.typedef.__int32_t = int
6
+ rbx.platform.typedef.__uint32_t = uint
7
+ rbx.platform.typedef.__int64_t = long_long
8
+ rbx.platform.typedef.__uint64_t = ulong_long
9
+ rbx.platform.typedef.__int_least8_t = char
10
+ rbx.platform.typedef.__uint_least8_t = uchar
11
+ rbx.platform.typedef.__int_least16_t = short
12
+ rbx.platform.typedef.__uint_least16_t = ushort
13
+ rbx.platform.typedef.__int_least32_t = int
14
+ rbx.platform.typedef.__uint_least32_t = uint
15
+ rbx.platform.typedef.__int_least64_t = long_long
16
+ rbx.platform.typedef.__uint_least64_t = ulong_long
17
+ rbx.platform.typedef.__int_fast8_t = int
18
+ rbx.platform.typedef.__uint_fast8_t = uint
19
+ rbx.platform.typedef.__int_fast16_t = int
20
+ rbx.platform.typedef.__uint_fast16_t = uint
21
+ rbx.platform.typedef.__int_fast32_t = int
22
+ rbx.platform.typedef.__uint_fast32_t = uint
23
+ rbx.platform.typedef.__int_fast64_t = long_long
24
+ rbx.platform.typedef.__uint_fast64_t = ulong_long
25
+ rbx.platform.typedef.__intptr_t = long
26
+ rbx.platform.typedef.__uintptr_t = ulong
27
+ rbx.platform.typedef.__intmax_t = long_long
28
+ rbx.platform.typedef.__uintmax_t = ulong_long
29
+ rbx.platform.typedef.__register_t = int
30
+ rbx.platform.typedef.__vaddr_t = ulong
31
+ rbx.platform.typedef.__paddr_t = ulong
32
+ rbx.platform.typedef.__vsize_t = ulong
33
+ rbx.platform.typedef.__psize_t = ulong
34
+ rbx.platform.typedef.__clock_t = int
35
+ rbx.platform.typedef.__clockid_t = int
36
+ rbx.platform.typedef.__off_t = long_long
37
+ rbx.platform.typedef.__ptrdiff_t = long
38
+ rbx.platform.typedef.__size_t = ulong
39
+ rbx.platform.typedef.__ssize_t = long
40
+ rbx.platform.typedef.__time_t = int
41
+ rbx.platform.typedef.__timer_t = int
42
+ rbx.platform.typedef.__wchar_t = int
43
+ rbx.platform.typedef.__wint_t = int
44
+ rbx.platform.typedef.__rune_t = int
45
+ rbx.platform.typedef.__wctrans_t = pointer
46
+ rbx.platform.typedef.__wctype_t = pointer
47
+ rbx.platform.typedef.__cpuid_t = ulong
48
+ rbx.platform.typedef.__dev_t = int
49
+ rbx.platform.typedef.__fixpt_t = uint
50
+ rbx.platform.typedef.__gid_t = uint
51
+ rbx.platform.typedef.__id_t = uint
52
+ rbx.platform.typedef.__in_addr_t = uint
53
+ rbx.platform.typedef.__in_port_t = ushort
54
+ rbx.platform.typedef.__ino_t = uint
55
+ rbx.platform.typedef.__key_t = long
56
+ rbx.platform.typedef.__mode_t = uint
57
+ rbx.platform.typedef.__nlink_t = uint
58
+ rbx.platform.typedef.__pid_t = int
59
+ rbx.platform.typedef.__rlim_t = ulong_long
60
+ rbx.platform.typedef.__sa_family_t = uchar
61
+ rbx.platform.typedef.__segsz_t = int
62
+ rbx.platform.typedef.__socklen_t = uint
63
+ rbx.platform.typedef.__swblk_t = int
64
+ rbx.platform.typedef.__uid_t = uint
65
+ rbx.platform.typedef.__useconds_t = uint
66
+ rbx.platform.typedef.__suseconds_t = int
67
+ rbx.platform.typedef.u_char = uchar
68
+ rbx.platform.typedef.u_short = ushort
69
+ rbx.platform.typedef.u_int = uint
70
+ rbx.platform.typedef.u_long = ulong
71
+ rbx.platform.typedef.unchar = uchar
72
+ rbx.platform.typedef.ushort = ushort
73
+ rbx.platform.typedef.uint = uint
74
+ rbx.platform.typedef.ulong = ulong
75
+ rbx.platform.typedef.cpuid_t = ulong
76
+ rbx.platform.typedef.register_t = int
77
+ rbx.platform.typedef.int8_t = char
78
+ rbx.platform.typedef.uint8_t = uchar
79
+ rbx.platform.typedef.int16_t = short
80
+ rbx.platform.typedef.uint16_t = ushort
81
+ rbx.platform.typedef.int32_t = int
82
+ rbx.platform.typedef.uint32_t = uint
83
+ rbx.platform.typedef.int64_t = long_long
84
+ rbx.platform.typedef.uint64_t = ulong_long
85
+ rbx.platform.typedef.u_int8_t = uchar
86
+ rbx.platform.typedef.u_int16_t = ushort
87
+ rbx.platform.typedef.u_int32_t = uint
88
+ rbx.platform.typedef.u_int64_t = ulong_long
89
+ rbx.platform.typedef.quad_t = long_long
90
+ rbx.platform.typedef.u_quad_t = ulong_long
91
+ rbx.platform.typedef.qaddr_t = pointer
92
+ rbx.platform.typedef.vaddr_t = ulong
93
+ rbx.platform.typedef.paddr_t = ulong
94
+ rbx.platform.typedef.vsize_t = ulong
95
+ rbx.platform.typedef.psize_t = ulong
96
+ rbx.platform.typedef.caddr_t = string
97
+ rbx.platform.typedef.daddr_t = int
98
+ rbx.platform.typedef.daddr32_t = int
99
+ rbx.platform.typedef.daddr64_t = long_long
100
+ rbx.platform.typedef.dev_t = int
101
+ rbx.platform.typedef.fixpt_t = uint
102
+ rbx.platform.typedef.gid_t = uint
103
+ rbx.platform.typedef.id_t = uint
104
+ rbx.platform.typedef.ino_t = uint
105
+ rbx.platform.typedef.key_t = long
106
+ rbx.platform.typedef.mode_t = uint
107
+ rbx.platform.typedef.nlink_t = uint
108
+ rbx.platform.typedef.pid_t = int
109
+ rbx.platform.typedef.rlim_t = ulong_long
110
+ rbx.platform.typedef.segsz_t = int
111
+ rbx.platform.typedef.swblk_t = int
112
+ rbx.platform.typedef.uid_t = uint
113
+ rbx.platform.typedef.useconds_t = uint
114
+ rbx.platform.typedef.suseconds_t = int
115
+ rbx.platform.typedef.in_addr_t = uint
116
+ rbx.platform.typedef.in_port_t = ushort
117
+ rbx.platform.typedef.sa_family_t = uchar
118
+ rbx.platform.typedef.socklen_t = uint
119
+ rbx.platform.typedef.clock_t = int
120
+ rbx.platform.typedef.clockid_t = int
121
+ rbx.platform.typedef.size_t = ulong
122
+ rbx.platform.typedef.ssize_t = long
123
+ rbx.platform.typedef.time_t = int
124
+ rbx.platform.typedef.timer_t = int
125
+ rbx.platform.typedef.off_t = long_long
126
+ rbx.platform.typedef.__fd_mask = int