ffi 1.0.11 → 1.0.12.pre

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 (159) hide show
  1. data/Rakefile +1 -1
  2. data/ext/ffi_c/AbstractMemory.c +9 -0
  3. data/ext/ffi_c/AbstractMemory.h +4 -0
  4. data/ext/ffi_c/Buffer.c +8 -0
  5. data/ext/ffi_c/Call.c +8 -0
  6. data/ext/ffi_c/ClosurePool.c +12 -0
  7. data/ext/ffi_c/DynamicLibrary.c +7 -1
  8. data/ext/ffi_c/Function.c +11 -1
  9. data/ext/ffi_c/Function.h +6 -0
  10. data/ext/ffi_c/FunctionInfo.c +8 -0
  11. data/ext/ffi_c/LastError.c +8 -0
  12. data/ext/ffi_c/MemoryPointer.c +8 -0
  13. data/ext/ffi_c/MemoryPointer.h +6 -0
  14. data/ext/ffi_c/MethodHandle.c +8 -0
  15. data/ext/ffi_c/Platform.c +8 -0
  16. data/ext/ffi_c/Pointer.c +8 -0
  17. data/ext/ffi_c/Pointer.h +6 -0
  18. data/ext/ffi_c/Struct.c +6 -0
  19. data/ext/ffi_c/StructByReference.c +8 -0
  20. data/ext/ffi_c/StructByValue.c +8 -0
  21. data/ext/ffi_c/StructLayout.c +6 -0
  22. data/ext/ffi_c/Thread.c +7 -0
  23. data/ext/ffi_c/Thread.h +6 -0
  24. data/ext/ffi_c/Type.c +3 -0
  25. data/ext/ffi_c/Types.h +4 -0
  26. data/ext/ffi_c/Variadic.c +8 -0
  27. data/ext/ffi_c/endian.h +3 -0
  28. data/ext/ffi_c/extconf.rb +6 -1
  29. data/ext/ffi_c/libffi.vc.mk +26 -0
  30. data/ext/ffi_c/libffi.vc64.mk +26 -0
  31. data/ext/ffi_c/libffi/ChangeLog +541 -0
  32. data/ext/ffi_c/libffi/ChangeLog.libffi +13 -87
  33. data/ext/ffi_c/libffi/LICENSE +3 -3
  34. data/ext/ffi_c/libffi/Makefile.am +41 -32
  35. data/ext/ffi_c/libffi/Makefile.in +95 -66
  36. data/ext/ffi_c/libffi/Makefile.vc +141 -0
  37. data/ext/ffi_c/libffi/Makefile.vc64 +141 -0
  38. data/ext/ffi_c/libffi/README +40 -4
  39. data/ext/ffi_c/libffi/aclocal.m4 +729 -7854
  40. data/ext/ffi_c/libffi/build-ios.sh +67 -0
  41. data/ext/ffi_c/libffi/compile +11 -10
  42. data/ext/ffi_c/libffi/config.guess +4 -1
  43. data/ext/ffi_c/libffi/config.sub +6 -3
  44. data/ext/ffi_c/libffi/configure +6264 -6354
  45. data/ext/ffi_c/libffi/configure.ac +155 -63
  46. data/ext/ffi_c/libffi/depcomp +81 -35
  47. data/ext/ffi_c/libffi/doc/libffi.info +78 -18
  48. data/ext/ffi_c/libffi/doc/libffi.texi +64 -5
  49. data/ext/ffi_c/libffi/doc/stamp-vti +4 -4
  50. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  51. data/ext/ffi_c/libffi/fficonfig.h.in +18 -0
  52. data/ext/ffi_c/libffi/fficonfig.hw +57 -0
  53. data/ext/ffi_c/libffi/include/Makefile.in +21 -3
  54. data/ext/ffi_c/libffi/include/ffi.h.in +42 -14
  55. data/ext/ffi_c/libffi/include/ffi.h.vc +427 -0
  56. data/ext/ffi_c/libffi/include/ffi.h.vc64 +427 -0
  57. data/ext/ffi_c/libffi/include/ffi_common.h +9 -5
  58. data/ext/ffi_c/libffi/install-sh +364 -167
  59. data/ext/ffi_c/libffi/ltmain.sh +2599 -1369
  60. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +176 -0
  61. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +195 -0
  62. data/ext/ffi_c/libffi/m4/ax_check_compiler_flags.m4 +76 -0
  63. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +63 -0
  64. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +70 -0
  65. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +300 -0
  66. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +215 -0
  67. data/ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4 +79 -0
  68. data/ext/ffi_c/libffi/m4/libtool.m4 +1239 -768
  69. data/ext/ffi_c/libffi/m4/ltoptions.m4 +7 -6
  70. data/ext/ffi_c/libffi/m4/ltversion.m4 +6 -6
  71. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +9 -3
  72. data/ext/ffi_c/libffi/man/Makefile.in +21 -3
  73. data/ext/ffi_c/libffi/mdate-sh +0 -0
  74. data/ext/ffi_c/libffi/missing +60 -44
  75. data/ext/ffi_c/libffi/msvcc.sh +197 -0
  76. data/ext/ffi_c/libffi/src/alpha/osf.S +39 -18
  77. data/ext/ffi_c/libffi/src/arm/ffi.c +443 -24
  78. data/ext/ffi_c/libffi/src/arm/ffitarget.h +17 -1
  79. data/ext/ffi_c/libffi/src/arm/gentramp.sh +118 -0
  80. data/ext/ffi_c/libffi/src/arm/sysv.S +206 -15
  81. data/ext/ffi_c/libffi/src/arm/trampoline.S +4450 -0
  82. data/ext/ffi_c/libffi/src/avr32/ffi.c +4 -2
  83. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +2 -2
  84. data/ext/ffi_c/libffi/src/closures.c +17 -35
  85. data/ext/ffi_c/libffi/src/cris/ffi.c +1 -1
  86. data/ext/ffi_c/libffi/src/cris/ffitarget.h +2 -2
  87. data/ext/ffi_c/libffi/src/dlmalloc.c +66 -4
  88. data/ext/ffi_c/libffi/src/frv/ffitarget.h +2 -6
  89. data/ext/ffi_c/libffi/src/ia64/ffi.c +7 -5
  90. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +2 -2
  91. data/ext/ffi_c/libffi/src/java_raw_api.c +1 -1
  92. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +2 -2
  93. data/ext/ffi_c/libffi/src/m68k/ffi.c +10 -0
  94. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +2 -2
  95. data/ext/ffi_c/libffi/src/m68k/sysv.S +36 -0
  96. data/ext/ffi_c/libffi/src/mips/ffi.c +12 -5
  97. data/ext/ffi_c/libffi/src/mips/ffitarget.h +18 -11
  98. data/ext/ffi_c/libffi/src/mips/n32.S +4 -4
  99. data/ext/ffi_c/libffi/src/moxie/eabi.S +128 -0
  100. data/ext/ffi_c/libffi/src/moxie/ffi.c +276 -0
  101. data/ext/ffi_c/libffi/src/pa/ffi.c +7 -4
  102. data/ext/ffi_c/libffi/src/pa/ffitarget.h +6 -5
  103. data/ext/ffi_c/libffi/src/powerpc/aix.S +5 -1
  104. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +2 -0
  105. data/ext/ffi_c/libffi/src/powerpc/asm.h +1 -1
  106. data/ext/ffi_c/libffi/src/powerpc/darwin.S +215 -77
  107. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +358 -100
  108. data/ext/ffi_c/libffi/src/powerpc/ffi.c +11 -5
  109. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +603 -172
  110. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +17 -4
  111. data/ext/ffi_c/libffi/src/prep_cif.c +16 -13
  112. data/ext/ffi_c/libffi/src/s390/ffitarget.h +4 -2
  113. data/ext/ffi_c/libffi/src/sh/ffitarget.h +2 -2
  114. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +2 -2
  115. data/ext/ffi_c/libffi/src/sparc/ffi.c +55 -11
  116. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +5 -3
  117. data/ext/ffi_c/libffi/src/x86/ffi.c +54 -92
  118. data/ext/ffi_c/libffi/src/x86/ffi64.c +17 -8
  119. data/ext/ffi_c/libffi/src/x86/ffitarget.h +15 -14
  120. data/ext/ffi_c/libffi/src/x86/sysv.S +40 -26
  121. data/ext/ffi_c/libffi/src/x86/unix64.S +4 -0
  122. data/ext/ffi_c/libffi/src/x86/win32.S +379 -191
  123. data/ext/ffi_c/libffi/src/x86/win64.S +15 -7
  124. data/ext/ffi_c/libffi/testsuite/Makefile.am +1 -1
  125. data/ext/ffi_c/libffi/testsuite/Makefile.in +22 -4
  126. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +350 -0
  127. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +1 -5
  128. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +1 -1
  129. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +1 -1
  130. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +1 -0
  131. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +1 -0
  132. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +3 -0
  133. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +2 -2
  134. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +3 -0
  135. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +1 -1
  136. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +1 -1
  137. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +1 -0
  138. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_abi.c +2 -3
  139. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -1
  140. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +36 -0
  141. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +17 -17
  142. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +1 -0
  143. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +1 -0
  144. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +1 -1
  145. data/ext/ffi_c/libffi/testsuite/libffi.special/special.exp +1 -3
  146. data/ext/ffi_c/win32/stdint.h +199 -0
  147. data/gen/Rakefile +18 -2
  148. data/lib/ffi/platform/arm-linux/types.conf +102 -0
  149. data/lib/ffi/platform/i486-gnu/types.conf +107 -0
  150. data/lib/ffi/platform/ia64-linux/types.conf +102 -0
  151. data/lib/ffi/platform/mips-linux/types.conf +102 -0
  152. data/lib/ffi/platform/mipsel-linux/types.conf +102 -0
  153. data/lib/ffi/platform/powerpc-linux/types.conf +100 -0
  154. data/lib/ffi/platform/s390-linux/types.conf +102 -0
  155. data/lib/ffi/platform/s390x-linux/types.conf +102 -0
  156. data/lib/ffi/platform/sparc-linux/types.conf +102 -0
  157. data/lib/ffi/tools/types_generator.rb +8 -1
  158. data/lib/ffi_c.bundle +0 -0
  159. metadata +72 -42
data/Rakefile CHANGED
@@ -75,7 +75,7 @@ PROJ.name = 'ffi'
75
75
  PROJ.authors = 'Wayne Meissner'
76
76
  PROJ.email = 'wmeissner@gmail.com'
77
77
  PROJ.url = 'http://wiki.github.com/ffi/ffi'
78
- PROJ.version = '1.0.11'
78
+ PROJ.version = '1.0.12.pre'
79
79
  PROJ.rubyforge.name = 'ffi'
80
80
  PROJ.readme_file = 'README.rdoc'
81
81
 
@@ -19,11 +19,20 @@
19
19
  */
20
20
 
21
21
  #include <sys/types.h>
22
+ #ifndef _MSC_VER
22
23
  #include <sys/param.h>
23
24
  #include <stdint.h>
24
25
  #include <stdbool.h>
26
+ #else
27
+ typedef int bool;
28
+ #define true 1
29
+ #define false 0
30
+ #endif
25
31
  #include <limits.h>
26
32
  #include <ruby.h>
33
+ #if defined(_MSC_VER) && !defined(INT8_MIN)
34
+ # include "win32/stdint.h"
35
+ #endif
27
36
  #include "rbffi.h"
28
37
  #include "compat.h"
29
38
  #include "AbstractMemory.h"
@@ -21,9 +21,13 @@
21
21
  #ifndef RBFFI_ABSTRACTMEMORY_H
22
22
  #define RBFFI_ABSTRACTMEMORY_H
23
23
 
24
+ #ifndef _MSC_VER
24
25
  #include <sys/param.h>
26
+ #endif
25
27
  #include <sys/types.h>
28
+ #ifndef _MSC_VER
26
29
  #include <stdint.h>
30
+ #endif
27
31
 
28
32
  #include "compat.h"
29
33
  #include "Types.h"
@@ -18,8 +18,16 @@
18
18
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
 
21
+ #ifndef _MSC_VER
21
22
  #include <stdbool.h>
23
+ #else
24
+ typedef int bool;
25
+ #define true 1
26
+ #define false 0
27
+ #endif
28
+ #ifndef _MSC_VER
22
29
  #include <stdint.h>
30
+ #endif
23
31
  #include <limits.h>
24
32
  #include <ruby.h>
25
33
  #include "rbffi.h"
@@ -20,11 +20,19 @@
20
20
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
21
21
  */
22
22
 
23
+ #ifndef _MSC_VER
23
24
  #include <sys/param.h>
25
+ #endif
24
26
  #include <sys/types.h>
25
27
  #include <stdio.h>
28
+ #ifndef _MSC_VER
26
29
  #include <stdint.h>
27
30
  #include <stdbool.h>
31
+ #else
32
+ typedef int bool;
33
+ #define true 1
34
+ #define false 0
35
+ #endif
28
36
  #include <errno.h>
29
37
  #include <ruby.h>
30
38
  #if defined(HAVE_NATIVETHREAD) && defined(HAVE_RB_THREAD_BLOCKING_REGION) && !defined(_WIN32)
@@ -17,23 +17,35 @@
17
17
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
18
18
  */
19
19
 
20
+ #ifndef _MSC_VER
20
21
  #include <sys/param.h>
22
+ #endif
21
23
  #include <sys/types.h>
22
24
  #ifndef _WIN32
23
25
  # include <sys/mman.h>
24
26
  #endif
25
27
  #include <stdio.h>
28
+ #ifndef _MSC_VER
26
29
  #include <stdint.h>
27
30
  #include <stdbool.h>
31
+ #else
32
+ typedef int bool;
33
+ #define true 1
34
+ #define false 0
35
+ #endif
28
36
  #ifndef _WIN32
29
37
  # include <unistd.h>
30
38
  #else
39
+ # include <winsock2.h>
31
40
  # define _WINSOCKAPI_
32
41
  # include <windows.h>
33
42
  #endif
34
43
  #include <errno.h>
35
44
  #include <ruby.h>
36
45
 
46
+ #if defined(_MSC_VER) && !defined(INT8_MIN)
47
+ # include "win32/stdint.h"
48
+ #endif
37
49
  #include <ffi.h>
38
50
  #include "rbffi.h"
39
51
  #include "compat.h"
@@ -20,14 +20,20 @@
20
20
 
21
21
  #include <sys/types.h>
22
22
  #include <stdio.h>
23
- #include <stdint.h>
23
+ #ifndef _MSC_VER
24
+ # include <stdint.h>
25
+ #endif
24
26
  #if defined(_WIN32) || defined(__WIN32__)
27
+ # include <winsock2.h>
25
28
  # define _WINSOCKAPI_
26
29
  # include <windows.h>
27
30
  #else
28
31
  # include <dlfcn.h>
29
32
  #endif
30
33
  #include <ruby.h>
34
+ #if defined(_MSC_VER) && !defined(INT8_MIN)
35
+ # include "win32/stdint.h"
36
+ #endif
31
37
 
32
38
  #include <ffi.h>
33
39
 
@@ -20,16 +20,26 @@
20
20
 
21
21
  #include "MethodHandle.h"
22
22
 
23
-
23
+ #ifndef _MSC_VER
24
24
  #include <sys/param.h>
25
+ #endif
25
26
  #include <sys/types.h>
26
27
  #ifndef _WIN32
27
28
  # include <sys/mman.h>
28
29
  #endif
29
30
  #include <stdio.h>
31
+ #ifndef _MSC_VER
30
32
  #include <stdint.h>
31
33
  #include <stdbool.h>
34
+ #else
35
+ typedef int bool;
36
+ #define true 1
37
+ #define false 0
38
+ #endif
32
39
  #include <ruby.h>
40
+ #if defined(_MSC_VER) && !defined(INT8_MIN)
41
+ # include "win32/stdint.h"
42
+ #endif
33
43
 
34
44
  #include <ffi.h>
35
45
  #if defined(HAVE_NATIVETHREAD) && !defined(_WIN32)
@@ -25,7 +25,13 @@
25
25
  extern "C" {
26
26
  #endif
27
27
 
28
+ #ifndef _MSC_VER
28
29
  #include <stdbool.h>
30
+ #else
31
+ typedef int bool;
32
+ #define true 1
33
+ #define false 0
34
+ #endif
29
35
  #include <ffi.h>
30
36
 
31
37
  typedef struct FunctionType_ FunctionType;
@@ -17,11 +17,19 @@
17
17
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
18
18
  */
19
19
 
20
+ #ifndef _MSC_VER
20
21
  #include <sys/param.h>
22
+ #endif
21
23
  #include <sys/types.h>
22
24
  #include <stdio.h>
25
+ #ifndef _MSC_VER
23
26
  #include <stdint.h>
24
27
  #include <stdbool.h>
28
+ #else
29
+ typedef int bool;
30
+ #define true 1
31
+ #define false 0
32
+ #endif
25
33
  #include <errno.h>
26
34
  #include <ruby.h>
27
35
 
@@ -18,11 +18,19 @@
18
18
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
 
21
+ #ifndef _MSC_VER
21
22
  #include <sys/param.h>
23
+ #endif
22
24
  #include <sys/types.h>
23
25
  #include <stdio.h>
26
+ #ifndef _MSC_VER
24
27
  #include <stdint.h>
25
28
  #include <stdbool.h>
29
+ #else
30
+ typedef int bool;
31
+ #define true 1
32
+ #define false 0
33
+ #endif
26
34
  #include <errno.h>
27
35
  #include <ruby.h>
28
36
 
@@ -19,8 +19,16 @@
19
19
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
 
22
+ #ifndef _MSC_VER
22
23
  #include <stdbool.h>
24
+ #else
25
+ typedef int bool;
26
+ #define true 1
27
+ #define false 0
28
+ #endif
29
+ #ifndef _MSC_VER
23
30
  #include <stdint.h>
31
+ #endif
24
32
  #include <limits.h>
25
33
  #include <ruby.h>
26
34
  #include "rbffi.h"
@@ -22,7 +22,13 @@
22
22
  #ifndef RBFFI_MEMORYPOINTER_H
23
23
  #define RBFFI_MEMORYPOINTER_H
24
24
 
25
+ #ifndef _MSC_VER
25
26
  #include <stdbool.h>
27
+ #else
28
+ typedef int bool;
29
+ #define true 1
30
+ #define false 0
31
+ #endif
26
32
  #include <ruby.h>
27
33
 
28
34
  #ifdef __cplusplus
@@ -17,14 +17,22 @@
17
17
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
18
18
  */
19
19
 
20
+ #ifndef _MSC_VER
20
21
  #include <sys/param.h>
22
+ #endif
21
23
  #include <sys/types.h>
22
24
  #ifndef _WIN32
23
25
  # include <sys/mman.h>
24
26
  #endif
25
27
  #include <stdio.h>
28
+ #ifndef _MSC_VER
26
29
  #include <stdint.h>
27
30
  #include <stdbool.h>
31
+ #else
32
+ typedef int bool;
33
+ #define true 1
34
+ #define false 0
35
+ #endif
28
36
  #ifndef _WIN32
29
37
  # include <unistd.h>
30
38
  #endif
@@ -18,10 +18,18 @@
18
18
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
 
21
+ #ifndef _MSC_VER
21
22
  #include <sys/param.h>
23
+ #endif
22
24
  #include <sys/types.h>
25
+ #ifndef _MSC_VER
23
26
  #include <stdint.h>
24
27
  #include <stdbool.h>
28
+ #else
29
+ typedef int bool;
30
+ #define true 1
31
+ #define false 0
32
+ #endif
25
33
  #include <ruby.h>
26
34
  #include <ctype.h>
27
35
  #include "endian.h"
@@ -18,8 +18,16 @@
18
18
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
 
21
+ #ifndef _MSC_VER
21
22
  #include <stdbool.h>
23
+ #else
24
+ typedef int bool;
25
+ #define true 1
26
+ #define false 0
27
+ #endif
28
+ #ifndef _MSC_VER
22
29
  #include <stdint.h>
30
+ #endif
23
31
  #include <limits.h>
24
32
  #include <ruby.h>
25
33
  #include "rbffi.h"
@@ -21,7 +21,13 @@
21
21
  #ifndef RBFFI_POINTER_H
22
22
  #define RBFFI_POINTER_H
23
23
 
24
+ #ifndef _MSC_VER
24
25
  #include <stdbool.h>
26
+ #else
27
+ typedef int bool;
28
+ #define true 1
29
+ #define false 0
30
+ #endif
25
31
 
26
32
  #ifdef __cplusplus
27
33
  extern "C" {
@@ -22,9 +22,15 @@
22
22
  #include <sys/types.h>
23
23
 
24
24
  #include "Function.h"
25
+ #ifndef _MSC_VER
25
26
  #include <sys/param.h>
26
27
  #include <stdint.h>
27
28
  #include <stdbool.h>
29
+ #else
30
+ typedef int bool;
31
+ #define true 1
32
+ #define false 0
33
+ #endif
28
34
  #include <ruby.h>
29
35
  #include "rbffi.h"
30
36
  #include "compat.h"
@@ -25,11 +25,19 @@
25
25
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
26
  */
27
27
 
28
+ #ifndef _MSC_VER
28
29
  #include <sys/param.h>
30
+ #endif
29
31
  #include <sys/types.h>
30
32
  #include <stdio.h>
33
+ #ifndef _MSC_VER
31
34
  #include <stdint.h>
32
35
  #include <stdbool.h>
36
+ #else
37
+ typedef int bool;
38
+ #define true 1
39
+ #define false 0
40
+ #endif
33
41
  #include <errno.h>
34
42
  #include <ruby.h>
35
43
 
@@ -18,11 +18,19 @@
18
18
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
 
21
+ #ifndef _MSC_VER
21
22
  #include <sys/param.h>
23
+ #endif
22
24
  #include <sys/types.h>
23
25
  #include <stdio.h>
26
+ #ifndef _MSC_VER
24
27
  #include <stdint.h>
25
28
  #include <stdbool.h>
29
+ #else
30
+ typedef int bool;
31
+ #define true 1
32
+ #define false 0
33
+ #endif
26
34
  #include <errno.h>
27
35
  #include <ruby.h>
28
36
 
@@ -22,9 +22,15 @@
22
22
  #include <sys/types.h>
23
23
 
24
24
  #include "Function.h"
25
+ #ifndef _MSC_VER
25
26
  #include <sys/param.h>
26
27
  #include <stdint.h>
27
28
  #include <stdbool.h>
29
+ #else
30
+ typedef int bool;
31
+ #define true 1
32
+ #define false 0
33
+ #endif
28
34
  #include <ruby.h>
29
35
  #include "rbffi.h"
30
36
  #include "compat.h"
@@ -18,13 +18,20 @@
18
18
  * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
 
21
+ #ifndef _MSC_VER
21
22
  #include <stdbool.h>
23
+ #else
24
+ typedef int bool;
25
+ #define true 1
26
+ #define false 0
27
+ #endif
22
28
 
23
29
  #ifndef _WIN32
24
30
  # include <pthread.h>
25
31
  # include <errno.h>
26
32
  # include <signal.h>
27
33
  #else
34
+ # include <winsock2.h>
28
35
  # define _WINSOCKAPI_
29
36
  # include <windows.h>
30
37
  #endif
@@ -21,7 +21,13 @@
21
21
  #ifndef RBFFI_THREAD_H
22
22
  #define RBFFI_THREAD_H
23
23
 
24
+ #ifndef _MSC_VER
24
25
  #include <stdbool.h>
26
+ #else
27
+ typedef int bool;
28
+ #define true 1
29
+ #define false 0
30
+ #endif
25
31
  #include <ruby.h>
26
32
  #include "extconf.h"
27
33